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.15.tar.gz
(11.1 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.10.15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a69ce730592e2fc74a99e0a88c6bceb6c8ea8ac1798b94bf57b62fdc76bc26a5 |
|
MD5 | 58f3bb467bd0f5cc87940ea1a5346fbc |
|
BLAKE2b-256 | 196a3ce5581798e2bb25c8ee65b52a03d970f51a1db18830f9548d0c2385a59c |
Close
Hashes for hestia_earth_utils-0.10.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 824ce48852e78c0255d94af881086634b68edaddd2ae57acccc6745a4390bc5d |
|
MD5 | 8a41db3731d9c60930086daa837ee9a3 |
|
BLAKE2b-256 | f119dd4ac2b7efbcc6ce24ea2fc9ad6c7ada1eb56df70283374972a27a291ff2 |