Skip to main content

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.

Metadata

Release files for DAOModel 0.10.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DAOModel 0.10.5
File Size Uploaded
daomodel-0.10.5.tar.gz 56.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DAOModel 0.10.5
File Interpreter ABI Platform
daomodel-0.10.5-py3-none-any.whl Python 3 none any Details

Total release size: 91.1 kB

Release files / daomodel-0.10.5.tar.gz

Download URL daomodel-0.10.5.tar.gz
Size 56.3 kB
Tags Source
SHA-256 checksum
How to use checksums
66baeef452f47afb4dd598b03d55a18714efe2037afeea4946791108ceecb58e
BLAKE2b-256 checksum
How to use checksums
1d43181374dec98e260c55d14c5d0a1dfb7f723a821c4ea7374e6d8e13877218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure

Release files / daomodel-0.10.5-py3-none-any.whl

Download URL daomodel-0.10.5-py3-none-any.whl
Size 34.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77ab3df101b2a331035938c7d65c598432a0bb32487e33a1ffc2746738906bb6
BLAKE2b-256 checksum
How to use checksums
0586a81c1374257fa03be84c28193045a49bea99d782de6b86451244d2e2bbf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.29.2 CPython/3.14.7 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

This release

0.10.5 This release

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

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