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

Uploaded Python 3

File details

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

File metadata

  • Download URL: superweather-0.1.2.tar.gz
  • Upload date:
  • Size: 3.0 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.2.tar.gz
Algorithm Hash digest
SHA256 416754c0c97ec06c30edf02033e5c3a5d3eaa2ed8cc547be6d1b6ff2ea8b87d9
MD5 0e9d43b2fa064820b3eedd3470511fea
BLAKE2b-256 087e7949244b09ddfcdd0e72d6f1d45a859ec8133c227f18f0ecc3d8180b5083

See more details on using hashes here.

File details

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

File metadata

  • Download URL: superweather-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a47e643c8d0704e7b8edf040a2031b50c5f2fff1aa68703e370d3c8874fc0089
MD5 5dfbc83909f6f296a12b248cc61f4d94
BLAKE2b-256 9f4e2852354ef533f4b6b45084e11f995a7a14c580b3cb519b4cf750fb797e78

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