Skip to main content

Module connect

Module connect 

Source
Expand description

Open a Db from a database URL.

The URL scheme picks the backend: sqlite:, postgres:// (feature postgres) or mysql:// (feature mysql). Error messages name the scheme only, never the URL, which may hold a password.

Functionsยง

backend_kind
The backend a URL scheme selects, or None for an unknown scheme.
connect_url
Open a Db from a sqlite:, postgres:// or mysql:// URL.
scratch_db
An in-memory SQLite database, for commands that need a Db but never touch it (makemigrations, squashmigrations).
url_scheme
The scheme of url (text before the first :), lower-cased, when it is a valid URL scheme.