{"id":15041234,"url":"https://github.com/klen/pypika-orm","last_synced_at":"2026-03-03T20:03:43.359Z","repository":{"id":62582567,"uuid":"399777878","full_name":"klen/pypika-orm","owner":"klen","description":"Async ORM based on PyPika","archived":false,"fork":false,"pushed_at":"2021-09-09T08:05:58.000Z","size":43,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2024-11-01T06:13:23.853Z","etag":null,"topics":["asyncio","orm","pypika","sql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-25T10:25:29.000Z","updated_at":"2024-07-09T02:36:06.000Z","dependencies_parsed_at":"2022-11-03T21:22:06.516Z","dependency_job_id":null,"html_url":"https://github.com/klen/pypika-orm","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fpypika-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fpypika-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fpypika-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klen%2Fpypika-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klen","download_url":"https://codeload.github.com/klen/pypika-orm/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230506992,"owners_count":18236941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","orm","pypika","sql"],"created_at":"2024-09-24T20:45:47.542Z","updated_at":"2026-03-03T20:03:43.329Z","avatar_url":"https://github.com/klen.png","language":"Python","readme":"# PyPika-ORM - ORM for PyPika SQL Query Builder\n\nThe package gives you ORM for [PyPika](https://github.com/kayak/pypika) with\nasycio support for a range of databases (SQLite, PostgreSQL, MySQL).\n\n[![Tests Status](https://github.com/klen/pypika-orm/workflows/tests/badge.svg)](https://github.com/klen/pypika-orm/actions)\n[![PYPI Version](https://img.shields.io/pypi/v/pypika-orm)](https://pypi.org/project/pypika-orm/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/pypika-orm)](https://pypi.org/project/pypika-orm/)\n\n\n## Warning\n\nThe project is in early pre-alpha state and not ready for production\n\n## Requirements\n\n* python \u003e= 3.7\n\n## Installation\n\n**pypyka-orm** should be installed using pip:\n\n```shell\n$ pip install pypika-orm\n```\n\nYou can install the required database drivers with:\n\n```shell\n$ pip install pypika-orm[sqlite]\n$ pip install pypika-orm[postgresql]\n$ pip install pypika-orm[mysql]\n```\n\n## Usage\n\n```python\n    from pypika_orm import Model, fields\n\n    class Role(Model):\n        id = fields.Auto()\n        name = fields.Varchar(max_length=100, default='user')\n\n    class User(Model):\n        id = fields.Auto()\n        name = fields.Varchar()\n        is_active = fields.Bool(default=True, null=False)\n\n        role_id = fields.ForeignKey(Role.id)\n\n    from pypika_orm import Manager\n\n    async with Manager('sqlite:///:memory:') as manager:\n        await manager(Role).create_table().if_not_exists()\n        await manager(User).create_table().if_not_exists()\n\n        await manager(Role).insert(name='user')\n        await manager(User).insert(name='jim', role_id=1)\n\n        [user] = await manager(User).select().fetchall()\n        assert user\n```\n\n## Bug tracker\n\nIf you have any suggestions, bug reports or annoyances please report them to\nthe issue tracker at https://github.com/klen/pypika-orm/issues\n\n\n## Contributing\n\nDevelopment of the project happens at: https://github.com/klen/pypika-orm\n\n\n## License\n\nLicensed under a [MIT License](http://opensource.org/licenses/MIT)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fpypika-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklen%2Fpypika-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklen%2Fpypika-orm/lists"}