# SIAPE-CLI
SIAPE-cli is a Python package designed to facilitate interaction with the [SIAPE website](https://siape.enea.it/). This tool allows users to download and filter data related to energy efficiency certifications of buildings in Italy.
---
## 🌟 Features
- Filter building-related data using geolocation, qualitative features, climatic zones, and other criteria.
- Enforce admissible combinations for filter options.
- Download results as a CSV file with customizable filenames.
---
## 🚀 Installation
### From PyPI
```bash
pip install siape-cli
```
After installation, the package provides a `download` command to filter and export building-related data.
---
### 🛠️ Command-Line Interface (CLI)
You can invoke the CLI using the `siape-cli` command:
```bash
siape-cli download [OPTIONS]
```
### Options
| Option | Description | Allowed Values |
|--------------------------|-------------------------------------------------------|----------------------|
| `-g`, `--geolocation` | Filter by geolocation (region or province). | `reg`, `prov` |
| `-q`, `--qualitative_features` | Filter by qualitative features (years, surface, or both). | `y`, `s`, `ys` |
| `-r`, `--resid` | Filter by building type (Residential/Non-Residential).| `res`, `non-res` |
| `-z`, `--zon_cli_filter` | Filter by climatic zones. | - |
| `-d`, `--dp412` | Filter by law DP412/93. | - |
| `-n`, `--nzeb` | Filter by NZEB buildings only. | - |
| `-o`, `--output` | Specify output file name (default: `<timestamp>.csv`).| - |
---
## 🖋️ Examples
1. **Download data for residential buildings in regions**:
```bash
siape-cli download -g reg -r res
```
2. **Filter by climatic zone and qualitative features**:
```bash
siape-cli download -z -q ys
```
3. **Download NZEB buildings data and save as `nzeb_data.csv`**:
```bash
siape-cli download -n -o nzeb_data.csv
```
4. **Filter using `dp412` law in provinces**:
```bash
siape-cli download -d -g prov
```
---
## 🚫 Rules and Restrictions
To maintain data integrity, the tool enforces the following admissible combinations:
```
reg
prov
y
s
ys
zc
dp412
reg, zc
reg, prov
reg, prov, zc
y, zc
s, zc
dp412, reg
dp412, prov
dp412, zc
dp412, y
dp412, s
dp412, ys
```
Using an invalid combination will produce an error:
```plaintext
NotAdmissibleCombination: Combination of arguments <args_set> is not admissible.
```
---
## 🧑💻 Contribution
Contributions are welcome! So far only the main filtering arguments have been implemented, and more features can be added to enhance the tool. Follow these steps to get started:
1. Open an issue to discuss the feature/fix.
2. Fork the repository.
3. Create a new branch for your feature/fix.
4. Commit your changes and push the branch.
5. Open a pull request for review.
---
## 📜 License
This project is licensed under the [MIT License](LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/NauelSerraino/SIAPE",
"name": "siape-cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "siape, scraper, energy, epc, italy",
"author": "Nauel Serraino",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/24/91/16faad311ed124b7b514424701ccae2921100e1022695ba131b932aaecde/siape_cli-0.2.1.tar.gz",
"platform": null,
"description": "# SIAPE-CLI\n\nSIAPE-cli is a Python package designed to facilitate interaction with the [SIAPE website](https://siape.enea.it/). This tool allows users to download and filter data related to energy efficiency certifications of buildings in Italy.\n\n---\n\n## \ud83c\udf1f Features\n\n- Filter building-related data using geolocation, qualitative features, climatic zones, and other criteria.\n- Enforce admissible combinations for filter options.\n- Download results as a CSV file with customizable filenames.\n\n---\n\n## \ud83d\ude80 Installation\n\n### From PyPI\n\n```bash\npip install siape-cli\n```\n\nAfter installation, the package provides a `download` command to filter and export building-related data.\n\n---\n\n### \ud83d\udee0\ufe0f Command-Line Interface (CLI)\n\nYou can invoke the CLI using the `siape-cli` command:\n\n```bash\nsiape-cli download [OPTIONS]\n```\n\n### Options\n\n| Option | Description | Allowed Values |\n|--------------------------|-------------------------------------------------------|----------------------|\n| `-g`, `--geolocation` | Filter by geolocation (region or province). | `reg`, `prov` |\n| `-q`, `--qualitative_features` | Filter by qualitative features (years, surface, or both). | `y`, `s`, `ys` |\n| `-r`, `--resid` | Filter by building type (Residential/Non-Residential).| `res`, `non-res` |\n| `-z`, `--zon_cli_filter` | Filter by climatic zones. | - |\n| `-d`, `--dp412` | Filter by law DP412/93. | - |\n| `-n`, `--nzeb` | Filter by NZEB buildings only. | - |\n| `-o`, `--output` | Specify output file name (default: `<timestamp>.csv`).| - |\n\n---\n\n## \ud83d\udd8b\ufe0f Examples\n\n1. **Download data for residential buildings in regions**:\n ```bash\n siape-cli download -g reg -r res\n ```\n\n2. **Filter by climatic zone and qualitative features**:\n ```bash\n siape-cli download -z -q ys\n ```\n\n3. **Download NZEB buildings data and save as `nzeb_data.csv`**:\n ```bash\n siape-cli download -n -o nzeb_data.csv\n ```\n\n4. **Filter using `dp412` law in provinces**:\n ```bash\n siape-cli download -d -g prov\n ```\n\n---\n\n## \ud83d\udeab Rules and Restrictions\n\nTo maintain data integrity, the tool enforces the following admissible combinations:\n\n```\nreg\nprov\ny\ns\nys\nzc\ndp412\nreg, zc\nreg, prov\nreg, prov, zc\ny, zc\ns, zc\ndp412, reg\ndp412, prov\ndp412, zc\ndp412, y\ndp412, s\ndp412, ys\n```\n\nUsing an invalid combination will produce an error:\n```plaintext\nNotAdmissibleCombination: Combination of arguments <args_set> is not admissible.\n```\n\n---\n \n## \ud83e\uddd1\u200d\ud83d\udcbb Contribution\n\nContributions are welcome! So far only the main filtering arguments have been implemented, and more features can be added to enhance the tool. Follow these steps to get started:\n\n1. Open an issue to discuss the feature/fix.\n2. Fork the repository.\n3. Create a new branch for your feature/fix.\n4. Commit your changes and push the branch.\n5. Open a pull request for review.\n\n---\n\n## \ud83d\udcdc License\n\nThis project is licensed under the [MIT License](LICENSE).",
"bugtrack_url": null,
"license": null,
"summary": "CLI tool to download aggregated data from SIAPE website.",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/NauelSerraino/SIAPE",
"Repository": "https://github.com/NauelSerraino/SIAPE"
},
"split_keywords": [
"siape",
" scraper",
" energy",
" epc",
" italy"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d9e468f43e712e7486428e424197f56d8ac3fa49e43bbb67eb7422fe6f5294f1",
"md5": "efdaf7c9027d0318fed07889551ad472",
"sha256": "eac23b17e006b05e4cf777a3e4457ec3ae1ebdbb8219e979bc0c96cb7fc0db8c"
},
"downloads": -1,
"filename": "siape_cli-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "efdaf7c9027d0318fed07889551ad472",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 13064,
"upload_time": "2024-12-26T15:59:32",
"upload_time_iso_8601": "2024-12-26T15:59:32.981547Z",
"url": "https://files.pythonhosted.org/packages/d9/e4/68f43e712e7486428e424197f56d8ac3fa49e43bbb67eb7422fe6f5294f1/siape_cli-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "249116faad311ed124b7b514424701ccae2921100e1022695ba131b932aaecde",
"md5": "87721a89e92b8a1b2b429480a8a98c8e",
"sha256": "a3403dbfb5919c67eaf0a7f07f6d791058d921d9c47e5672b6f9eb5e6d675a62"
},
"downloads": -1,
"filename": "siape_cli-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "87721a89e92b8a1b2b429480a8a98c8e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 12293,
"upload_time": "2024-12-26T15:59:35",
"upload_time_iso_8601": "2024-12-26T15:59:35.746258Z",
"url": "https://files.pythonhosted.org/packages/24/91/16faad311ed124b7b514424701ccae2921100e1022695ba131b932aaecde/siape_cli-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-26 15:59:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NauelSerraino",
"github_project": "SIAPE",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "siape-cli"
}