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.26.tar.gz
(13.0 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.10.26.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1182ff839d9d508038835f93a2323f21a4134bc94e805406c2a782b2eae7f23 |
|
MD5 | 92e86d5e57335d1f3e483771727fb947 |
|
BLAKE2b-256 | 7ff1976d64ea1ea376e4ad38c61b470c604ac545cff0e8e7801bc046e1dcfdc3 |
Close
Hashes for hestia_earth_utils-0.10.26-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51055a66a2ce51c687cf262902dee4020420b54fb0ae9ac36d87ae7a7baf02b5 |
|
MD5 | fcba7774399995073b39fc131d8ac00b |
|
BLAKE2b-256 | 44a728ce93b6dd7937fc7fb57bad183bc86a17dc626f157f982a563f594618e2 |