Skip to content

Installation

install

Installation is very simple:

1
pip install ormar

dependence

Ormar uses databases to solve connection problems, pydantic for validation, and sqlchemy-core for queries.

If your system did not exist before, all three should be installed when you install ormar.

  • database
  • pydantic
  • sqlalchemy

The required version is fixed in the pyproject.toml file.

optional dependency

ormar has three optional dependencies depending on the database backend you use:

database backend

Postgresql

1
pip install ormar[postgresql]

Asyncpg and psycopg2 will also be installed.

Mysql

1
pip install ormar[mysql]

Aiomysql and pymysql will also be installed.

Sqlite

1
pip install ormar[sqlite]

Aiosqlite will also be installed.

Orjson

1
pip install ormar[orjson]

Orjson, which is much faster than the built-in json parser, will also be installed.

Crypto

1
pip install ormar[crypto]

The encryption technology required to use encrypted columns will also be installed.

Manually install dependencies

Of course, you can also install these requirements manually using pip install asyncpg, etc.