Modern Python weather data retrieval library with async support
Project description
☀️ 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
- Pydantic data models
- Context managers
- Rich CLI interface
🌡️ Comprehensive Weather Data
- Real-time conditions
- Multi-day forecasts
- Astronomical data
- Location information
- Weather alerts
⚡ Flexible Usage
- Sync/Async operations
- Custom API endpoints
- Format selection (j1/j2)
- Robust error handling
- Progress tracking
🛠️ Developer Experience
- Comprehensive docs
- Type safety
- IDE completion
- Example code
- Testing support
🚀 Installation
📖 Quick Start
🔄 Synchronous Usage
from skypulse import SkyPulse
# Initialize client
client = SkyPulse()
# Get current weather
current = client.get_current("London")
print(f"Temperature: {current.temperature_c}°C")
print(f"Condition: {current.condition.description}")
# Get forecast
forecast = client.get_forecast("London", days=3)
for day in forecast.days:
print(f"Date: {day.date}, Max: {day.max_temp_c}°C")
⚡ Asynchronous Usage
import asyncio
from skypulse import SkyPulse
async def get_weather():
async with SkyPulse(async_mode=True) as client:
# Get current weather
current = await client.get_current_async("London")
print(f"Temperature: {current.temperature_c}°C")
# Get forecast
forecast = await client.get_forecast_async("London", days=3)
for day in forecast.days:
print(f"Date: {day.date}, Max: {day.max_temp_c}°C")
# Run async code
asyncio.run(get_weather())
🖥️ CLI Usage
# Get current weather
skypulse "London"
# Get 5-day forecast
skypulse "London" --forecast --days 5
# Get detailed weather with alerts
skypulse "London" --detailed --alerts
# Export weather data to JSON
skypulse "London" --export weather.json
# Simple output format
skypulse "London" --simple
📚 Documentation
🔗 Links
🎯 Core Features
- Location Support: Search by city name, coordinates, or location ID
- Data Formats: Support for both j1 and j2 API response formats
- Error Handling: Comprehensive error handling with detailed messages
- Rate Limiting: Automatic rate limit handling with retries
- Caching: Optional response caching for improved performance
🔧 Configuration Options
Option | Type | Default | Description |
---|---|---|---|
format |
str | "j2" | API response format (j1/j2) |
async_mode |
bool | False | Enable async operations |
cache_ttl |
int | 300 | Cache TTL in seconds |
timeout |
int | 10 | Request timeout in seconds |
🛠️ Advanced Usage
- Custom Endpoints: Configure custom API endpoints
- Proxy Support: HTTP/HTTPS proxy configuration
- Response Parsing: Custom response parsing options
- Retry Strategy: Configurable retry mechanisms
🤝 Contributing
We welcome contributions! Here's how you can help:
- 🐛 Report Bugs: Open an issue
- 💡 Suggest Features: Share your ideas in issues
- 📝 Documentation: Help improve our docs
- 🔧 Code: Submit pull requests
Please read our Contributing Guide for details.
📊 Project Stats
📅 Release Schedule
- Stable Releases: Every 4-6 weeks
- Bug Fixes: As needed
- Security Updates: Within 48 hours
- View Release History
🔒 Security
Found a security issue? Please report it privately via:
📫 Contact
- Discord: Join our community
- Twitter: @HelpingAI
- Email: support@helpingai.com
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
skypulse-1.0.0.tar.gz
(18.6 kB
view details)
Built Distribution
skypulse-1.0.0-py3-none-any.whl
(15.2 kB
view details)
File details
Details for the file skypulse-1.0.0.tar.gz
.
File metadata
- Download URL: skypulse-1.0.0.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06bea7a049fdc14b77125dec1b195d5440143194a6b351d550b9afdfd3937124 |
|
MD5 | 038be101270afca36a1d6a4df3b6ffac |
|
BLAKE2b-256 | 9ea2935d33deff684daf569710270b615010a5e072a58ec0ec50e859c3d7410d |
File details
Details for the file skypulse-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: skypulse-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e58a56a5ddc902071433f04debd1f6c3b46b8bd624874d9ee887d03d6b7e849 |
|
MD5 | a460692594dfa6278789c3f70d88c72d |
|
BLAKE2b-256 | bbcf88e273871d263ba4591e3d190d5606606300310719a77bac57920d0a127d |