Script para obtener datos meteorológicos de la API de Meteocat
Project description
Meteocat Python Package for Meteocat Home Assistant Integration
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:
pip install meteocatpy
from meteocatpy.client import MeteocatClient
# Replace 'tu_api_key' with your actual API key
api_key = "tu_api_key"
client = MeteocatClient(api_key)
# Get a list of municipalities (asynchronous call)
municipis = await 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!
- Check for open features/bugs or initiate a discussion on one.
- Fork the repository.
- Install the dev environment:
make init. - Enter the virtual environment:
pipenv shell - Code your new feature or bug fix.
- Write a test that covers your new functionality.
- Update
README.mdwith any new documentation. - Run tests and ensure 100% code coverage for your contribution:
make coverage - Ensure you have no linting errors:
make lint - Ensure you have typed your code correctly:
make typing - Add yourself to
AUTHORS.md. - Submit a pull request!
License
Apache-2.0. By providing a contribution, you agree the contribution is licensed under Apache-2.0.
API Reference
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file meteocatpy-0.0.1.tar.gz.
File metadata
- Download URL: meteocatpy-0.0.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54cd2c9fac396c2a4d971d7627b5fe552c3afad6cc2c732a96a697067622a132
|
|
| MD5 |
f16097096b7a3ad60360d7a8c80a1cbd
|
|
| BLAKE2b-256 |
23acf37d5782fffed800e07fabe3426cd26b311e0dd20d3b41a4fc88f1351397
|
File details
Details for the file meteocatpy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: meteocatpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/5.15.154+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cef946d0bdf9ed6e8fc1aa9615e09895f1ce8b97807ebb32e74ea69788aa994
|
|
| MD5 |
9c182243275c288844785c2331c707af
|
|
| BLAKE2b-256 |
207f5b94f006299b39d022f3fa6d541df5ca8a58d369cf408c6a9725e3211cb1
|