Skip to main content

makpar-innolab

qldb-orm

A simple Object-Relation-Mapping for a serverless AWS Quantum Ledger Database backend, and a command line utility for querying tables on those ledgers.

NOTE: The user or process using this library must have an IAM policy that allows access to QLDB.

ORM

The idea behind the ORM is to map document fields to native Python object attributes, so that document values can be accessed by traversing the object property tree.

CRUD OPERATIONS

from qldb_orm.qldb import Document

# Create a document on `my_table` table.
document = Document('my_table')
document.field = {
  'nested_data': {
    'array': ['colllection', 'of', 'things']
  }
}
document.save()
from qldb_orm.qldb import Document

# Load a document from `my_table` table.
document = Document('my_table', id="123456")
for val in document.field.nested_data.array:
  print(val)

Queries

from qldb_orm.qldb import Query

query = Query('my-table').find_by(field_name='field value')
for document in query:
  print(f'Document({document.id}).field_name = {document.field_name}')

CLI

CRUD Operations

qldb-orm --table your-table --insert col1=val1 col2=val2 ...
qldb-orm --table your-table --id 123 --update col1=newval1 col2=newval2

Queries

qldb-orm --table your-table --find column=this

Read The Docs

Code Quality

DeepSource DeepSource

Metadata

Release files for qldb-orm 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qldb-orm 1.0.2
File Size Uploaded
qldb-orm-1.0.2.tar.gz 25.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qldb-orm 1.0.2
File Interpreter ABI Platform
qldb_orm-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 52.0 kB

Release files / qldb-orm-1.0.2.tar.gz

Download URL qldb-orm-1.0.2.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3382df95f899842309282a089e5d1760e60c6afffded27be7c0366865ef33fa8
BLAKE2b-256 checksum
How to use checksums
91dcbb2f451e69daf0592b5210d8c0ded508ebfc9e96f52578e5dd9c30958fd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2

Release files / qldb_orm-1.0.2-py3-none-any.whl

Download URL qldb_orm-1.0.2-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3a2a41563bf4f9fb93a7ae137f3b1f90c651f827a0cbc761a0bfa14cb8dc67f
BLAKE2b-256 checksum
How to use checksums
9f975419451b168b336984a6db0d0aea0d193634402854097f59dd6e20b4ba9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page