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.13.1.tar.gz
(24.3 kB
view details)
Built Distribution
File details
Details for the file hestia-earth-utils-0.13.1.tar.gz
.
File metadata
- Download URL: hestia-earth-utils-0.13.1.tar.gz
- Upload date:
- Size: 24.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d83f2af2c3d1b16a9e1ad3e52699760c39befc9419db0be32c1eb4c2654d2b9b |
|
MD5 | ce8fa2a4d4af5ece430aea1c09f3c9ea |
|
BLAKE2b-256 | 2958f8b46709f15a8f5fb65e3d1e179b86a89b19606badfa6c9876f9996cf888 |
File details
Details for the file hestia_earth_utils-0.13.1-py3-none-any.whl
.
File metadata
- Download URL: hestia_earth_utils-0.13.1-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01411a7ff81da9523ba078486193cf4e5a99a4d249a05d956ec38673756b4b5d |
|
MD5 | d3824e05d559dcd60898be1cac170e21 |
|
BLAKE2b-256 | 1b85e6fdd895e9008471b9e3905ecf3d508a505a52b41860b6f060276459deee |