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.9.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.11.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c95bf15fcd526a62f0659160452796a59a680d6cfc9160d8914b8923c293df2f |
|
MD5 | af40ec4254d71d1cded85a75e4ce5dde |
|
BLAKE2b-256 | 23c3345fe02fc0b9b9d1cbcd824a6d4ea5eda3a648614547eca125f62dfa37c4 |
Close
Hashes for hestia_earth_utils-0.11.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e8dc820470b265053aa10553eac36f200c66fa7ea79e51a71b7609086cfafed |
|
MD5 | 5d0a12e0281dc936d6cf1b7098728093 |
|
BLAKE2b-256 | 890c78e9df542cd1e1f52e094682ebafeb6c06ea43ebe222cb1995d554555a93 |