File: changesets.py

package info (click to toggle)
python-osmapi 3.1.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 760 kB
  • sloc: python: 3,340; xml: 1,591; makefile: 41; sh: 16
file content (14 lines) | stat: -rw-r--r-- 303 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import osmapi
from pprint import pprint

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

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

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