File: changesets.py

package info (click to toggle)
python-osmapi 5.0.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 848 kB
  • sloc: python: 4,113; xml: 1,599; makefile: 46; sh: 14
file content (17 lines) | stat: -rw-r--r-- 308 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import osmapi
from pprint import pprint


api = osmapi.OsmApi(api="https://api06.dev.openstreetmap.org")


try:
    api.changeset_get(111111111111)
except osmapi.ApiError as e:
    print(f"Error: {e}")
    if e.status == 404:
        print("Changeset not found")


print("")
pprint(api.changeset_get(12345))