Skip to main content

Python weather module with city validation

Project description

Relizene Weather

PyPI License Python

Simple and user-friendly Python module for fetching weather forecasts via the OpenWeatherMap API. Supports location validation using Nominatim and request caching. Features advanced city validation logic. For full details, refer to the documentation in the Doc folder.

Key Features Highlighted: Easy Integration: Straightforward access to OpenWeatherMap API.

Location Validation: Ensures accurate city/region names via Nominatim.

Caching: Reduces API calls by caching frequent requests.

Robust Validation: Sophisticated checks for city name accuracy and geolocation.

Documentation: Comprehensive guides and details available in the Doc folder.


🚀 Fast start

Installation

pip install relizene-weather

Usage example

python
from relizene_weather import main

Inicialization with API-key

fetcher = main.run_city(appid="You_Key_OPENWEATHERMAP")

recieve weather for city (automatic validation via Nominatim)
weather = main.run_city(city = "London")
print(weather)

📚 Documentation. Basic methods

run_cuty(location: str) -> WeatherData   returns an object with weather data. 
run_geo(location: str) -> str  returns an object with weather data. 

Examples with coordinates
python
weather = main.run_geo(lat=55.75, lon=37.61)

🛠️ For developers

Source installation 
bash
git clone https://github.com/relizene/Relizene_weather.git
cd Relizene_weather
pip install -e .

Tests run

bash pytest tests/ -v

🤝 How to help project

Fork repository
Create branches: git checkout -b feature/new-feature
Commit changes: git commit -m 'Add awesome feature'
Push branches: git push origin feature/new-feature
Create Pull Request

📜 License

Distributed under a license MIT. more detailed in LICENSE.

📧 Contacts

Reliz unknouwn – telegramm@Valodyaaa – email@vovaegorov689@gmail.com project in GitHub: https://github.com/relizene/Relizene_weather

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

relizene_weather-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

relizene_weather-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file relizene_weather-0.1.0.tar.gz.

File metadata

  • Download URL: relizene_weather-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for relizene_weather-0.1.0.tar.gz
Algorithm Hash digest
SHA256 315b4fa39c2dd235aa0570636c4bc9d927b04c2d0a4338ed18cd0ca5a989b654
MD5 14179b68c0f85eeaefe9cbf30cd0ec5d
BLAKE2b-256 c7b3df2f8e430e1a8bbfd266b8679784d655481b7c123e2447290b07b4538750

See more details on using hashes here.

File details

Details for the file relizene_weather-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for relizene_weather-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8a7cbc0dfa64639fb0dc9f14ab0588825976b21825a389ecbf496390471d7d0
MD5 ed8b007f2298db73ac5a7adf6607a0d8
BLAKE2b-256 84b3e029e9c6796bad9a8957e9f8fbb5ba3897a0733b612b59f64b17ce10a41b

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