Table of Contents
➤ Description
A declarative ORM from scratch, compatible with SQLite
➤ Installation
Use the package manager pip to install flamel.
pip install flamel-orm
📚 Usage
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
- MVP of the ORM
- Implement a way to insert data
- Implement group_by
- Implement having
➤ Credits
This project is thanks to other projects and people:
➤ License
Licensed under MIT.
Release files for flamel-orm 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flamel_orm-0.0.5.tar.gz | 11.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flamel_orm-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 kB
Release files / flamel_orm-0.0.5.tar.gz
| Download URL | flamel_orm-0.0.5.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
763320e78b2dc048298c44987e8ffb54253e2504029b513194eee76096ca380c
|
|
BLAKE2b-256 checksum How to use checksums |
4137cc095b3ae49f615aa84c8a33af51ddfd4cbb9a8e442f4d9db470c0269930
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.6
|
Release files / flamel_orm-0.0.5-py3-none-any.whl
| Download URL | flamel_orm-0.0.5-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
662fdd50be62df114c39a4c6565ba16deaba61fdd5d41aaaf9c03dc50d750e6c
|
|
BLAKE2b-256 checksum How to use checksums |
a1d104ff4e62a86d797d6d2ee608d10ca16adc6d61d3073f7ff65c50839ec3c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.6
|