Skip to main content

Script para obtener datos meteorológicos de la API de Meteocat

Project description

Meteocat Python Package for Meteocat Home Assistant Integration

License Python version compatibility pipeline status

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.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 or initiate a discussion on one.
  2. Fork the repository.
  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. By providing a contribution, you agree the contribution is licensed under Apache-2.0.

API Reference

See the docs 📚.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meteocatpy-0.0.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meteocatpy-0.0.0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file meteocatpy-0.0.0.tar.gz.

File metadata

  • Download URL: meteocatpy-0.0.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.7 Linux/5.15.154+

File hashes

Hashes for meteocatpy-0.0.0.tar.gz
Algorithm Hash digest
SHA256 123f5690013c12c4c3cca440e6192f2233520ed5fce2ab94860a9a02780e6e7a
MD5 519b8103b6e1f6ba47f631c7b63999e0
BLAKE2b-256 b861a7dc2455b0b2d61566dbc4c2e1f9ad87a994e5ea1eec96d81a26869f329f

See more details on using hashes here.

File details

Details for the file meteocatpy-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: meteocatpy-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.7 Linux/5.15.154+

File hashes

Hashes for meteocatpy-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e91fdaa756a14aa79f48e3501da50e27ccc61262f42f6023cce1f990aa7dd3a0
MD5 1b22ced0b94ddf87ef6fdaef1e04ef69
BLAKE2b-256 52394224c16c397b2e9a1e5ed081b561ede068540bcdadd2ae740d5d59906cbb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page