Skip to main content

Small and partial Obejct mapper on top of sqlalchemy for async

Project description


# AsyncOM

Async OM it's a super basic Object mapper based almost all on sqlalchemy
ORM layer.

We use the declarative extension for building the classes, and also,
factor instances of them on querys.

There is still no support for relations. At the moment it's
tied to the [encode/databases](https://github.com/encode/databases) dependency.



## Usage

```python

from sqlalchemy.ext.declarative import declarative_base
import sqlalchemy as sa

Base = declarative_base()


class OrmTest(Base):
__tablename__ = 'orm_test'

id = sa.Column(sa.Integer, primary_key=True)
name = sa.Column(sa.String(100), index=True)
value = sa.Column(sa.Text)


# Instead of usign Database from databases, you can use:

db = OMDatabase()
res = await db.query(OrmTest).filter(
OrmTest.name.like('xx')).all()

# Look at tests
```




=======
History
=======

0.1.4
----
query(Object).get should return None if not found

0.1.3
----
- Fixes and improvements. Lay out basic API

0.1.0 (2019-04-07)
------------------

* First release on PyPI.


Project details


Download files

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

Files for asyncom, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size asyncom-0.1.4-py2.py3-none-any.whl (4.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size asyncom-0.1.4.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page