Skip to main content

A package to fetch and display air quality data.

Project description

superweather

This Python package fetches air quality data for a specified city and provides various functionalities like displaying the data, speaking it aloud, and more.

Installation

You can install the package using pip:

pip install superweather

For use in terminal mode

  • By running this code, the terminal will be opened and you will find the city number from the list, and if the city name is not in the list, you can write the name of your city.
  • All cities in the world are supported
  • The next option says what information you want, temperature and humidity or all
  • will show you what you have chosen
from superweather import terminal_mode

terminal_mode()

The methods of this package for development and programming without a terminal

  • You must use this code for coding without a terminal
  • In this way, it is known that you give the name of the city and the next line you say it will not be displayed
from superweather import AirQualityData

aq = AirQualityData("tehran")
print(aq.get_full_info())
  • This shows all the codes
    • Output: json
{
    "city": "Tehran",
    "aqi": 85,  # Example AQI value
    "temperature": 10,  # Example temperature value in °C
    "humidity": 40,  # Example humidity value in %
    "air_pollution_level": "Moderate (متوسط)"
}
  • Get AQI Info:
print(aq.get_aqi_info())
AQI: 85 (Moderate (متوسط))
  • As well as the rest of the methods
print(aq.get_temperature_info())

print(aq.get_humidity_info())
  • And finally this method
    • This method reads the weather report
aq.speak_info()

good luck

________________________________________________________________________________________________________________________________________________________________

به زبان فارسی

superweather

این بسته پایتون داده‌های کیفیت هوا را برای یک شهر مشخص دریافت می‌کند و عملکردهای مختلفی مانند نمایش داده‌ها، صحبت کردن با صدای بلند و غیره را ارائه می‌کند.

نصب

می توانید بسته را با استفاده از pip نصب کنید:

pip install superweather

برای استفاده در حالت ترمینال

  • با اجرای این کد ترمینال باز می شود و شماره شهر را از لیست پیدا می کنید و اگر نام شهر در لیست نبود می توانید نام شهر خود را بنویسید.
  • تمام شهرهای جهان پشتیبانی می شوند
  • گزینه بعدی می گوید چه اطلاعاتی می خواهید، دما و رطوبت یا همه
  • آنچه را که انتخاب کرده اید به شما نشان می دهد
from superweather import terminal_mode

terminal_mode()

روش های این بسته برای توسعه و برنامه نویسی بدون ترمینال

  • برای کدنویسی بدون ترمینال باید از این کد استفاده کنید
  • همین جور معلوم است اسم شهر میدی و خط بعد نخوه نمایش میگی
from superweather import AirQualityData

aq = AirQualityData("tehran")
print(aq.get_full_info())
  • این همه کدها را نشان می دهد
    • خروجی: json
{
    "city": "Tehran",
    "aqi": 85,  # Example AQI value
    "temperature": 10,  # Example temperature value in °C
    "humidity": 40,  # Example humidity value in %
    "air_pollution_level": "Moderate (متوسط)"
}
  • اطلاعات AQI را دریافت کنید:
print(aq.get_aqi_info())
AQI: 85 (Moderate (متوسط))
  • همینطور بقیه روش ها
print(aq.get_temperature_info())

print(aq.get_humidity_info())
  • و در نهایت این روش
    • این روش گزارش آب و هوا را می خواند
aq.speak_info()

موفق یاشد

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

superweather-0.3.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

superweather-0.3.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file superweather-0.3.2.tar.gz.

File metadata

  • Download URL: superweather-0.3.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for superweather-0.3.2.tar.gz
Algorithm Hash digest
SHA256 026a171443f51595d727f64ec76af8f20f6c4b7f17674d2e1e0b965e32b27903
MD5 0b048f5189a8be62dd38ffa28317a6a0
BLAKE2b-256 1fa64bb88df78974de7e1774db7ff6ade37e505be8b581e49983433fb1346fd1

See more details on using hashes here.

File details

Details for the file superweather-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: superweather-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for superweather-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3a30355fc05aa214dc01a8f7ea9b7da1c8f01326fe6856fc27f03ac5d961f6ad
MD5 2839c53f1514529c789ae1f719addff3
BLAKE2b-256 e4109b4994493f2b735f163583b8a4c7252f42c962b9529a91db397e24ff10ab

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