# HESTIA Utils
## Install
1. Install the module:
```bash
pip install hestia_earth.utils
```
2. Add this to your environment variables:
```
API_URL=https://api.hestia.earth
WEB_URL=https://www.hestia.earth
```
## Usage
1. To download a file from the HESTIA API:
```python
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)
```
2. To search for a specific Node on HESTIA:
```python
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'})
```
3. To get a lookup table from local file system:
```python
from hestia_earth.schema import SchemaType
from hestia_earth.utils.lookup import load_lookup
df = load_lookup('path/to/my/lookup.csv')
```
4. To get a lookup table from HESTIA:
```python
from hestia_earth.schema import SchemaType
from hestia_earth.utils.lookup import download_lookup
df = download_lookup('crop.csv')
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/hestia-earth/hestia-utils",
"name": "hestia-earth-utils",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "HESTIA Team",
"author_email": "guillaumeroyer.mail@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cd/e0/c42b72f6c58cedfe7bdea07bfd110e77ed765eafdc8a3f62d9886b3c57e9/hestia_earth_utils-0.15.2.tar.gz",
"platform": null,
"description": "# HESTIA Utils\n\n## Install\n\n1. Install the module:\n```bash\npip install hestia_earth.utils\n```\n2. Add this to your environment variables:\n```\nAPI_URL=https://api.hestia.earth\nWEB_URL=https://www.hestia.earth\n```\n\n## Usage\n\n1. To download a file from the HESTIA API:\n```python\nfrom hestia_earth.schema import SchemaType\nfrom hestia_earth.utils.api import download_hestia\n\ncycle = download_hestia('cycleId', SchemaType.CYCLE)\nsandContent = download_hestia('sandContent', SchemaType.TERM)\n```\n\n2. To search for a specific Node on HESTIA:\n```python\nfrom hestia_earth.schema import SchemaType\nfrom hestia_earth.utils.api import find_node_exact\n\nsource = find_node_exact(SchemaType.SOURCE, {'bibliography.title': 'My Bibliography'})\n```\n\n3. To get a lookup table from local file system:\n```python\nfrom hestia_earth.schema import SchemaType\nfrom hestia_earth.utils.lookup import load_lookup\n\ndf = load_lookup('path/to/my/lookup.csv')\n```\n\n4. To get a lookup table from HESTIA:\n```python\nfrom hestia_earth.schema import SchemaType\nfrom hestia_earth.utils.lookup import download_lookup\n\ndf = download_lookup('crop.csv')\n```\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "HESTIA's utils library",
"version": "0.15.2",
"project_urls": {
"Homepage": "https://gitlab.com/hestia-earth/hestia-utils"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f1ee10bbddc96345942d81cf182fc171d71a5609e00f2c4919a774d865aed3b9",
"md5": "5e73379b20fb363d2e174283dd059dd4",
"sha256": "fbfbdf266f3b484f1b856cd5bfb132e2afa26dd51cba01b26db73e8f87baa5b1"
},
"downloads": -1,
"filename": "hestia_earth_utils-0.15.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5e73379b20fb363d2e174283dd059dd4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 45660,
"upload_time": "2025-07-28T09:50:54",
"upload_time_iso_8601": "2025-07-28T09:50:54.157037Z",
"url": "https://files.pythonhosted.org/packages/f1/ee/10bbddc96345942d81cf182fc171d71a5609e00f2c4919a774d865aed3b9/hestia_earth_utils-0.15.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cde0c42b72f6c58cedfe7bdea07bfd110e77ed765eafdc8a3f62d9886b3c57e9",
"md5": "495a949bcd6323eecb894c46c378d7a8",
"sha256": "202c2fdbe8910713c765faca1b3a7e583b5814e116f0be8b2292bf52ffd536f7"
},
"downloads": -1,
"filename": "hestia_earth_utils-0.15.2.tar.gz",
"has_sig": false,
"md5_digest": "495a949bcd6323eecb894c46c378d7a8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 36638,
"upload_time": "2025-07-28T09:50:55",
"upload_time_iso_8601": "2025-07-28T09:50:55.319283Z",
"url": "https://files.pythonhosted.org/packages/cd/e0/c42b72f6c58cedfe7bdea07bfd110e77ed765eafdc8a3f62d9886b3c57e9/hestia_earth_utils-0.15.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 09:50:55",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "hestia-earth",
"gitlab_project": "hestia-utils",
"lcname": "hestia-earth-utils"
}