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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superweather-0.1.1.tar.gz.
File metadata
- Download URL: superweather-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9e9532a14d7a357cf582c3679ec190c38472904f101c6031682a67b0859decc
|
|
| MD5 |
5b25d250b08676f82a201f8186f79d4b
|
|
| BLAKE2b-256 |
64737fa51a73c4a36fe4eab46dc382dadb2e0d8eaf6065fbda384ab920db19a9
|
File details
Details for the file superweather-0.1.1-py3-none-any.whl.
File metadata
- Download URL: superweather-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb998edff4025cecb2353620f2b9350d828ecfdd0aafd65e04db4ada4eb478ce
|
|
| MD5 |
be5c58c531d939a7a3724f3efdfb335e
|
|
| BLAKE2b-256 |
ec06c4deaefd0bb49d2fa1fb4f7577ccca7d6dfffe3cea595ee4ee3732f0dd2b
|