# Meteocat Python Package for Meteocat Home Assistant Integration
[](https://opensource.org/licenses/Apache-2.0)
[](https://pypi.org/project/meteocatpy)
[](https://gitlab.com/figorr/meteocatpy/commits/master)
`meteocatpy` is a Python package to interact with the Meteocat API. Allows you to obtain meteorological data and lists of municipalities from the Meteocat API.
**NOTE:** Meteocat API requires to use an API_KEY, you should ask to (https://apidocs.meteocat.gencat.cat/documentacio/acces-ciutada-i-administracio/)
# Installation
You can install the package from PyPI using `pip`:
```bash
pip install meteocatpy
```
```bash
from meteocatpy.town import MeteocatTown
# Replace 'tu_api_key' with your actual API key
api_key = "tu_api_key"
town_client = MeteocatTown(api_key)
# Get a list of municipalities (asynchronous call)
municipios_data = await town_client.get_municipis()
print(municipis)
```
# Credits
This is a personal project.
Authors:
- Figorr
# Contributing
If you would like to contribute to this project, please open an issue or create a pull request. I'd be happy to review your contributions!
1. [Check for open features/bugs](https://gitlab.com/figorr/meteocatpy/issues)
or [initiate a discussion on one](https://gitlab.com/figorr/meteocatpy/issues/new).
2. [Fork the repository](https://gitlab.com/figorr/meteocatpy/forks/new).
3. Install the dev environment: `make init`.
4. Enter the virtual environment: `pipenv shell`
5. Code your new feature or bug fix.
6. Write a test that covers your new functionality.
7. Update `README.md` with any new documentation.
8. Run tests and ensure 100% code coverage for your contribution: `make coverage`
9. Ensure you have no linting errors: `make lint`
10. Ensure you have typed your code correctly: `make typing`
11. Add yourself to `AUTHORS.md`.
12. Submit a pull request!
# License
[Apache-2.0](LICENSE). By providing a contribution, you agree the contribution is licensed under Apache-2.0.
# API Reference
[See the docs 📚](https://apidocs.meteocat.gencat.cat/section/informacio-general/).
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/figorr/meteocatpy",
"name": "meteocatpy",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.12",
"maintainer_email": null,
"keywords": "meteocatpy, meteocat",
"author": "figorr",
"author_email": "jdcuartero@yahoo.es",
"download_url": "https://files.pythonhosted.org/packages/62/7c/54b859c7696606d7ff608f22f98cfa999aa9842226d3a1bbaf8e79c24a98/meteocatpy-1.0.1.tar.gz",
"platform": null,
"description": "# Meteocat Python Package for Meteocat Home Assistant Integration\n\n[](https://opensource.org/licenses/Apache-2.0)\n[](https://pypi.org/project/meteocatpy)\n[](https://gitlab.com/figorr/meteocatpy/commits/master)\n\n\n`meteocatpy` is a Python package to interact with the Meteocat API. Allows you to obtain meteorological data and lists of municipalities from the Meteocat API.\n\n**NOTE:** Meteocat API requires to use an API_KEY, you should ask to (https://apidocs.meteocat.gencat.cat/documentacio/acces-ciutada-i-administracio/)\n\n# Installation\n\nYou can install the package from PyPI using `pip`:\n```bash\npip install meteocatpy\n```\n\n```bash\nfrom meteocatpy.town import MeteocatTown\n\n# Replace 'tu_api_key' with your actual API key\napi_key = \"tu_api_key\"\ntown_client = MeteocatTown(api_key)\n\n# Get a list of municipalities (asynchronous call)\nmunicipios_data = await town_client.get_municipis()\nprint(municipis)\n```\n\n# Credits\n\nThis is a personal project.\n\nAuthors:\n- Figorr\n\n# Contributing\n\nIf you would like to contribute to this project, please open an issue or create a pull request. I'd be happy to review your contributions!\n\n1. [Check for open features/bugs](https://gitlab.com/figorr/meteocatpy/issues)\n or [initiate a discussion on one](https://gitlab.com/figorr/meteocatpy/issues/new).\n2. [Fork the repository](https://gitlab.com/figorr/meteocatpy/forks/new).\n3. Install the dev environment: `make init`.\n4. Enter the virtual environment: `pipenv shell`\n5. Code your new feature or bug fix.\n6. Write a test that covers your new functionality.\n7. Update `README.md` with any new documentation.\n8. Run tests and ensure 100% code coverage for your contribution: `make coverage`\n9. Ensure you have no linting errors: `make lint`\n10. Ensure you have typed your code correctly: `make typing`\n11. Add yourself to `AUTHORS.md`.\n12. Submit a pull request!\n\n# License\n\n[Apache-2.0](LICENSE). By providing a contribution, you agree the contribution is licensed under Apache-2.0.\n\n# API Reference\n\n[See the docs \ud83d\udcda](https://apidocs.meteocat.gencat.cat/section/informacio-general/).",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Script para obtener datos meteorol\u00f3gicos de la API de Meteocat",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://gitlab.com/figorr/meteocatpy",
"Repository": "https://gitlab.com/figorr/meteocatpy"
},
"split_keywords": [
"meteocatpy",
" meteocat"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d92b2a856c80cc7f21c3eb8760aae84d8a8b00fab08931a3fe2ac4c27f9b34af",
"md5": "e9f1a73797d596d71600df0b11b89010",
"sha256": "34d6c54a7f84d80c1265909aaab5f166f1c06dc64e240d25706ed1cbc3a68a25"
},
"downloads": -1,
"filename": "meteocatpy-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e9f1a73797d596d71600df0b11b89010",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.12",
"size": 25645,
"upload_time": "2025-02-05T21:57:59",
"upload_time_iso_8601": "2025-02-05T21:57:59.193972Z",
"url": "https://files.pythonhosted.org/packages/d9/2b/2a856c80cc7f21c3eb8760aae84d8a8b00fab08931a3fe2ac4c27f9b34af/meteocatpy-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "627c54b859c7696606d7ff608f22f98cfa999aa9842226d3a1bbaf8e79c24a98",
"md5": "ddf4d75624cea3655e94a95cedccc3e9",
"sha256": "4162e17acff4620c20de13431fb0f901ff20a763dacad507e6e7a2d9aad38f0f"
},
"downloads": -1,
"filename": "meteocatpy-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "ddf4d75624cea3655e94a95cedccc3e9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.14,>=3.12",
"size": 13354,
"upload_time": "2025-02-05T21:58:00",
"upload_time_iso_8601": "2025-02-05T21:58:00.806011Z",
"url": "https://files.pythonhosted.org/packages/62/7c/54b859c7696606d7ff608f22f98cfa999aa9842226d3a1bbaf8e79c24a98/meteocatpy-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-05 21:58:00",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "figorr",
"gitlab_project": "meteocatpy",
"lcname": "meteocatpy"
}