fathomnet.api package

Submodules

fathomnet.api.boundingboxes module

class fathomnet.api.boundingboxes.BoundingBoxes

Bases: fathomnet.api.EndpointManager

PATH = 'boundingboxes'
fathomnet.api.boundingboxes.count_all() fathomnet.models.Count

Get a count of all bounding boxes.

fathomnet.api.boundingboxes.count_by_concept(concept: str) fathomnet.models.ByConceptCount

Get a count of bounding boxes for a concept.

fathomnet.api.boundingboxes.count_total_by_concept() List[fathomnet.models.ByConceptCount]

Get a count of bounding boxes for each concept.

fathomnet.api.boundingboxes.create_with_dto(bounding_box: fathomnet.models.BBoundingBoxDTO, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.BBoundingBoxDTO

Create a bounding box.

fathomnet.api.boundingboxes.delete(uuid: str, auth_header: Optional[fathomnet.models.AuthHeader] = None)

Delete a bounding box.

fathomnet.api.boundingboxes.find_all_user_defined_keys() List[str]

Get a list of all user-defined keys.

fathomnet.api.boundingboxes.find_by_user_defined_key(user_defined_key: str) List[fathomnet.models.BBoundingBoxDTO]

Get a list of bounding boxes by a user-defined key.

fathomnet.api.boundingboxes.find_by_uuid(uuid: str) fathomnet.models.BBoundingBoxDTO

Get a bounding box by UUID.

fathomnet.api.boundingboxes.find_concepts() List[str]

Get a list of all concepts.

fathomnet.api.boundingboxes.find_observers() List[str]

Get a list of all observers.

fathomnet.api.boundingboxes.update(uuid: str, bounding_box: fathomnet.models.ABoundingBoxDTO, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.BBoundingBoxDTO

Update a bounding box.

fathomnet.api.boundingboxes.upload_csv(csv_fp: BinaryIO, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.Message

Upload a CSV of bounding boxes.

fathomnet.api.darwincore module

class fathomnet.api.darwincore.DarwinCore

Bases: fathomnet.api.EndpointManager

PATH = 'darwincore'
fathomnet.api.darwincore.find_owner_institution_codes() List[str]

Get a list of owner institutions.

fathomnet.api.darwincore.index() str

Get the darwin core index page.

fathomnet.api.firebase module

class fathomnet.api.firebase.Firebase

Bases: fathomnet.api.EndpointManager

PATH = 'firebase'
fathomnet.api.firebase.auth() fathomnet.models.AuthHeader

Authenticate via firebase and get a JWT.

fathomnet.api.firebase.test(auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.Message

Test an authorization token.

fathomnet.api.geoimages module

class fathomnet.api.geoimages.GeoImages

Bases: fathomnet.api.EndpointManager

PATH = 'geoimages'
fathomnet.api.geoimages.count(geo_image_constraints: fathomnet.models.GeoImageConstraints) fathomnet.models.GeoImageConstraintsCount

Get a constrained count of geo images.

fathomnet.api.geoimages.find(geo_image_constraints: fathomnet.models.GeoImageConstraints) List[fathomnet.models.GeoImage]

Get a constrained list of geo images.

fathomnet.api.geoimages.find_all(pageable: fathomnet.models.Pageable) List[fathomnet.models.GeoImage]

Get a paged list of all geo images.

fathomnet.api.geoimages.find_by_image_set_upload_uuid(image_set_upload_uuid: str, limit: Optional[int] = None, offset: Optional[int] = None) List[fathomnet.models.GeoImage]

Get a list of geo images corresponding to an image set upload UUID.

fathomnet.api.images module

class fathomnet.api.images.Images

Bases: fathomnet.api.EndpointManager

PATH = 'images'
fathomnet.api.images.count_all() fathomnet.models.Count

Get a count of all images.

fathomnet.api.images.count_by_submitter(contributors_email: str) fathomnet.models.ByContributorCount

Get a count of images by contributor.

fathomnet.api.images.create_if_not_exists(images: List[fathomnet.models.Image], auth_header: Optional[fathomnet.models.AuthHeader] = None) List[fathomnet.models.AImageDTO]

Create an image if it doesn’t exist.

fathomnet.api.images.delete(uuid: str, auth_header: Optional[fathomnet.models.AuthHeader] = None)

Delete an image.

fathomnet.api.images.find(geo_image_constraints: fathomnet.models.GeoImageConstraints) List[fathomnet.models.AImageDTO]

Get a constrained list of images.

fathomnet.api.images.find_all(pageable: fathomnet.models.Pageable) List[fathomnet.models.AImageDTO]

Get a paged list of all images.

fathomnet.api.images.find_all_alt(pageable: fathomnet.models.Pageable) List[fathomnet.models.AImageDTO]

Get a paged list of all images. (alternative endpoint)

fathomnet.api.images.find_by_concept(concept: str, taxa: Optional[str] = None) List[fathomnet.models.AImageDTO]

Get a list of images by concept (and optionally taxa provider).

fathomnet.api.images.find_by_contributors_email(contributors_email: str) List[fathomnet.models.AImageDTO]

Get a list of images by contributor.

fathomnet.api.images.find_by_observer(observer: str) List[fathomnet.models.AImageDTO]

Get a list of images by observer.

fathomnet.api.images.find_by_sha256(sha256: str) List[fathomnet.models.AImageDTO]

Get a list of images by SHA256 hash.

fathomnet.api.images.find_by_tag_key(key: str, value: str) List[fathomnet.models.AImageDTO]

Get a list of images by a specified tag key-value pair.

fathomnet.api.images.find_by_url(url: str) fathomnet.models.AImageDTO

Get an image by URL.

fathomnet.api.images.find_by_uuid(uuid: str) fathomnet.models.AImageDTO

Get an image by UUID.

fathomnet.api.images.find_by_uuid_in_list(uuids: List[str]) List[fathomnet.models.AImageDTO]

Get a list of images corresponding to a specified list of UUIDs.

fathomnet.api.images.find_distinct_submitter() List[str]

Get a list of all submitters.

fathomnet.api.images.list_imaging_types() List[str]

Get a list of all imaging types.

fathomnet.api.images.update(uuid: str, image: fathomnet.models.AImageDTO, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.AImageDTO

Update an image.

fathomnet.api.imagesetuploads module

class fathomnet.api.imagesetuploads.ImageSetUploads

Bases: fathomnet.api.EndpointManager

PATH = 'imagesetuploads'
fathomnet.api.imagesetuploads.count_all() fathomnet.models.Count

Count all image set uploads.

fathomnet.api.imagesetuploads.find_by_contributor(contributors_email: str) List[fathomnet.models.CImageSetUploadDTO]

Get a list of image set uploads by contributor.

fathomnet.api.imagesetuploads.find_by_image_uuid(image_uuid: str) List[fathomnet.models.CImageSetUploadDTO]

Get an image set upload by UUID.

fathomnet.api.imagesetuploads.find_by_uuid(uuid: str) fathomnet.models.CImageSetUploadDTO

Get an image set upload by UUID.

fathomnet.api.imagesetuploads.find_collections(pageable: fathomnet.models.Pageable) List[fathomnet.models.CImageSetUploadDTO]

Get a paged list of all image set uploads.

fathomnet.api.imagesetuploads.find_contributors() List[str]

Get a list of all contributors.

fathomnet.api.imagesetuploads.find_rejection_reasons() List[str]

Get a list of all rejection reasons.

fathomnet.api.imagesetuploads.stats(image_set_upload_uuid: str) fathomnet.models.ImageSetUploadStats

Get image set upload statistics for a corresponding image set upload UUID.

fathomnet.api.regions module

class fathomnet.api.regions.Regions

Bases: fathomnet.api.EndpointManager

PATH = 'regions'
fathomnet.api.regions.count_all() int

Get a count of all marine regions.

fathomnet.api.regions.find_all() List[fathomnet.models.MarineRegion]

Get a list of all marine regions.

fathomnet.api.regions.find_all_paged(pageable: fathomnet.models.Pageable) List[fathomnet.models.MarineRegion]

Get a paged list of all marine regions.

fathomnet.api.regions.sync(auth_header: Optional[fathomnet.models.AuthHeader] = None) int

Synchronize.

fathomnet.api.stats module

class fathomnet.api.stats.Stats

Bases: fathomnet.api.EndpointManager

PATH = 'stats'

Get a list of the most popular searches.

fathomnet.api.taxa module

class fathomnet.api.taxa.Taxa

Bases: fathomnet.api.EndpointManager

PATH = 'taxa'
fathomnet.api.taxa.find_children(provider_name: str, concept: str) List[fathomnet.models.Taxa]

Find the taxonomic children for a concept according to a taxa provider.

fathomnet.api.taxa.find_parent(provider_name: str, concept: str) fathomnet.models.Taxa

Find the taxonomic parent for a concept according to a taxa provider.

fathomnet.api.taxa.find_taxa(provider_name: str, concept: str) List[fathomnet.models.Taxa]

Get a list of all taxonomic descendants of a concept (including the concept itself) according to a taxa provider.

fathomnet.api.taxa.index() str

Get the taxa index page.

fathomnet.api.taxa.list_taxa_providers() List[str]

Get a list of all taxa providers.

fathomnet.api.users module

class fathomnet.api.users.Users

Bases: fathomnet.api.EndpointManager

PATH = 'users'
fathomnet.api.users.count_all() fathomnet.models.Count

Get a count of all users.

fathomnet.api.users.create_new_api_key(auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.ApiKey

Create a new API key for a user.

fathomnet.api.users.delete_api_key(auth_header: Optional[fathomnet.models.AuthHeader] = None)

Delete a user’s API key.

fathomnet.api.users.disable_by_uuid(uuid: str, auth_header: Optional[fathomnet.models.AuthHeader] = None)

(Admin) Disable an account by its UUID.

fathomnet.api.users.find_all(pageable: Optional[fathomnet.models.Pageable] = None, auth_header: Optional[fathomnet.models.AuthHeader] = None) List[fathomnet.models.FathomnetIdentity]

Get a paged list of all users.

fathomnet.api.users.find_by_authentication(auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.FathomnetIdentity

Find a user by authentication.

fathomnet.api.users.find_by_email(email: str, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.FathomnetIdentity

Find a user by email.

fathomnet.api.users.find_by_firebase_uid(uid: str, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.FathomnetIdentity

Find a user by Firebase UID.

fathomnet.api.users.find_contributors_names() List[str]

Get a list of all contributor names.

fathomnet.api.users.find_expertise() List[str]

Get a list of all expertise levels.

fathomnet.api.users.find_roles() List[str]

Get a list of all user roles.

fathomnet.api.users.get_api_key(auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.ApiKey

Get a user’s API key.

fathomnet.api.users.update_user_data(fathomnet_id_mutation: fathomnet.models.FathomnetIdMutation, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.FathomnetIdentity

Update a user’s account data.

fathomnet.api.users.update_user_data_admin(uuid: str, fathomnet_id_admin_mutation: fathomnet.models.FathomnetIdAdminMutation, auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.FathomnetIdentity

(Admin) Update a user’s account data.

fathomnet.api.users.verify(auth_header: Optional[fathomnet.models.AuthHeader] = None) fathomnet.models.Authentication

Get the contents of an authorization token.

fathomnet.api.xapikey module

class fathomnet.api.xapikey.XApiKey

Bases: fathomnet.api.EndpointManager

PATH = 'xapikey'
fathomnet.api.xapikey.auth(x_api_key_token: str) fathomnet.models.AuthHeader

Exchange an X-API-key token for a JWT.

fathomnet.api.xapikey.index(auth_header: Optional[fathomnet.models.AuthHeader] = None)

Test a JWT to ensure it’s valid.

Module contents

class fathomnet.api.EndpointManager

Bases: object

PATH = None
ROOT = 'http://fathomnet.org:8080'
classmethod delete(endpoint: str, parse_json: bool = True, **kwargs) Union[requests.models.Response, dict, list]
classmethod get(endpoint: str, parse_json: bool = True, **kwargs) Union[requests.models.Response, dict, list]
classmethod post(endpoint: str, parse_json: bool = True, **kwargs) Union[requests.models.Response, dict, list]
classmethod put(endpoint: str, parse_json: bool = True, **kwargs) Union[requests.models.Response, dict, list]
classmethod request(method: str, endpoint: str, parse_json: bool = True, **kwargs) Union[requests.models.Response, dict, list]
classmethod url(endpoint: str) str