Skip to content

Commit 402f504

Browse files
Merge pull request #1 from aws-samples/samples-v1.0.0-rc.1
Upload the initial release of the QLDB Python Sample Application.
2 parents f37552e + 23fc682 commit 402f504

File tree

92 files changed

+5896
-80
lines changed

Some content is hidden

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

92 files changed

+5896
-80
lines changed

.gitignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
/docs/build
18+
/build
19+
/dist

CONTRIBUTING.md

-61
This file was deleted.

LICENSE

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
SPDX-License-Identifier: MIT-0
23

3-
Permission is hereby granted, free of charge, to any person obtaining a copy of
4-
this software and associated documentation files (the "Software"), to deal in
5-
the Software without restriction, including without limitation the rights to
6-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7-
the Software, and to permit persons to whom the Software is furnished to do so.
8-
9-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
11-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
12-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
13-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
5+
software and associated documentation files (the "Software"), to deal in the Software
6+
without restriction, including without limitation the rights to use, copy, modify,
7+
erge, publish, distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so.
159

10+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
11+
NCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
12+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
13+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
14+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
15+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+67-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,73 @@
1-
## My Project
1+
# AmazonQLDB Samples
22

3-
TODO: Fill this README out!
3+
The samples in this project demonstrate several uses of Amazon Quantum Ledger Database (QLDB).
44

5-
Be sure to:
5+
## Requirements
66

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

10-
## License
9+
You need to set up your AWS security credentials and config before the sample code is able
10+
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+
30+
### Python 3.x
31+
32+
The examples require Python 3.x. Please see the link below for more detail to install Python 3.x:
33+
34+
* [Python 3.x Installation](https://www.python.org/downloads/)
35+
36+
## Installing the driver and dependencies
37+
38+
Install Python QLDB driver and other dependencies using pip:
1139

12-
This library is licensed under the MIT-0 License. See the LICENSE file.
40+
```
41+
pip install -r requirements.txt
42+
```
43+
44+
## Running the Sample code
45+
46+
The sample code creates a ledger with tables and indexes, and inserts some documents into those tables,
47+
among other things. Each of the examples in this project can be run in the following way:
48+
49+
```python
50+
python create_ledger.py
51+
```
52+
53+
The above example will build the CreateLedger class with the necessary dependencies and create a ledger named:
54+
`vehicle-registration`. You may run other examples after creating a ledger.
55+
56+
## Documentation
57+
58+
Sphinx is used for documentation. You can generate HTML locally with the following:
59+
60+
```
61+
$ pip install -r requirements-docs.txt
62+
$ pip install -e .
63+
$ cd docs
64+
$ make html
65+
```
66+
67+
### Release 1.0.0-rc.1 (October 28, 2019)
68+
69+
* Initial preview release of the QLDB Python Sample Application.
70+
71+
## License
1372

73+
This library is licensed under the MIT-0 License.

0 commit comments

Comments
 (0)