Skip to main content

simple dao and ORM for sqlite

Project description


PyPI version   Python 3.x   PyPI license   Downloads

A simplified DAO for SQL abstraction for personal projects. All in one file.

pip install sqlitedao

Pet project: crawfish


Create Table easily:

dao = SqliteDao.get_instance(DB_PATH)

create_table_columns = {
    "name": "text",
    "position": "text",
    "age": "integer",
    "height": "text"
dao.create_table(TEST_TABLE_NAME, create_table_columns)

Or with a bit more control:

columns = ColumnDict()
    .add_column("name", "text", "PRIMARY KEY")\
    .add_column("position", "text")\
    .add_column("age", "integer")\
    .add_column("height", "text")
create_table_indexes = {
    "name_index": ["name"]
dao.create_table(TEST_TABLE_NAME, columns, create_table_indexes)

Create ORM classes by inheriting TableItem easily and deal with even less code,


see test files for example. This can greatly simplify and ease the creation cost for pet projects based on sqlite.

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

sqlitedao-0.5.1.tar.gz (5.3 kB view hashes)

Uploaded source

Built Distribution

sqlitedao-0.5.1-py3-none-any.whl (5.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page