A simple declarative ORM for SQLite
Project description
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')
Base.insert(worker)
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flamel_orm-0.0.4.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for flamel_orm-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36f9a4eb5b9568983868a743231fd6146854ec3744f30b137fa6d1844f1cf110 |
|
MD5 | b2c616e33d7a970283c81d44bb3c24b2 |
|
BLAKE2b-256 | b38783374680ed58b0a1e7511e25316cfc4bbe6b80c3a346c9feabe8c884c798 |