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.3.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.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: superweather-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 943e5c9de8d897ed3296dbd452a06ac21e54829415dfc1a5d16e9b0c0bd31f21
MD5 89363835254fd7c56a6b218d15931a95
BLAKE2b-256 740700279f2d581f72cb544bedfbb3220de1b3c2d255fbeb6d742cc4677c8ffa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: superweather-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 35bf546fb5b512ed53d2d743b40b7162331a9c1288c5c85836c514ecb0d8dce8
MD5 32c49a694bcaf1f2fd1789911c44f210
BLAKE2b-256 d4a8b0b0bf1c3f2a3a1d24c211a394b0cc20e94224f51781f0ab6d4e6d2c8ad5

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