☀️ SkyPulse
Modern Python Weather Data Package with Async Support
A powerful Python library for weather data retrieval with both synchronous and asynchronous support.
✨ Features
🔄 Modern Python Design
- Full type hints support
- Async and sync operations
- Dataclass-style models
- Context managers
- Clean API interface
🌡️ Weather Data
- Current weather conditions
- Detailed forecasts
- Hourly predictions
- Astronomical data
- Wind information
⚡ Flexible Usage
- Sync/Async operations
- Custom API endpoints
- Format selection (j1/j2)
- Unit preferences
- Multi-location support
🛠️ Developer Experience
- Type safety
- Error handling
- Data validation
- Easy integration
- Modular design
🚀 Installation
📦 From PyPI
pip install skypulse
🔧 Development Installation
git clone https://github.com/HelpingAI/skypulse.git
cd skypulse
pip install -e .
📋 Requirements
- Python 3.7+
- Required packages:
requests>=2.28.2- HTTP requests for sync operationsaiohttp>=3.8.4- Async HTTP client
📖 Quick Start
🔄 Synchronous Usage
from skypulse import SkyPulse, UnitPreferences
# Initialize client
client = SkyPulse()
# Set unit preferences (optional)
client.set_units(UnitPreferences(
temperature="C",
wind_speed="kmh",
pressure="mb"
))
# Get current weather
current = client.get_current("London")
print(f"Temperature: {current.temperature_c}°C")
print(f"Condition: {current.condition.description}")
print(f"Wind: {current.wind_speed_kmh} km/h {current.wind_direction}")
print(f"Humidity: {current.humidity}%")
# Get forecast with hourly data
forecast = client.get_forecast("London")
for day in forecast.days:
print(f"\nDate: {day.date}")
print(f"Temperature: {day.min_temp_c}°C to {day.max_temp_c}°C")
print(f"Sunrise: {day.astronomy.sunrise}")
print(f"Sunset: {day.astronomy.sunset}")
# Hourly forecast
for hour in day.hourly:
print(f"\nTime: {hour.time}")
print(f"Temperature: {hour.temperature_c}°C")
print(f"Feels like: {hour.feels_like_c}°C")
print(f"Rain chance: {hour.rain_chance}%")
⚡ Asynchronous Usage
import asyncio
from skypulse import SkyPulse
async def compare_weather():
async with SkyPulse(async_mode=True) as client:
# Compare weather for multiple cities concurrently
cities = ["London", "New York", "Tokyo"]
tasks = [client.get_current_async(city) for city in cities]
results = await asyncio.gather(*tasks)
for city, weather in zip(cities, results):
print(f"\n{city}:")
print(f"Temperature: {weather.temperature_c}°C")
print(f"Condition: {weather.condition.description}")
print(f"Humidity: {weather.humidity}%")
# Run async code
asyncio.run(compare_weather())
📚 Core Features
Current Weather
- Real-time temperature and humidity
- Wind speed, direction, and gusts
- Atmospheric pressure
- Cloud cover and visibility
- Weather conditions with icons
Weather Forecast
- Multi-day weather forecasts
- Hourly predictions
- Temperature ranges
- Rain and snow chances
- Astronomical data (sunrise/sunset)
Location Support
- City name or coordinates
- Country and region info
- Latitude and longitude
- Population data
- Weather station URL
Unit Preferences
- Temperature (°C/°F)
- Wind speed (km/h, mph)
- Pressure (mb, in)
- Distance (km, miles)
- Precipitation (mm, in)
AI Analysis
- Real-time weather insights
- Natural language analysis
- Activity suggestions
- Weather pattern detection
- Streaming responses
- Cross-platform Unicode support
🤖 AI Usage
from skypulse.ai_weather import WeatherAnalyzer
# Initialize analyzer
analyzer = WeatherAnalyzer()
# Get AI analysis
analysis = analyzer.analyze_weather("Tokyo")
print(analysis)
# CLI usage
skypulse analyze --location "Tokyo"
📝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
📄 License
This project is licensed under the HelpingAI License v3.0 - see the LICENSE file for details.
Metadata
Release files for skypulse 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skypulse-1.1.0.tar.gz | 26.1 kB | Without provenance | Details for skypulse-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skypulse-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for skypulse-1.1.0-py3-none-any.whl |
Total release size: 46.7 kB
Release files / skypulse-1.1.0.tar.gz
| Download URL | skypulse-1.1.0.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bd584ac3db609e78b4a75e0f2563475a6cf387f054e0815fd6b5d8740682f08f
|
|
BLAKE2b-256 checksum How to use checksums |
50a328e275d85892869d6f705d082fbffd8bcea7c30affd8db51216b49f9d906
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Release files / skypulse-1.1.0-py3-none-any.whl
| Download URL | skypulse-1.1.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
697e4c6b92f9a688433b85269645fa9adfaf9c505ba94269f29090b5b702b002
|
|
BLAKE2b-256 checksum How to use checksums |
5c188df6d9c70231ae9bafe22051387f3200baea7c8b6c762c1116c912291c6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for skypulse 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.