apikeyper.database package
Module contents
- class apikeyper.database.APIKeyDB(db_file_path=None)[source]
Bases:
objectThis class provides methods to interact with a SQLite database of API keys. It also supports exporting the database contents to JSON and XML formats.
- conn
The connection to the SQLite database.
- Type:
- cursor
The cursor for executing SQL statements.
- Type:
- add_key(service, key_name, key, added, status, revoked_on=None)[source]
Adds a new API key to the database.
- export_db_as_json(export_path)[source]
Exports the contents of the database to a JSON file.
- Parameters:
export_path (str) – The path to the output JSON file.