stubber.publish.database

Interface to the database which stores the package information

Functions

get_database(→ sqlite3.Connection)

Open the sqlite database at the given path.

create_database(→ sqlite3.Connection)

Create a new database at the given path.

Module Contents

stubber.publish.database.get_database(db_path: pathlib.Path, production: bool = False) sqlite3.Connection

Open the sqlite database at the given path.

The database should be located in a subfolder /data of the root path. The database name is determined by the production flag as all_packages[_test].db

Parameters:
Return type:

sqlite3.Connection

stubber.publish.database.create_database(db_path: pathlib.Path) sqlite3.Connection

Create a new database at the given path.

The database should be located in a subfolder /data of the root path.

Parameters:

db_path (pathlib.Path)

Return type:

sqlite3.Connection