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.25.tar.gz
(13.0 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.10.25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96ac7397905f44718c0fb087e8a146d38477a28a7495ee3015dbd7a1b9a6e903 |
|
MD5 | 9e88e78c71dbe9eb4265a1349f252278 |
|
BLAKE2b-256 | b65848a4b727fec13528f106730d8cd120393787bd2e37f8ed26472c97d3db68 |
Close
Hashes for hestia_earth_utils-0.10.25-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ec9a7967db519a3fc0837d49e717c499ddca0ab0d88730244d9aadf1ea6046 |
|
MD5 | a37ec4972c3099504ccb0cf8e1d6134c |
|
BLAKE2b-256 | 8491ade12b199261e0bc9407d5fad82ae56c63401d1ae4e9cfcab7592671289c |