Skip to content

About

Logo

Asynchronous ORM that uses pydantic models to represent database tables ✨

Test Package version Sponsor

Ormdantic is a library for interacting with Asynchronous SQL databases from Python code, with Python objects. It is designed to be intuitive, easy to use, compatible, and robust.

Ormdantic is based on Pypika, and powered by Pydantic and SQLAlchemy, and Highly inspired by Sqlmodel, Created by @tiangolo.

What is Pypika?

PyPika is a Python API for building SQL queries. The motivation behind PyPika is to provide a simple interface for building SQL queries without limiting the flexibility of handwritten SQL. Designed with data analysis in mind, PyPika leverages the builder design pattern to construct queries to avoid messy string formatting and concatenation. It is also easily extended to take full advantage of specific features of SQL database vendors.

The key features are:

  • Easy to use: It has sensible defaults and does a lot of work underneath to simplify the code you write.
  • Compatible: It combines SQLAlchemy, Pydantic and Pypika tries to simplify the code you write as much as possible, allowing you to reduce the code duplication to a minimum, but while getting the best developer experience possible.
  • Extensible: You have all the power of SQLAlchemy and Pypika underneath.
  • Short Queries: You can write queries in a single line of code, and it will be converted to the appropriate syntax for the database you are using.

License

This project is licensed under the terms of the MIT license.