Skip to main content

a ORM model for AWS QLDB

Project description

makpar-innovation-laboratory

innoldb

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 innoldb.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 innoldb.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 innoldb.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

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

Queries

innoldb --table your-table --find column=this

Read The Docs

Code Quality

DeepSource DeepSource

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

innoldb-1.0.15.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

innoldb-1.0.15-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file innoldb-1.0.15.tar.gz.

File metadata

  • Download URL: innoldb-1.0.15.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for innoldb-1.0.15.tar.gz
Algorithm Hash digest
SHA256 3f8e1f3b0973ba50a34aa51ad9f37f49a9671784b3cf63ae315e2b8a9af1bb9e
MD5 4c8375d25348385dfdb98bc15071d7f7
BLAKE2b-256 bb1c6d31f3a52940479235c3509dc154cbd52f6492d7a0ebf28026e145b6d7b5

See more details on using hashes here.

File details

Details for the file innoldb-1.0.15-py3-none-any.whl.

File metadata

  • Download URL: innoldb-1.0.15-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for innoldb-1.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 05189be6f4f05c2a08e3a40bd187687e4cd23ec9f25e6f28708e5bd9ff154086
MD5 e6241af9fdaf5522acc1aa77a7a8a0e0
BLAKE2b-256 3a7eccd7dd1ed5561a7bdcf4e0bbcba02dc07fa416b1bc0a101936dcc5c01234

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page