Metadata-Version: 2.1
Name: aars
Version: 0.1.1
Summary: Experimental Object-Document-Mapper using pydantic to store objects on Aleph.im
Project-URL: Homepage, https://github.com/aleph-im/active-record-sdk
Project-URL: Bug Tracker, https://github.com/aleph-im/active-record-sdk/issues
Author-email: Mike Hukiewitz <mike.hukiewitz@robotter.ai>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# 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](https://github.com/aleph-im/aleph-client).

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

## Usage
```python
from src.aars.core import Record, Index, SDK

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

# initialize the SDK and post subsequent requests to the "MyLibrary" channel on Aleph
SDK(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')
```


## ToDo:
- [x] Basic CRUD operations
- [x] Basic indexing operations
  - [x] Single-key indexing 
  - [x] Multi-key indexing
- [ ] (IN PROGRESS) Basic search/filtering operations
- [ ] Handle pagination
- [x] Encapsulate Aleph SDK as class
- [ ] Local caching
- [ ] (IN PROGRESS) Add tests
- [ ] (IN PROGRESS) Add documentation
