Skip to main content

thin wrapper of https://wiki.openstreetmap.org/wiki/API

Project description

Replaced

See osm_easy_api

Original readme

This is intended as a minimal wrapper over OSM Editing API, to make easy to understand what is going on.

It contains thin wrapper only for parts that I needed so far.

Run tests

python3 -m unittest

Usage examples

Object history

import thin_osm_api_wrapper
import json

object_type = "way"
object_id = 10101010
data = thin_osm_api_wrapper.api.history_json(object_type, object_id)
print(json.dumps(data, indent=3))

List changesets

import thin_osm_api_wrapper
import json

data = thin_osm_api_wrapper.api.changeset_list_json()
print(json.dumps(data, indent=3))
closed_after = "2021-12-26"
created_before = "2021-12-27"
data = thin_osm_api_wrapper.api.changeset_list_json(closed_after=closed_after, created_before=created_before)
print(json.dumps(data, indent=3))

Related projects

See also osm_bot_abstraction_layer and osmapi for other Python wrappers of OSM editing API.

Sister of taginfo equivalent.

Contributing

PRs are welcome!

pypi

See https://pypi.org/project/thin-osm-api-wrapper/

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

thin_osm_api_wrapper-0.0.4.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

thin_osm_api_wrapper-0.0.4-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page