Metadata-Version: 2.1
Name: LazyPony
Version: 0.1.0
Summary: UNKNOWN
Home-page: https://github.com/stsouko/LazyPony
Author: Dr. Ramil Nugmanov
Author-email: stsouko@live.ru
License: LGPLv3
Platform: UNKNOWN
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.6.7
Requires-Dist: pony (>=0.7.6)

Lazy load of database


example:
========

**file1.py**

    from LazyPony import LazyEntityMeta

    class A(metaclass=LazyEntityMeta):
        id = PrimaryKey(int, auto=True)


**file2.py**

    from LazyPony import LazyEntityMeta

    db = Database()
    LazyEntityMeta.attach(db)
    db.bind()
    db.generate_mapping()

**file3.py**

    from file1 import A

    query = A[None].select()


if schema is set in LazyEntityMeta.attach

    query = A[schema].select()

possible to attach to models multiple schemas

    db1 = Database()
    LazyEntityMeta.attach(db1, 'schema1')

    db2 = Database()
    LazyEntityMeta.attach(db2, 'schema2')

    db3 = Database()
    LazyEntityMeta.attach(db3, 'schema3')


