Skip to main content

A simple declarative ORM for SQLite

Project description

Flamel Logo

python version CI

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.

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.5.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

flamel_orm-0.0.5-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file flamel_orm-0.0.5.tar.gz.

File metadata

  • Download URL: flamel_orm-0.0.5.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for flamel_orm-0.0.5.tar.gz
Algorithm Hash digest
SHA256 763320e78b2dc048298c44987e8ffb54253e2504029b513194eee76096ca380c
MD5 b4da886a6f7ab608d53a6311ed0b211f
BLAKE2b-256 4137cc095b3ae49f615aa84c8a33af51ddfd4cbb9a8e442f4d9db470c0269930

See more details on using hashes here.

File details

Details for the file flamel_orm-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: flamel_orm-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for flamel_orm-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 662fdd50be62df114c39a4c6565ba16deaba61fdd5d41aaaf9c03dc50d750e6c
MD5 10d482ea53147714cee9eb0abe3da274
BLAKE2b-256 a1d104ff4e62a86d797d6d2ee608d10ca16adc6d61d3073f7ff65c50839ec3c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page