New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

superweather

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superweather

A package to fetch and display air quality data.

0.3.2.4
PyPI
Maintainers
1

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()

موفق یاشد

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts