Skip to main content

Experimental Object-Document-Mapper using pydantic to store objects on Aleph.im

Project description

AARS: Aleph Active Record SDK

AARS's goal is to provide simple guardrails for the creation of document databases, based on Aleph's decentralized storage API. It provides tools for modelling, creating and managing decentralized databases, and a set of extensions for the Aleph Python SDK.

You can create a model of your planned database by using the Record class.

Usage

from aars import Record, Index, AARS


class Book(Record):
  title: str
  author: str


# initialize the SDK and post subsequent requests to the "MyLibrary" channel on Aleph
AARS(channel="MyLibrary")

# create and add an index for the book title
Index(Book, 'title')

# create & upload a book
new_book = await Book.create(title='Atlas Shrugged', author='Ayn Rand')

# retrieve a book by its ID
book = await Book.get(new_book.id)[0]

# retrieve a book by its title
book = await Book.query(title='Atlas Shrugged')[0]

ToDo:

  • Basic CRUD operations
  • Basic indexing operations
    • Single-key indexing
    • Multi-key indexing
    • Name indices' post_type
  • (IN PROGRESS) Basic search/filtering operations
  • Handle pagination
  • Encapsulate Aleph SDK as class
  • Local caching
  • Add tests
  • Add documentation

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

aars-0.2.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

aars-0.2.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file aars-0.2.1.tar.gz.

File metadata

  • Download URL: aars-0.2.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for aars-0.2.1.tar.gz
Algorithm Hash digest
SHA256 944d42c1b6a8089625f815af34f74d1e60bb5253dc4daa1eff01123d0d3b1138
MD5 0a1d2ffdb1f7b2d3bd5214694b91e962
BLAKE2b-256 74a1655e70a568bbd79e7ffd928c00ea90a8f660afdef528c01902b952f41937

See more details on using hashes here.

File details

Details for the file aars-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: aars-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.16

File hashes

Hashes for aars-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 301c78edb6dd21b198c2dbf5923fd11dc4495558ae0823b15ef2a11ee3eaa59d
MD5 b6a87e92b2bac64c83ccaf98ecea7a60
BLAKE2b-256 95d6aa381799b9cb4803124e1a3adc6a15998072a3b0456ac17fb6d49e784e7c

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