Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

DAOModel

An instant CRUD layer for your Python models.

DAOModel is a powerful yet beginner-friendly database toolkit built on top of industry-standard libraries (SQLModel, Pydantic, and SQLAlchemy). It provides everything you need to get your database-backed project up and running quickly.

  • Eliminate repetitive work by auto-creating your DAOs
  • Make your code more straightforward and readable
  • Write less code, which means:
    • having a usable product sooner
    • reduced testing burden
    • minimal potential bugs

Purpose

Assembled from a collection of duplicated logic found across several projects, this library serves as a starting point for your Python project. Though great for complex apps, it's also a great starting point for simple projects. DAOModel will benefit new developers the most by providing a straight forward start to writing code.

A goal of my libraries is to remove upfront hurdles to facilitate learning along the way. Following the Guides, anyone can get started without knowledge of relational databases or SQLAlchemy. If any documentation or design is unclear, please submit a ticket so that I can be sure that even beginners are able to benefit from this project.

Features

  • Expands upon SQLModel; works seamlessly with existing models
  • SQLAlchemy under the hood; keep existing logic while using DAOModel functions for new code
  • A proven, reliable data layer
  • Advanced search capabilities without raw SQL
  • Quality-of-life additions

Looking for more? Check out my other projects on GitHub

Installation

Python 3.10+ is required.

SQLModel, SQLAlchemy, and all other dependencies will be installed with the pip cmd:

pip install DAOModel

or, given that this project is a development tool, you will likely add DAOModel to requirements.txt or pyproject.toml.

Next, move on to the Getting Started page to begin developing your DAOModels.

Caveats

Database Support

Most testing has been completed using SQLite, though since SQLModel/SQLAlchemy support other database solutions, DAOModel is expected to as well.

Speaking of SQLite, this library configures Foreign Key constraints to be enforced by default in SQLite.

Table Names

Table names are configured to be snake_case which differs from SQLModel. See Table Naming for more information.

Unsupported Functionality

Not all functionality will work as intended through DAOModel. If something isn't supported, submit a ticket or pull request. And remember that you may always use what you can and then override the code or use the query method in DAO to do the rest. It should still save you a lot of lines of code.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

daomodel-0.10.1b0.tar.gz (53.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

daomodel-0.10.1b0-py3-none-any.whl (32.8 kB view details)

Uploaded Python 3

File details

Details for the file daomodel-0.10.1b0.tar.gz.

File metadata

  • Download URL: daomodel-0.10.1b0.tar.gz
  • Upload date:
  • Size: 53.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1020-azure

File hashes

Hashes for daomodel-0.10.1b0.tar.gz
Algorithm Hash digest
SHA256 4f38cb9f841c9c5d2f1f36a223fcf5204e49913640391ea3adee543d13793ac4
MD5 191cb717eb7d7cedd95014de8d001c32
BLAKE2b-256 91cace6e493dbefcbaac1172be0310a8b1cf58c65025d4029e5106fff4fd2dfe

See more details on using hashes here.

File details

Details for the file daomodel-0.10.1b0-py3-none-any.whl.

File metadata

  • Download URL: daomodel-0.10.1b0-py3-none-any.whl
  • Upload date:
  • Size: 32.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.28.0 CPython/3.14.6 Linux/6.17.0-1020-azure

File hashes

Hashes for daomodel-0.10.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 af77f11889237e7dc5f6944b499b1a80238172b08f9c13d9e7f8fc5fcac72cc4
MD5 cb442aceec22dd19ba5b0890628ccec2
BLAKE2b-256 db6e979a9aeb92ef12980be2b19cfe07090fd9dee247b316e006de4e5c6b50f5

See more details on using hashes here.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page