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.13.0.tar.gz
(23.1 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.13.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a29efb9ea1a069563f1325ac967508e034b3ed951f22c78c7077500bc6345423 |
|
MD5 | dc3a1f86548fd7d66cf6d7d4a6beaaa1 |
|
BLAKE2b-256 | 8ddb5f482abe550325e1279adb204fae89d388f985b88dd7efd2ec082509fdb7 |
Close
Hashes for hestia_earth_utils-0.13.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc1739677803695182bce6fa9715bdc7dc48ce65f64a04ae9d5280b278700e13 |
|
MD5 | 3650a1d0eff1023aad89bf0965f664fd |
|
BLAKE2b-256 | 46f4174800f9bce1aca04db100a9db9eb5908de536d1f083d857c8554670f556 |