apikeyper package

Subpackages

Module contents

class apikeyper.APIKeyPER(db_file_path=None)[source]

Bases: object

This class provides a higher-level interface for managing API keys stored in a SQLite database.

db

An instance of the APIKeyDB class for managing API keys.

Type:

APIKeyDB

add_key(service, api_key)[source]

Add a key to database associated with a service.

Parameters:
  • service (str) – The service the API key is associated with.

  • api_key (str) – The API key associated with the given service.

Returns:

None

delete_key(service)[source]

Deletes an API key for a specific service from the database.

Parameters:

service (str) – The service to delete the key for.

Returns:

None

get_key(service)[source]

Retrieves an API key for a specific service from the database.

Parameters:

service (str) – The service to retrieve the key for.

Returns:

The retrieved API key.

Return type:

str

list_services()[source]

Lists all unique services in the database.

Returns:

A list of all unique services.

Return type:

list