Skip to content

Commit

Permalink
Release v2.0.2
Browse files Browse the repository at this point in the history
Added 'Getting Started' and 'Cookbook' to public api docs.
Bumped version to v2.0.2.
  • Loading branch information
saumehta9 committed May 7, 2020
1 parent eb1b651 commit d2a9a19
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 54 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### Release 2.0.2 (May 7, 2020)
* Added `Getting Started` and `Cookbook` to public api docs.

### Release 2.0.1 (March 18, 2020)

* Fixed README to reflect the correct minimum python version required.
The driver requires Python 3.4 or later, earlier it was mentioned to be 3.x

### Release 2.0.0 (March 11, 2020)

#### New features:
* Added Execute methods to PooledQldbDriver
* Added support for python native types for [execute_statement](https://amazon-qldb-driver-python.readthedocs.io/en/v2.0.0/reference/session/pooled_qldb_session.html#pyqldb.session.pooled_qldb_session.PooledQldbSession.execute_statement) parameters

#### Unavoidable breaking changes:
* In order to be more pythonic, the method signature of [execute_statement](https://amazon-qldb-driver-python.readthedocs.io/en/v2.0.0/reference/session/pooled_qldb_session.html#pyqldb.session.pooled_qldb_session.PooledQldbSession.execute_statement) has
been changed to receive *args. This is a breaking change for any application
that uses 1.0.0-rc.2 version of the driver. Starting v2.0, applications should
pass execute_statement parameters as comma separated arguments instead of passing them as a list.

### Release 1.0.0-rc.2 (October 29, 2019)

* Fixes for small documentation issues.

### Release 1.0.0-rc.1 (October 28, 2019)

* Initial preview release of the Amazon QLDB Driver for Python.
41 changes: 8 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Then from a Python interpreter, call the driver and specify the ledger name:
```python
from pyqldb.driver.pooled_qldb_driver import PooledQldbDriver

qldb_driver = PooledQldbDriver(ledger_name='test_ledger')
qldb_driver = PooledQldbDriver(ledger_name='test-ledger')
qldb_session = qldb_driver.get_session()

for table in qldb_session.list_tables():
Expand All @@ -40,11 +40,13 @@ for table in qldb_session.list_tables():

### See Also

1. [Amazon QLDB Python Driver Tutorial](https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started.python.tutorial.html): In this tutorial, you use the QLDB Driver for Python to create an Amazon QLDB ledger and populate it with tables and sample data.
2. [Amazon QLDB Python Driver Samples](https://github.com/aws-samples/amazon-qldb-dmv-sample-python): A DMV based example application which demonstrates how to use QLDB with the QLDB Driver for Python.
3. QLDB Python driver accepts and returns [Amazon ION](http://amzn.github.io/ion-docs/) Documents. Amazon Ion is a richly-typed, self-describing, hierarchical data serialization format offering interchangeable binary and text representations. For more information read the [ION docs](https://readthedocs.org/projects/ion-python/).
4. Amazon QLDB supports the [PartiQL](https://partiql.org/) query language. PartiQL provides SQL-compatible query access across multiple data stores containing structured data, semistructured data, and nested data. For more information read the [PartiQL docs](https://partiql.org/docs.html).
5. Refer the section [Common Errors while using the Amazon QLDB Drivers](https://docs.aws.amazon.com/qldb/latest/developerguide/driver-errors.html) which describes runtime errors that can be thrown by the Amazon QLDB Driver when calling the qldb-session APIs.
1. [Getting Started with Amazon QLDB Python Driver](https://amazon-qldb-driver-python.readthedocs.io/en/v2.0.2/guide/getting_started.html) A guide that gets you started with executing transactions with the QLDB Python driver.
2. [QLDB Python Driver Cookbook](https://amazon-qldb-driver-python.readthedocs.io/en/v2.0.2/guide/cookbook.html) The cookbook provides code samples for some simple QLDB Python driver use cases.
3. [Amazon QLDB Python Driver Tutorial](https://docs.aws.amazon.com/qldb/latest/developerguide/getting-started.python.tutorial.html): In this tutorial, you use the QLDB Driver for Python to create an Amazon QLDB ledger and populate it with tables and sample data.
4. [Amazon QLDB Python Driver Samples](https://github.com/aws-samples/amazon-qldb-dmv-sample-python): A DMV based example application which demonstrates how to use QLDB with the QLDB Driver for Python.
5. QLDB Python driver accepts and returns [Amazon ION](http://amzn.github.io/ion-docs/) Documents. Amazon Ion is a richly-typed, self-describing, hierarchical data serialization format offering interchangeable binary and text representations. For more information read the [ION docs](https://readthedocs.org/projects/ion-python/).
6. Amazon QLDB supports the [PartiQL](https://partiql.org/) query language. PartiQL provides SQL-compatible query access across multiple data stores containing structured data, semistructured data, and nested data. For more information read the [PartiQL docs](https://partiql.org/docs.html).
7. Refer the section [Common Errors while using the Amazon QLDB Drivers](https://docs.aws.amazon.com/qldb/latest/developerguide/driver-errors.html) which describes runtime errors that can be thrown by the Amazon QLDB Driver when calling the qldb-session APIs.

## Development

Expand Down Expand Up @@ -82,33 +84,6 @@ $ cd docs
$ make html
```

## Release Notes

### Release 2.0.1

* Fixed README to reflect the correct minimum python version required.
The driver requires Python 3.4 or later, earlier it was mentioned to be 3.x

### Release 2.0.0

#### New features:
* Added Execute methods to PooledQldbDriver
* Added support for python native types for [execute_statement](https://amazon-qldb-driver-python.readthedocs.io/en/latest/reference/session/pooled_qldb_session.html#pyqldb.session.pooled_qldb_session.PooledQldbSession.execute_statement) parameters

#### Unavoidable breaking changes:
* In order to be more pythonic, the method signature of [execute_statement](https://amazon-qldb-driver-python.readthedocs.io/en/latest/reference/session/pooled_qldb_session.html#pyqldb.session.pooled_qldb_session.PooledQldbSession.execute_statement) has
been changed to receive *args. This is a breaking change for any application
that uses 1.0.0-rc.2 version of the driver. Starting v2.0, applications should
pass execute_statement parameters as comma separated arguments instead of passing them as a list.

### Release 1.0.0-rc.2 (October 29, 2019)

* Fixes for small documentation issues.

### Release 1.0.0-rc.1 (October 28, 2019)

* Initial preview release of the Amazon QLDB Driver for Python.

## License

This library is licensed under the Apache 2.0 License.
21 changes: 9 additions & 12 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,12 @@
#modindex_common_prefix = []


# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = [
'css/custom.css',
]

import sphinx_rtd_theme

extensions.append("sphinx_rtd_theme")
html_translator_class = 'sphinx_rtd_theme.HTMLTranslator'
import guzzle_sphinx_theme

html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
extensions.append("guzzle_sphinx_theme")
html_translator_class = 'guzzle_sphinx_theme.HTMLTranslator'
html_theme_path = guzzle_sphinx_theme.html_theme_path()
html_theme = 'guzzle_sphinx_theme'
# Guzzle theme options (see theme.conf for more information)

html_theme_options = {
Expand Down Expand Up @@ -143,6 +136,10 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_css_files = [
'css/custom.css',
]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
Expand Down
16 changes: 9 additions & 7 deletions docs/source/guide/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Reading Documents
*****************

.. code-block:: python
:emphasize-lines: 6-17,26
:emphasize-lines: 6-18,27
:lineno-start: 1
# the first argument will be an instance of Executor which is a
Expand All @@ -56,7 +56,8 @@ Reading Documents
print(doc["GovId"])
print(doc["FirstName"])
# Transaction committed implicitly on return, no need to explicitly commit transaction
# Transaction committed implicitly on return,
# no need to explicitly commit transaction
# pyqldb.driver.pooled_qldb_driver.PooledQldbDriver.execute_lambda accepts
# a function that receives instance of :py:class:`pyqldb.execution.executor.Executor`
Expand All @@ -81,13 +82,14 @@ Inserting Documents
*******************

.. code-block:: python
:emphasize-lines: 1-18,28
:emphasize-lines: 1-19,30
:lineno-start: 1
def insert_documents(transaction_executor, arg_1):
# Check if doc with GovId:TOYENC486FH exists
# This is critical to make this transaction idempotent
cursor = transaction_executor.execute_statement("SELECT * FROM Person WHERE GovId = ?", "TOYENC486FH")
query = "SELECT * FROM Person WHERE GovId = ?", "TOYENC486FH"
cursor = transaction_executor.execute_statement(query)
# Check if there is any record in the cursor
first_record = next(cursor, None)
Expand All @@ -97,9 +99,9 @@ Inserting Documents
else:
# Note : arg_1 here is a native python dict. QLDB supports Amazon Ion
# documents. So before being sent to QLDB execute_statement will first convert
# any non Ion datatype to Ion using amazon.ion.simpleion module.
# https://ion-python.readthedocs.io/en/latest/_modules/amazon/ion/simpleion.html
# documents.
# So before being sent to QLDB execute_statement will first convert any non
# Ion datatype to Ion using amazon.ion.simpleion module.
transaction_executor.execute_statement("INSERT INTO Person ?", arg_1)
Expand Down
2 changes: 1 addition & 1 deletion pyqldb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
# CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
# and limitations under the License.

__version__ = '2.0.1'
__version__ = '2.0.2'
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sphinx~=2.2.0
sphinx_rtd_theme~=0.4.3
guzzle_sphinx_theme~=0.7.10

0 comments on commit d2a9a19

Please sign in to comment.