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.11.0.tar.gz
(14.2 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.11.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32906ac7a006dcfb13c2666e6fd496f699669c1bd77eb4d8aa990c54306fba7c |
|
MD5 | bfd08b5f79ed7a0c3266d504633cfb1f |
|
BLAKE2b-256 | 3a1af28ff700f3de445286e2132954a6e39249ccdb9553ef3e94b02fb17547a4 |
Close
Hashes for hestia_earth_utils-0.11.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b65399a092297adad28b6ad95ca2f72a53142e879f51a7953f20abffcd684d |
|
MD5 | ecc141bd1c564f81c6e7754c8f6d9fd1 |
|
BLAKE2b-256 | 1a6383a0cc758ab8c217b94d8c507fd77cc23ba4de8ef26041e1f99d29e0a5d1 |