This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Artdatabanken Artfakta Species information API client | |
# | |
# Supports searching taxon information by taxon id, common name or scientific name. | |
# Expects a `.adb_api_key` file in the same directory that contains an API key. | |
# | |
# Usage examples: | |
# >>> from artfakta_speciesdata import Taxon | |
# >>> taxon = Taxon.get_by_cn("stubbspretmossa") | |
# >>> taxon.status | |
# 'S' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pathlib | |
import cryptography.exceptions | |
import cryptography.fernet | |
import cryptography.hazmat.backends | |
import cryptography.hazmat.primitives.hashes | |
import cryptography.hazmat.primitives.kdf.pbkdf2 | |
import base64 | |
import getpass | |
import json | |
import secrets |