Skip to content

Commit 39fecdf

Browse files
Daniel Edward Knudsenothonrsanchez
Daniel Edward Knudsen
authored andcommitted
Upload the initial release of the Amazon QLDB driver for Python. (#1)
Upload the release candidate of the Amazon QLDB driver for Python.
1 parent 57fc8d8 commit 39fecdf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+6294
-69
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*~
2+
*#
3+
*.swp
4+
*.DS_STORE
5+
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
*.egg-info/
10+
11+
/.coverage
12+
/.coverage.*
13+
/.cache
14+
/.pytest_cache
15+
/.idea/
16+
17+
/doc/_apidoc/
18+
/docs/build/*
19+
/build
20+
/dist

CONTRIBUTING.md

-61
This file was deleted.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,4 @@
172172
of any other Contributor, and only if You agree to indemnify,
173173
defend, and hold each Contributor harmless for any liability
174174
incurred by, or claims asserted against, such Contributor by reason
175-
of your accepting any such warranty or additional liability.
175+
of your accepting any such warranty or additional liability.

README.md

+94-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,100 @@
1-
## My Project
1+
# AmazonQLDB Python Driver
22

3-
TODO: Fill this README out!
3+
This is the Python driver for Amazon Quantum Ledger Database (QLDB), which allows Python developers
4+
to write software that makes use of AmazonQLDB.
45

5-
Be sure to:
6+
## Requirements
67

7-
* Change the title in this README
8-
* Edit your repository description on GitHub
8+
### Basic Configuration
99

10-
## License
10+
You need to set up your AWS security credentials and config before the driver is able to connect to AWS.
11+
12+
Set up credentials (in e.g. `~/.aws/credentials`):
13+
14+
```
15+
[default]
16+
aws_access_key_id = <your access key id>
17+
aws_secret_access_key = <your secret key>
18+
```
19+
20+
Set up a default region (in e.g. `~/.aws/config`):
21+
22+
```
23+
[default]
24+
region = us-east-1 <or other region>
25+
```
26+
27+
See [Accessing Amazon QLDB](https://docs.aws.amazon.com/qldb/latest/developerguide/accessing.html#SettingUp.Q.GetCredentials) page for more information.
28+
29+
### Python 3.x
30+
31+
The driver requires Python 3.x. Please see the link below for more detail to install Python 3.x:
32+
33+
* [Python 3.x Installation](https://www.python.org/downloads/)
34+
35+
## Installing the driver and running the driver
36+
37+
First, install the driver using pip:
38+
39+
```pip install pyqldb```
40+
41+
42+
Then from a Python interpreter, call the driver and specify the ledger name:
43+
44+
```python
45+
from pyqldb.driver.pooled_qldb_driver import PooledQldbDriver
46+
47+
qldb_driver = PooledQldbDriver(ledger_name='test_ledger')
48+
qldb_session = qldb_driver.get_session()
1149

12-
This project is licensed under the Apache-2.0 License.
50+
for table in qldb_session.list_tables():
51+
print(table)
52+
```
53+
54+
## Development
55+
56+
### Getting Started
57+
58+
Assuming that you have Python and `virtualenv` installed, set up your environment and installed the dependencies
59+
like this instead of the `pip install pyqldb` defined above:
60+
61+
```
62+
$ git clone https://github.com/awslabs/amazon-qldb-driver-python
63+
$ cd driver
64+
$ virtualenv venv
65+
...
66+
$ . venv/bin/activate
67+
$ pip install -r requirements.txt
68+
$ pip install -e .
69+
```
70+
71+
### Running Tests
72+
73+
You can run the unit tests with this command:
74+
75+
```
76+
$ pytest --cov-report term-missing --cov=pyqldb
77+
```
78+
79+
The performance tests have a separate README.md within the performance folder.
80+
81+
### Documentation
82+
83+
Sphinx is used for documentation. You can generate HTML locally with the following:
84+
85+
```
86+
$ pip install -r requirements-docs.txt
87+
$ pip install -e .
88+
$ cd docs
89+
$ make html
90+
```
91+
92+
## Release Notes
93+
94+
### Release 1.0.0-rc.1 (October 28, 2019)
95+
96+
* Initial preview release of the Amazon QLDB Driver for Python.
97+
98+
## License
1399

100+
This library is licensed under the Apache 2.0 License.

0 commit comments

Comments
 (0)