Client
- class emdb.client.EMDB[source]
Bases:
objectHigh-level EMDB API client.
- Usage:
client = EMDB() entry = client.get_entry(“EMD-1234”)
- csv_search(query: str, fields: str = 'emdb_id,structure_determination_method,resolution') DataFrame[source]
Perform a search returning the results in a CSV table (Pandas dataframe).
- Parameters:
query – The search query string.
fields – Comma-separated list of fields to return.
- Returns:
A DataFrame containing the search results.
- Raises:
EMDBAPIError – For API-related errors.
- get_annotations(emdb_id: str) EMDBAnnotations[source]
Retrieve annotations for a given EMDB entry.
- Parameters:
emdb_id – The EMDB ID of the entry to retrieve annotations for.
- Returns:
A dictionary containing the annotations data.
- Raises:
EMDBNotFoundError – If the entry is not found.
EMDBAPIError – For API-related errors.
- get_entry(emdb_id: str) EMDBEntry[source]
Retrieve an EMDB entry by its ID.
- Parameters:
emdb_id – The EMDB ID of the entry to retrieve.
- Returns:
A dictionary containing the EMDB entry data.
- Raises:
EMDBNotFoundError – If the entry is not found.
EMDBInvalidIDError – If the provided EMDB ID is invalid.
EMDBAPIError – For other API-related errors.
- get_validation(emdb_id: str) EMDBValidation[source]
Retrieve the validation data for a given EMDB entry.
- Parameters:
emdb_id – The EMDB ID of the entry to retrieve validation data for.
- Returns:
An EMDBValidation object containing the validation data.
- Raises:
EMDBNotFoundError – If the entry is not found.
EMDBAPIError – For API-related errors.
- search(query: str) EMDBSearchResults[source]
Search for EMDB entries using a query string.
- Parameters:
query – The search query string.
- Returns:
An EMDBSearchResults object containing the search results.
- Raises:
EMDBAPIError – For API-related errors.