Skip to main content

PyPika-ORM - ORM for PyPika SQL Query Builder

The package gives you ORM for PyPika with asycio support for a range of databases (SQLite, PostgreSQL, MySQL).

Tests Status PYPI Version Python Versions

Warning

The project is in early pre-alpha state and not ready for production

Requirements

  • python >= 3.7

Installation

pypyka-orm should be installed using pip:

$ pip install pypika-orm

You can install the required database drivers with:

$ pip install pypika-orm[sqlite]
$ pip install pypika-orm[postgresql]
$ pip install pypika-orm[mysql]

Usage

    from pypika_orm import Model, fields

    class Role(Model):
        id = fields.Auto()
        name = fields.Varchar(max_length=100, default='user')

    class User(Model):
        id = fields.Auto()
        name = fields.Varchar()
        is_active = fields.Bool(default=True, null=False)

        role_id = fields.ForeignKey(Role.id)

    from pypika_orm import Manager

    async with Manager('sqlite:///:memory:') as manager:
        await manager(Role).create_table().if_not_exists()
        await manager(User).create_table().if_not_exists()

        await manager(Role).insert(name='user')
        await manager(User).insert(name='jim', role_id=1)

        [user] = await manager(User).select().fetchall()
        assert user

Bug tracker

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/pypika-orm/issues

Contributing

Development of the project happens at: https://github.com/klen/pypika-orm

License

Licensed under a MIT License

Metadata

Release files for pypika-orm 0.0.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypika-orm 0.0.15
File Size Uploaded Provenance Actions
pypika-orm-0.0.15.tar.gz 8.2 kB Without provenance Details for pypika-orm-0.0.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pypika-orm 0.0.15
File Interpreter ABI Platform Actions
pypika_orm-0.0.15-py3-none-any.whl Python 3 none any Details for pypika_orm-0.0.15-py3-none-any.whl

Total release size: 16.5 kB

Release files / pypika-orm-0.0.15.tar.gz

Download URL pypika-orm-0.0.15.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f465aeeab141221af08e97c7b582524b258f87b03962096d318cf0b903a10e62
BLAKE2b-256 checksum
How to use checksums
c3472de54190f37a387c1e9f3ce1a179156879bd42ce41683f971e715abbdc66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Release files / pypika_orm-0.0.15-py3-none-any.whl

Download URL pypika_orm-0.0.15-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82896da0cae362715fff02fbb22caa94e4c57ce9078e1eb3d43b83e72d3f47de
BLAKE2b-256 checksum
How to use checksums
11d053991f4d3d7b57b4f23f6a185f7aba26aaccdf83cb768e394250f4d3714e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

Security for pypika-orm 0.0.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page