Client

class emdb.client.EMDB[source]

Bases: object

High-level EMDB API client.

Usage:

client = EMDB() entry = client.get_entry(“EMD-1234”)

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:
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:
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:
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.