ersilia.db.hubdata package¶
Submodules¶
ersilia.db.hubdata.interfaces module¶
- class ersilia.db.hubdata.interfaces.JsonModelsInterface(config_json=None)[source]¶
Bases:
ErsiliaBase
Interface for fetching model metadata from models stored in S3.
- Parameters:
config_json (dict, optional) – Configuration settings for initializing the interface.
- identifier_exists(model_id)[source]¶
Checks if a model identifier exists in the JSON file.
- Parameters:
model_id (str) – Identifier of the model to check.
- Returns:
True if the identifier exists, False otherwise.
- Return type:
bool
ersilia.db.hubdata.localslugs module¶
- class ersilia.db.hubdata.localslugs.SlugDb(config_json=None)[source]¶
Bases:
ErsiliaBase
Manages slug database operations for models.
- Parameters:
config_json (dict, optional) – Configuration settings for initializing the slug database.
- delete(model_id, slug)[source]¶
Deletes a specific entry from the database by model ID and slug.
- Parameters:
model_id (str) – Identifier of the model.
slug (str) – Slug associated with the model.
- delete_by_model_id(model_id)[source]¶
Deletes entries from the database by model ID.
- Parameters:
model_id (str) – Identifier of the model to delete.
- delete_by_slug(slug)[source]¶
Deletes entries from the database by slug.
- Parameters:
slug (str) – Slug to delete.
- insert(model_id, slug)[source]¶
Inserts a model ID and slug into the database.
- Parameters:
model_id (str) – Identifier of the model.
slug (str) – Slug associated with the model.
ersilia.db.hubdata.sanitize module¶
ersilia.db.hubdata.tables module¶
- class ersilia.db.hubdata.tables.DynamoDbTable[source]¶
Bases:
object
Base class for DynamoDB tables.
- class ersilia.db.hubdata.tables.ModelsTable[source]¶
Bases:
DynamoDbTable
Table for storing models.
- class ersilia.db.hubdata.tables.PredictionsTable[source]¶
Bases:
DynamoDbTable
Table for storing predictions.