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.1.4.tar.gz (5.3 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.1.4-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for superweather-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2d05a657695c60687b6c367142c9403a523874e148f25941cc8be37247bc1ee9
MD5 e6085c612236a1626fe439388c27e8b9
BLAKE2b-256 64b20d8945c2ab7321debe86762ac0635d869f2dc1107e61678b22e3ba99a553

See more details on using hashes here.

File details

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

File metadata

  • Download URL: superweather-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.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.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 02b5e8934a4202da1c7dccea6b0537a9f4868df17e2e09ebd44a00505305dc50
MD5 b31b23dc1bf33477e8733af0f8ca4adb
BLAKE2b-256 98dd5a2a3275d2b328e24160e37ee4350df57b60684f5bd33f8857e971e7f0b1

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