Skip to main content

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

📦 From PyPI

pip install skypulse

🔧 Development Installation

git clone https://github.com/HelpingAI/skypulse.git
cd skypulse
pip install -e ".[dev]"

📋 Requirements

  • Python 3.7+
  • Required packages:
    • requests>=2.28.0
    • aiohttp>=3.8.0
    • pydantic>=1.9.0
    • rich>=12.0.0
    • typer>=0.7.0

📖 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:

  1. 🐛 Report Bugs: Open an issue
  2. 💡 Suggest Features: Share your ideas in issues
  3. 📝 Documentation: Help improve our docs
  4. 🔧 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

<style> .feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin: 2rem 0; } .feature-item { padding: 1rem; border: 1px solid #e1e4e8; border-radius: 6px; background: #ffffff; } .feature-item h3 { margin-top: 0; color: #0366d6; } .code-examples { margin: 2rem 0; } .documentation { margin: 2rem 0; } .contributing { margin: 2rem 0; } .installation-options { margin: 2rem 0; } </style>

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

skypulse-1.0.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

skypulse-1.0.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

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

Hashes for skypulse-1.0.0.tar.gz
Algorithm Hash digest
SHA256 06bea7a049fdc14b77125dec1b195d5440143194a6b351d550b9afdfd3937124
MD5 038be101270afca36a1d6a4df3b6ffac
BLAKE2b-256 9ea2935d33deff684daf569710270b615010a5e072a58ec0ec50e859c3d7410d

See more details on using hashes here.

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

Hashes for skypulse-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e58a56a5ddc902071433f04debd1f6c3b46b8bd624874d9ee887d03d6b7e849
MD5 a460692594dfa6278789c3f70d88c72d
BLAKE2b-256 bbcf88e273871d263ba4591e3d190d5606606300310719a77bac57920d0a127d

See more details on using hashes here.

Supported by

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