Metadata-Version: 2.1
Name: anji-orm
Version: 0.7.2
Summary: RethinkDB based ORM
Home-page: https://gitlab.com/AnjiProject/anji-orm
Author: Bogdan Gladyshev
Author-email: siredvin.dark@gmail.com
License: MIT license
Keywords: rethinkdb asyncio orm
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: AsyncIO
Requires-Dist: humanize (~=0.5.1)
Requires-Dist: lazy (~=1.3)
Requires-Dist: jsonschema (~=2.6.0)
Requires-Dist: aenum (~=2.1.2)
Requires-Dist: toolz (~=0.9.0)
Provides-Extra: all
Requires-Dist: repool-forked (~=0.3.2); extra == 'all'
Requires-Dist: async-repool (~=0.3.2); extra == 'all'
Requires-Dist: aiohttp (~=3.2.1); extra == 'all'
Requires-Dist: requests (~=2.18.4); extra == 'all'
Requires-Dist: sseclient-py (~=1.7); extra == 'all'
Requires-Dist: unqlite (~=0.7.1); extra == 'all'
Provides-Extra: couchdb-async
Requires-Dist: aiohttp (~=3.2.1); extra == 'couchdb-async'
Provides-Extra: couchdb-sync
Requires-Dist: requests (~=2.18.4); extra == 'couchdb-sync'
Requires-Dist: sseclient-py (~=1.7); extra == 'couchdb-sync'
Provides-Extra: rethinkdb-async
Requires-Dist: async-repool (~=0.3.2); extra == 'rethinkdb-async'
Provides-Extra: rethinkdb-sync
Requires-Dist: repool-forked (~=0.3.2); extra == 'rethinkdb-sync'
Provides-Extra: unqlite
Requires-Dist: unqlite (~=0.7.1); extra == 'unqlite'

===================
RethinkDB-based ORM
===================

.. image:: https://img.shields.io/pypi/v/anji-orm.svg
        :target: https://pypi.python.org/pypi/anji-orm
.. image:: https://img.shields.io/pypi/l/anji-orm.svg
        :target: https://pypi.python.org/pypi/anji-orm
.. image:: https://gitlab.com/AnjiProject/anji-orm/badges/master/build.svg
        :target: https://gitlab.com/AnjiProject/anji-orm



:code:`anji_orm` simple ORM for RethinkDB

Installation
------------

:code:`anji_orm` is available as a python library on Pypi. Installation is very simple using pip :

.. code:: bash

    $ pip install anji_orm

This will install :code:`anji_orm` as well as external dependency.

Basic usage
-----------

ORM registry should be initiated before usage:

.. code:: python

    # For sync usage
    register.init(dict(db='test'))
    register.load()

    # Or for async usage

    register.init(dict(db='test'), async_mode=True)
    await register.async_load()

That, create some model

.. code:: python

    class T1(Model):

        _table = 't2'

        a1 = StringField()
        a2 = StringField()

    t2 = T1(a1='b', a1='c')
    t2.send()
    # or for async usage
    await t2.async_send()

