Hestia's utils library
Project description
Hestia Utils
Install
- Install the module:
pip install hestia_earth.utils
- Add this to your environment variables:
API_URL=https://api.hestia.earth
WEB_URL=https://www.hestia.earth
Usage
- To download a file from the Hestia API:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.api import download_hestia
cycle = download_hestia('cycleId', SchemaType.CYCLE)
sandContent = download_hestia('sandContent', SchemaType.TERM)
- To search for a specific Node on Hestia:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.api import find_node_exact
source = find_node_exact(SchemaType.SOURCE, {'bibliography.title': 'My Bibliography'})
- To get a lookup table from local file system:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.lookup import load_lookup
df = load_lookup('path/to/my/lookup.csv')
- To get a lookup table from Hestia:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.lookup import download_lookup
df = download_lookup('crop.csv')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hestia-earth-utils-0.10.18.tar.gz
(11.1 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.10.18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83383012919a17ded614313d5286bf548df885ab42ada8969a0eacb1e83b13f0 |
|
MD5 | e69cf2ec01432c63f90aad334e455da6 |
|
BLAKE2b-256 | 88706313fdfe8998f41692ace3778286d905c35d60400754a3869fd16cc093d1 |
Close
Hashes for hestia_earth_utils-0.10.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15b245b82094d327ca65e0b89d831ba0eedd006a7174ba620d4f8619b8d65262 |
|
MD5 | 4ff33ed4eeae40da72562276ae1813e3 |
|
BLAKE2b-256 | 8d19123376c46ce4f822fd9a357aa6cc2cd0e263f62b700648a600ea69f6967d |