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.6.tar.gz
(23.1 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.12.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0750220dfdd58aba91544c6371273343a6dc954998505e918c08212d0b762697 |
|
MD5 | 8341656fd31d794bc9057d0451d974de |
|
BLAKE2b-256 | c407c4df2e07c381a322cb5438308a5e6cdf4226b7aca3bee45fd808a794a810 |
Close
Hashes for hestia_earth_utils-0.12.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1277df5c7cefe48459c801c5b3b6296206727ffb34b9fb360586a391b2db97da |
|
MD5 | b511a9aa6f58b2eec8feb9aecc1962c3 |
|
BLAKE2b-256 | 6dfab562f3e7b556dee38d9623bf296803c64b6d416fab959d41b50b11ab229d |