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.12.5.tar.gz
(23.1 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.12.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf5199d2b44d9e732a44e7fb37a52e1c0c32f3faca118a57f0b1245889007ff2 |
|
MD5 | c139b67302258fe548cb222132d9430b |
|
BLAKE2b-256 | 45054ad7c8a37394e887ebb05acfffdc1c8366b5b1edd6257aa892076bfe3f0a |
Close
Hashes for hestia_earth_utils-0.12.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a689b20223308bfac505e05c4a2762db3b9440336d5828a02e87a6af444815d0 |
|
MD5 | 9f02f866d3ba1b355eae8c0d87dee0a0 |
|
BLAKE2b-256 | c87b4839846ed3be6f13ceab19dae9076feb14e9c92767d1f3f043b418a04115 |