Name | flamel-orm JSON |
Version |
0.0.5
JSON |
| download |
home_page | None |
Summary | A simple declarative ORM for SQLite |
upload_time | 2024-07-14 19:20:05 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | MIT |
keywords |
orm
simple
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<img src="logo/logo_flamel.jpeg" alt="Flamel Logo" width="200"/>
</p>
<p align="center">
<a src="https://pypi.org/project/flamel-orm">
<img alt="python version" src="https://img.shields.io/pypi/pyversions/flamel-orm.svg" />
</a>
<img alt="CI" src="https://github.com/fernando24164/flamel/actions/workflows/python-test.yml/badge.svg">
</p>
# Table of Contents
* [Description](#description)
* [Installation](#installation)
* [Usage](#usage)
* [License](#license)
## ➤ Description
A declarative ORM from scratch, compatible with SQLite
## ➤ Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install flamel.
```bash
pip install flamel-orm
```
## 📚 Usage
```python
from flamel.base import Base
from flamel.column import Column, Integer, String
class Worker(Base):
id = Column("id", Integer, primary_key=True, autoincrement=True)
name = Column("name", String, nullable=False, unique=True)
email = Column("mail", String, nullable=False, unique=True)
Base.set_engine("company.db")
Base.create_tables()
worker = Worker(name='John Doe', email='john.doe@example.com')
worker2 = Worker(name='Jane Smith', email='jane.smith@example.com')
worker3 = Worker(name='Mike Johnson', email='mike.johnson@example.com')
Base.insert(worker)
Base.insert(worker2)
Base.insert(worker3)
query = Worker.query().select().filter(name="John Doe")
print(query)
result = query.execute()
print(result)
Base.engine_close()
```
## ➤ Roadmap
- [x] MVP of the ORM
- [x] Implement a way to insert data
- [x] Implement group_by
- [x] Implement having
## ➤ Credits
This project is thanks to other projects and people:
- [SQLAlchemy architecture](https://aosabook.org/en/v2/sqlalchemy.html) -
- [SQLAlchemy github](https://github.com/sqlalchemy/sqlalchemy) -
## ➤ License
Licensed under [MIT](https://opensource.org/licenses/MIT).
Raw data
{
"_id": null,
"home_page": null,
"name": "flamel-orm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ORM, simple",
"author": null,
"author_email": "fernando24164 <fernando24164@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/41/37/cc095b3ae49f615aa84c8a33af51ddfd4cbb9a8e442f4d9db470c0269930/flamel_orm-0.0.5.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"logo/logo_flamel.jpeg\" alt=\"Flamel Logo\" width=\"200\"/>\n</p>\n\n<p align=\"center\">\n <a src=\"https://pypi.org/project/flamel-orm\">\n <img alt=\"python version\" src=\"https://img.shields.io/pypi/pyversions/flamel-orm.svg\" />\n </a>\n <img alt=\"CI\" src=\"https://github.com/fernando24164/flamel/actions/workflows/python-test.yml/badge.svg\">\n</p>\n\n# Table of Contents\n\n* [Description](#description)\n* [Installation](#installation)\n* [Usage](#usage)\n* [License](#license)\n\n\n## \u27a4 Description\n\nA declarative ORM from scratch, compatible with SQLite\n\n## \u27a4 Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install flamel.\n\n```bash\npip install flamel-orm\n```\n\n## \ud83d\udcda Usage\n\n```python\nfrom flamel.base import Base\nfrom flamel.column import Column, Integer, String\n\n\nclass Worker(Base):\n id = Column(\"id\", Integer, primary_key=True, autoincrement=True)\n name = Column(\"name\", String, nullable=False, unique=True)\n email = Column(\"mail\", String, nullable=False, unique=True)\n\n\nBase.set_engine(\"company.db\")\n\nBase.create_tables()\n\nworker = Worker(name='John Doe', email='john.doe@example.com')\nworker2 = Worker(name='Jane Smith', email='jane.smith@example.com')\nworker3 = Worker(name='Mike Johnson', email='mike.johnson@example.com')\n\nBase.insert(worker)\nBase.insert(worker2)\nBase.insert(worker3)\n\nquery = Worker.query().select().filter(name=\"John Doe\")\nprint(query)\nresult = query.execute()\nprint(result)\n\nBase.engine_close()\n```\n\n## \u27a4 Roadmap\n\n- [x] MVP of the ORM\n- [x] Implement a way to insert data\n- [x] Implement group_by\n- [x] Implement having\n\n## \u27a4 Credits\n\nThis project is thanks to other projects and people:\n\n- [SQLAlchemy architecture](https://aosabook.org/en/v2/sqlalchemy.html) -\n\n- [SQLAlchemy github](https://github.com/sqlalchemy/sqlalchemy) -\n\n## \u27a4 License\n\nLicensed under [MIT](https://opensource.org/licenses/MIT).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple declarative ORM for SQLite",
"version": "0.0.5",
"project_urls": {
"Repository": "https://github.com/fernando24164/flamel"
},
"split_keywords": [
"orm",
" simple"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a1d104ff4e62a86d797d6d2ee608d10ca16adc6d61d3073f7ff65c50839ec3c2",
"md5": "10d482ea53147714cee9eb0abe3da274",
"sha256": "662fdd50be62df114c39a4c6565ba16deaba61fdd5d41aaaf9c03dc50d750e6c"
},
"downloads": -1,
"filename": "flamel_orm-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "10d482ea53147714cee9eb0abe3da274",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 8021,
"upload_time": "2024-07-14T19:20:02",
"upload_time_iso_8601": "2024-07-14T19:20:02.409563Z",
"url": "https://files.pythonhosted.org/packages/a1/d1/04ff4e62a86d797d6d2ee608d10ca16adc6d61d3073f7ff65c50839ec3c2/flamel_orm-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4137cc095b3ae49f615aa84c8a33af51ddfd4cbb9a8e442f4d9db470c0269930",
"md5": "b4da886a6f7ab608d53a6311ed0b211f",
"sha256": "763320e78b2dc048298c44987e8ffb54253e2504029b513194eee76096ca380c"
},
"downloads": -1,
"filename": "flamel_orm-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "b4da886a6f7ab608d53a6311ed0b211f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11766,
"upload_time": "2024-07-14T19:20:05",
"upload_time_iso_8601": "2024-07-14T19:20:05.213289Z",
"url": "https://files.pythonhosted.org/packages/41/37/cc095b3ae49f615aa84c8a33af51ddfd4cbb9a8e442f4d9db470c0269930/flamel_orm-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-14 19:20:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fernando24164",
"github_project": "flamel",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "flamel-orm"
}