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
Built Distribution
Close
Hashes for hestia-earth-utils-0.10.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9d3d35f65519ea23729a6ecb28dd0885951fe09754bbd691dedf7120d52dbd2 |
|
MD5 | 8b28101392274f5a5b9c1e39fa1050db |
|
BLAKE2b-256 | b2797f694b3d00b145641156c72fdeea9055f5c4b40123d6cf1d25c3bd21e0e9 |
Close
Hashes for hestia_earth_utils-0.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1cb3f4b2b78cc450a6b5ac36b2d6b3bcab5a0c03e899acd462206aca5c105e6 |
|
MD5 | 6ec9b9a906d817dc254a9c4d449f9467 |
|
BLAKE2b-256 | e81fdfdf674925ca4ce792e2ae639d9b6a88da50cc7adf3191b36656d5162963 |