from sqlalchemy import create_engine
engine = create_engine("sqlite+pysqlite:///:memory:", echo=True)
The main argument to create_engine is a string URL, above passed as the string "sqlite+pysqlite:///:memory:". This string indicates to the Engine three important facts:
- What kind of database are we communicating with? This is the
sqliteportion above, which links in SQLAlchemy to an object known as the dialect. - What DBAPI are we using? The Python DBAPI is a third party driver that SQLAlchemy uses to interact with a particular database. In this case, we’re using the name
pysqlite, which in modern Python use is the sqlite3 standard library interface for SQLite. If omitted, SQLAlchemy will use a default DBAPI for the particular database selected. https://docs.sqlalchemy.org/en/20/core/type_basics.html#types-generic
asyncpg cannot copy autoincreament