Skip to main content

Seoul public data API client library.

Project description

Python API client library for Seoul Open Data Plaza (서울 열린데이터 광장).

Examples

Realtime subway position

>>> from seoul import Client
>>> seoul = Client()
>>> trains = seoul.get_subway_realtime_position('6호선')
>>> for train in trains:
...     print(f"{train.subway_name} {train.number}번 열차 @ {train.station_name}")
...
6호선 6265 열차 @ 화랑대(서울여대입구)
6호선 6271 열차 @ 이태원
6호선 6277 열차 @ 불광

Realtime city air quality

>>> from seoul import Client
>>> seoul = Client()
>>> measurements = seoul.get_air_realtime_city()
>>> for m in measurements:
...     print(f"AQI @ {m.region_name} {m.station_name}: {m.index_value}")
...
... AQI @ 도심권 중구: 55.0
... AQI @ 도심권 종로구: 55.0
... AQI @ 도심권 용산구: 53.0
... AQI @ 서북권 은평구: 51.0
... AQI @ 서북권 서대문구: 43.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for seoul, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size seoul-0.2.0-py3-none-any.whl (11.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size seoul-0.2.0.tar.gz (9.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page