Python wrapper for getting air quality data from GIOŚ servers.
Project description
gios
Python wrapper for getting air quality data from GIOŚ (Główny Inspektorat Ochrony Środowiska)
How to find station_id
- go to http://powietrze.gios.gov.pl/pjp/current
- find on the map a measurement station located closest to your home
- go to "More infotmation" link
- look at site address, for ex. for this address https://powietrze.gios.gov.pl/pjp/current/station_details/table/10124/3/0
station_idis 10124
How to use package
"""Example for GIOS."""
import asyncio
import logging
from aiohttp import ClientError, ClientSession
from gios import ApiError, Gios, InvalidSensorsData, NoStationError
GIOS_STATION_ID = 568
logging.basicConfig(level=logging.DEBUG)
async def main() -> None:
"""Run main function."""
async with ClientSession() as websession:
gios = Gios(GIOS_STATION_ID, websession)
try:
data = await gios.async_update()
except (ApiError, NoStationError, InvalidSensorsData, ClientError) as error:
print(error)
return
latitude = gios.latitude
longitude = gios.longitude
station_name = gios.station_name
print(f"Longitude: {longitude}")
print(f"Latitude: {latitude}")
print(f"Station name: {station_name}")
print(data)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
How to create a dev environment
git clone https://github.com/bieniu/gios.git
cd gios
./scripts/setup-local-env.sh
Project details
Release history Release notifications | RSS feed
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 gios-7.1.1.tar.gz.
File metadata
- Download URL: gios-7.1.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d931c11220c5cf8f7be78799954296fb78e69d68c329df1bff6c2584c28c2983
|
|
| MD5 |
c45a9af5610166ffbdca7cbb3a423e18
|
|
| BLAKE2b-256 |
9947806d23dbf1b428844bc94e7da9ea767e4d776a4ae4a027b9b1bb68bb30b7
|
Provenance
The following attestation bundles were made for gios-7.1.1.tar.gz:
Publisher:
publish.yml on bieniu/gios
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gios-7.1.1.tar.gz -
Subject digest:
d931c11220c5cf8f7be78799954296fb78e69d68c329df1bff6c2584c28c2983 - Sigstore transparency entry: 2206449686
- Sigstore integration time:
-
Permalink:
bieniu/gios@f4697ce6aceb1b47c44124f6021dc90b192289ed -
Branch / Tag:
refs/tags/7.1.1 - Owner: https://github.com/bieniu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f4697ce6aceb1b47c44124f6021dc90b192289ed -
Trigger Event:
release
-
Statement type:
File details
Details for the file gios-7.1.1-py3-none-any.whl.
File metadata
- Download URL: gios-7.1.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b49e923fce0e035b30fa96c607c000c8d938073ec7820edaa664822add22830
|
|
| MD5 |
35248853d18ce0f3316c5633c223b85c
|
|
| BLAKE2b-256 |
8f44a23d497fa4d98a5e46167f501d3f0ffc0db3448fb4fc0f2a45ac2d4e04a9
|
Provenance
The following attestation bundles were made for gios-7.1.1-py3-none-any.whl:
Publisher:
publish.yml on bieniu/gios
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gios-7.1.1-py3-none-any.whl -
Subject digest:
1b49e923fce0e035b30fa96c607c000c8d938073ec7820edaa664822add22830 - Sigstore transparency entry: 2206449960
- Sigstore integration time:
-
Permalink:
bieniu/gios@f4697ce6aceb1b47c44124f6021dc90b192289ed -
Branch / Tag:
refs/tags/7.1.1 - Owner: https://github.com/bieniu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f4697ce6aceb1b47c44124f6021dc90b192289ed -
Trigger Event:
release
-
Statement type: