/amazon-qldb-dmv-sample-python

A DMV based example application which demonstrates how to use QLDB with the QLDB Driver for Python.

Primary LanguagePythonOtherNOASSERTION

Amazon QLDB Python DMV Sample App

license AWS Provider

The samples in this project demonstrate several uses of Amazon Quantum Ledger Database (QLDB).

For our tutorial, see Python and Amazon QLDB.

Requirements

Basic Configuration

See Accessing Amazon QLDB for information on connecting to AWS.

See Setting Region page for more information on using the AWS SDK for Python. You will need to set a region before running the sample code.

Required Python versions

DMV Sample App v1.x requires Python 3.4 or later.

DMV Sample App v2.x requires Python 3.7 or later.

Please see the link below for more detail to install Python:

Installing the driver and dependencies

Install Python QLDB driver and other dependencies using pip:

pip install -r requirements.txt

Running the Sample code

The sample code creates a ledger with tables and indexes, and inserts some documents into those tables, among other things. Each of the examples in this project can be run in the following way:

python create_ledger.py

The above example will build the CreateLedger class with the necessary dependencies and create a ledger named: vehicle-registration. You may run other examples after creating a ledger.

Documentation

Sphinx is used for documentation. You can generate HTML locally with the following:

$ pip install -r requirements-docs.txt
$ pip install -e .
$ cd docs
$ make html

License

This library is licensed under the MIT-0 License.