<div align="center">
# ☀️ SkyPulse
<h3>Modern Python Weather Data Package with Async Support</h3>
<div align="center">
<a href="https://pypi.org/project/skypulse/">
<img src="https://img.shields.io/pypi/v/skypulse.svg" alt="PyPI version">
</a>
<a href="https://pypi.org/project/skypulse/">
<img src="https://img.shields.io/pypi/pyversions/skypulse.svg" alt="Python versions">
</a>
<a href="https://github.com/HelpingAI/skypulse/actions">
<img src="https://github.com/HelpingAI/skypulse/workflows/tests/badge.svg" alt="Tests">
</a>
<a href="https://codecov.io/gh/HelpingAI/skypulse">
<img src="https://codecov.io/gh/HelpingAI/skypulse/branch/main/graph/badge.svg" alt="Coverage">
</a>
<a href="https://github.com/psf/black">
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
</a>
<a href="https://pycqa.github.io/isort/">
<img src="https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336" alt="Imports: isort">
</a>
<a href="https://mypy.readthedocs.io/">
<img src="https://img.shields.io/badge/type%20hints-mypy-blue.svg" alt="Type Hints: mypy">
</a>
<a href="https://github.com/HelpingAI/skypulse/blob/main/LICENSE.md">
<img src="https://img.shields.io/github/license/HelpingAI/skypulse.svg" alt="License">
</a>
<a href="https://github.com/HelpingAI/skypulse/stargazers">
<img src="https://img.shields.io/github/stars/HelpingAI/skypulse.svg" alt="GitHub stars">
</a>
<a href="https://pepy.tech/project/skypulse">
<img src="https://pepy.tech/badge/skypulse" alt="Downloads">
</a>
<a href="https://discord.gg/helpingai">
<img src="https://img.shields.io/discord/1234567890?color=7289da&label=Discord&logo=discord&logoColor=white" alt="Discord">
</a>
</div>
<p align="center">
<i>A powerful Python library for weather data retrieval with both synchronous and asynchronous support.</i>
</p>
<div align="center">
<h3>
<a href="#features">Features</a> •
<a href="#installation">Installation</a> •
<a href="#quick-start">Quick Start</a> •
<a href="#documentation">Documentation</a> •
<a href="#contributing">Contributing</a>
</h3>
</div>
</div>
## ✨ Features
<div class="grid">
<div class="feature">
<h3>🔄 Modern Python Design</h3>
<ul>
<li>Full type hints support</li>
<li>Async and sync operations</li>
<li>Dataclass-style models</li>
<li>Context managers</li>
<li>Clean API interface</li>
</ul>
</div>
<div class="feature">
<h3>🌡️ Weather Data</h3>
<ul>
<li>Current weather conditions</li>
<li>Detailed forecasts</li>
<li>Hourly predictions</li>
<li>Astronomical data</li>
<li>Wind information</li>
</ul>
</div>
<div class="feature">
<h3>⚡ Flexible Usage</h3>
<ul>
<li>Sync/Async operations</li>
<li>Custom API endpoints</li>
<li>Format selection (j1/j2)</li>
<li>Unit preferences</li>
<li>Multi-location support</li>
</ul>
</div>
<div class="feature">
<h3>🛠️ Developer Experience</h3>
<ul>
<li>Type safety</li>
<li>Error handling</li>
<li>Data validation</li>
<li>Easy integration</li>
<li>Modular design</li>
</ul>
</div>
</div>
## 🚀 Installation
### 📦 From PyPI
```bash
pip install skypulse
```
### 🔧 Development Installation
```bash
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 operations
- `aiohttp>=3.8.4` - Async HTTP client
## 📖 Quick Start
### 🔄 Synchronous Usage
```python
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
```python
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
```python
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](LICENSE.md) file for details.
<div align="center">
---
<p>
Made with ❤️ by <a href="https://github.com/HelpingAI">HelpingAI</a>
</p>
<p>
<a href="https://github.com/HelpingAI/skypulse/blob/main/LICENSE.md">HelpingAI License</a> •
<a href="https://github.com/HelpingAI/skypulse/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a> •
<a href="https://github.com/HelpingAI/skypulse/blob/main/SECURITY.md">Security Policy</a>
</p>
</div>
Raw data
{
"_id": null,
"home_page": "https://github.com/HelpingAI/skypulse",
"name": "skypulse",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "weather, wttr.in, async, api, climate, forecast, meteorology, python, ai, artificial-intelligence, machine-learning, nlp, natural-language-processing, weather-analysis, weather-ai, weather-forecast, weather-data, weather-api, asyncio, real-time, openai, helpingai",
"author": "HelpingAI",
"author_email": "helpingai5@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/50/a3/28e275d85892869d6f705d082fbffd8bcea7c30affd8db51216b49f9d906/skypulse-1.1.0.tar.gz",
"platform": null,
"description": "<div align=\"center\">\r\n\r\n# \u2600\ufe0f SkyPulse\r\n\r\n<h3>Modern Python Weather Data Package with Async Support</h3>\r\n\r\n<div align=\"center\">\r\n <a href=\"https://pypi.org/project/skypulse/\">\r\n <img src=\"https://img.shields.io/pypi/v/skypulse.svg\" alt=\"PyPI version\">\r\n </a>\r\n <a href=\"https://pypi.org/project/skypulse/\">\r\n <img src=\"https://img.shields.io/pypi/pyversions/skypulse.svg\" alt=\"Python versions\">\r\n </a>\r\n <a href=\"https://github.com/HelpingAI/skypulse/actions\">\r\n <img src=\"https://github.com/HelpingAI/skypulse/workflows/tests/badge.svg\" alt=\"Tests\">\r\n </a>\r\n <a href=\"https://codecov.io/gh/HelpingAI/skypulse\">\r\n <img src=\"https://codecov.io/gh/HelpingAI/skypulse/branch/main/graph/badge.svg\" alt=\"Coverage\">\r\n </a>\r\n <a href=\"https://github.com/psf/black\">\r\n <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" alt=\"Code style: black\">\r\n </a>\r\n <a href=\"https://pycqa.github.io/isort/\">\r\n <img src=\"https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336\" alt=\"Imports: isort\">\r\n </a>\r\n <a href=\"https://mypy.readthedocs.io/\">\r\n <img src=\"https://img.shields.io/badge/type%20hints-mypy-blue.svg\" alt=\"Type Hints: mypy\">\r\n </a>\r\n <a href=\"https://github.com/HelpingAI/skypulse/blob/main/LICENSE.md\">\r\n <img src=\"https://img.shields.io/github/license/HelpingAI/skypulse.svg\" alt=\"License\">\r\n </a>\r\n <a href=\"https://github.com/HelpingAI/skypulse/stargazers\">\r\n <img src=\"https://img.shields.io/github/stars/HelpingAI/skypulse.svg\" alt=\"GitHub stars\">\r\n </a>\r\n <a href=\"https://pepy.tech/project/skypulse\">\r\n <img src=\"https://pepy.tech/badge/skypulse\" alt=\"Downloads\">\r\n </a>\r\n <a href=\"https://discord.gg/helpingai\">\r\n <img src=\"https://img.shields.io/discord/1234567890?color=7289da&label=Discord&logo=discord&logoColor=white\" alt=\"Discord\">\r\n </a>\r\n</div>\r\n\r\n<p align=\"center\">\r\n <i>A powerful Python library for weather data retrieval with both synchronous and asynchronous support.</i>\r\n</p>\r\n\r\n<div align=\"center\">\r\n <h3>\r\n <a href=\"#features\">Features</a> \u2022\r\n <a href=\"#installation\">Installation</a> \u2022\r\n <a href=\"#quick-start\">Quick Start</a> \u2022\r\n <a href=\"#documentation\">Documentation</a> \u2022\r\n <a href=\"#contributing\">Contributing</a>\r\n </h3>\r\n</div>\r\n\r\n</div>\r\n\r\n## \u2728 Features\r\n\r\n<div class=\"grid\">\r\n <div class=\"feature\">\r\n <h3>\ud83d\udd04 Modern Python Design</h3>\r\n <ul>\r\n <li>Full type hints support</li>\r\n <li>Async and sync operations</li>\r\n <li>Dataclass-style models</li>\r\n <li>Context managers</li>\r\n <li>Clean API interface</li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"feature\">\r\n <h3>\ud83c\udf21\ufe0f Weather Data</h3>\r\n <ul>\r\n <li>Current weather conditions</li>\r\n <li>Detailed forecasts</li>\r\n <li>Hourly predictions</li>\r\n <li>Astronomical data</li>\r\n <li>Wind information</li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"feature\">\r\n <h3>\u26a1 Flexible Usage</h3>\r\n <ul>\r\n <li>Sync/Async operations</li>\r\n <li>Custom API endpoints</li>\r\n <li>Format selection (j1/j2)</li>\r\n <li>Unit preferences</li>\r\n <li>Multi-location support</li>\r\n </ul>\r\n </div>\r\n\r\n <div class=\"feature\">\r\n <h3>\ud83d\udee0\ufe0f Developer Experience</h3>\r\n <ul>\r\n <li>Type safety</li>\r\n <li>Error handling</li>\r\n <li>Data validation</li>\r\n <li>Easy integration</li>\r\n <li>Modular design</li>\r\n </ul>\r\n </div>\r\n</div>\r\n\r\n## \ud83d\ude80 Installation\r\n\r\n### \ud83d\udce6 From PyPI\r\n```bash\r\npip install skypulse\r\n```\r\n\r\n### \ud83d\udd27 Development Installation\r\n```bash\r\ngit clone https://github.com/HelpingAI/skypulse.git\r\ncd skypulse\r\npip install -e .\r\n```\r\n\r\n### \ud83d\udccb Requirements\r\n\r\n- Python 3.7+\r\n- Required packages:\r\n - `requests>=2.28.2` - HTTP requests for sync operations\r\n - `aiohttp>=3.8.4` - Async HTTP client\r\n\r\n## \ud83d\udcd6 Quick Start\r\n\r\n### \ud83d\udd04 Synchronous Usage\r\n```python\r\nfrom skypulse import SkyPulse, UnitPreferences\r\n\r\n# Initialize client\r\nclient = SkyPulse()\r\n\r\n# Set unit preferences (optional)\r\nclient.set_units(UnitPreferences(\r\n temperature=\"C\",\r\n wind_speed=\"kmh\",\r\n pressure=\"mb\"\r\n))\r\n\r\n# Get current weather\r\ncurrent = client.get_current(\"London\")\r\nprint(f\"Temperature: {current.temperature_c}\u00b0C\")\r\nprint(f\"Condition: {current.condition.description}\")\r\nprint(f\"Wind: {current.wind_speed_kmh} km/h {current.wind_direction}\")\r\nprint(f\"Humidity: {current.humidity}%\")\r\n\r\n# Get forecast with hourly data\r\nforecast = client.get_forecast(\"London\")\r\nfor day in forecast.days:\r\n print(f\"\\nDate: {day.date}\")\r\n print(f\"Temperature: {day.min_temp_c}\u00b0C to {day.max_temp_c}\u00b0C\")\r\n print(f\"Sunrise: {day.astronomy.sunrise}\")\r\n print(f\"Sunset: {day.astronomy.sunset}\")\r\n \r\n # Hourly forecast\r\n for hour in day.hourly:\r\n print(f\"\\nTime: {hour.time}\")\r\n print(f\"Temperature: {hour.temperature_c}\u00b0C\")\r\n print(f\"Feels like: {hour.feels_like_c}\u00b0C\")\r\n print(f\"Rain chance: {hour.rain_chance}%\")\r\n```\r\n\r\n### \u26a1 Asynchronous Usage\r\n```python\r\nimport asyncio\r\nfrom skypulse import SkyPulse\r\n\r\nasync def compare_weather():\r\n async with SkyPulse(async_mode=True) as client:\r\n # Compare weather for multiple cities concurrently\r\n cities = [\"London\", \"New York\", \"Tokyo\"]\r\n tasks = [client.get_current_async(city) for city in cities]\r\n results = await asyncio.gather(*tasks)\r\n \r\n for city, weather in zip(cities, results):\r\n print(f\"\\n{city}:\")\r\n print(f\"Temperature: {weather.temperature_c}\u00b0C\")\r\n print(f\"Condition: {weather.condition.description}\")\r\n print(f\"Humidity: {weather.humidity}%\")\r\n\r\n# Run async code\r\nasyncio.run(compare_weather())\r\n```\r\n\r\n## \ud83d\udcda Core Features\r\n\r\n### Current Weather\r\n- Real-time temperature and humidity\r\n- Wind speed, direction, and gusts\r\n- Atmospheric pressure\r\n- Cloud cover and visibility\r\n- Weather conditions with icons\r\n\r\n### Weather Forecast\r\n- Multi-day weather forecasts\r\n- Hourly predictions\r\n- Temperature ranges\r\n- Rain and snow chances\r\n- Astronomical data (sunrise/sunset)\r\n\r\n### Location Support\r\n- City name or coordinates\r\n- Country and region info\r\n- Latitude and longitude\r\n- Population data\r\n- Weather station URL\r\n\r\n### Unit Preferences\r\n- Temperature (\u00b0C/\u00b0F)\r\n- Wind speed (km/h, mph)\r\n- Pressure (mb, in)\r\n- Distance (km, miles)\r\n- Precipitation (mm, in)\r\n\r\n### AI Analysis\r\n- Real-time weather insights\r\n- Natural language analysis\r\n- Activity suggestions\r\n- Weather pattern detection\r\n- Streaming responses\r\n- Cross-platform Unicode support\r\n\r\n## \ud83e\udd16 AI Usage\r\n```python\r\nfrom skypulse.ai_weather import WeatherAnalyzer\r\n\r\n# Initialize analyzer\r\nanalyzer = WeatherAnalyzer()\r\n\r\n# Get AI analysis\r\nanalysis = analyzer.analyze_weather(\"Tokyo\")\r\nprint(analysis)\r\n\r\n# CLI usage\r\nskypulse analyze --location \"Tokyo\"\r\n```\r\n\r\n## \ud83d\udcdd Contributing\r\n\r\nContributions 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.\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the HelpingAI License v3.0 - see the [LICENSE](LICENSE.md) file for details.\r\n\r\n<div align=\"center\">\r\n\r\n---\r\n\r\n<p>\r\n Made with \u2764\ufe0f by <a href=\"https://github.com/HelpingAI\">HelpingAI</a>\r\n</p>\r\n\r\n<p>\r\n <a href=\"https://github.com/HelpingAI/skypulse/blob/main/LICENSE.md\">HelpingAI License</a> \u2022\r\n <a href=\"https://github.com/HelpingAI/skypulse/blob/main/CODE_OF_CONDUCT.md\">Code of Conduct</a> \u2022\r\n <a href=\"https://github.com/HelpingAI/skypulse/blob/main/SECURITY.md\">Security Policy</a>\r\n</p>\r\n\r\n</div>\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Modern Python weather data retrieval library with async support and AI analysis",
"version": "1.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/HelpingAI/skypulse/issues",
"Changelog": "https://github.com/HelpingAI/skypulse/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/HelpingAI/skypulse#readme",
"Homepage": "https://github.com/HelpingAI/skypulse",
"Source": "https://github.com/HelpingAI/skypulse"
},
"split_keywords": [
"weather",
" wttr.in",
" async",
" api",
" climate",
" forecast",
" meteorology",
" python",
" ai",
" artificial-intelligence",
" machine-learning",
" nlp",
" natural-language-processing",
" weather-analysis",
" weather-ai",
" weather-forecast",
" weather-data",
" weather-api",
" asyncio",
" real-time",
" openai",
" helpingai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5c188df6d9c70231ae9bafe22051387f3200baea7c8b6c762c1116c912291c6b",
"md5": "8198df271ae59aa2bfd024166f7a47c0",
"sha256": "697e4c6b92f9a688433b85269645fa9adfaf9c505ba94269f29090b5b702b002"
},
"downloads": -1,
"filename": "skypulse-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8198df271ae59aa2bfd024166f7a47c0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 20519,
"upload_time": "2024-11-19T05:10:48",
"upload_time_iso_8601": "2024-11-19T05:10:48.427329Z",
"url": "https://files.pythonhosted.org/packages/5c/18/8df6d9c70231ae9bafe22051387f3200baea7c8b6c762c1116c912291c6b/skypulse-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "50a328e275d85892869d6f705d082fbffd8bcea7c30affd8db51216b49f9d906",
"md5": "007e771e1e9908c58ea33d9555bfa55b",
"sha256": "bd584ac3db609e78b4a75e0f2563475a6cf387f054e0815fd6b5d8740682f08f"
},
"downloads": -1,
"filename": "skypulse-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "007e771e1e9908c58ea33d9555bfa55b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26136,
"upload_time": "2024-11-19T05:10:51",
"upload_time_iso_8601": "2024-11-19T05:10:51.091900Z",
"url": "https://files.pythonhosted.org/packages/50/a3/28e275d85892869d6f705d082fbffd8bcea7c30affd8db51216b49f9d906/skypulse-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-19 05:10:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "HelpingAI",
"github_project": "skypulse",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "skypulse"
}