Install & Compatibility
Where this runs
tested against v0.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.174s · 17.9MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.156s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Overpass
✓ from overpy import Overpass
OverpassException
✓ from overpy import OverpassException
Initialize Overpass API, run a query, and iterate over results.
import overpy
api = overpy.Overpass()
result = api.query("""
node(50.745,7.17,50.75,7.18)["amenity"="restaurant"];
out body;
""")
for node in result.nodes:
print(f"Node ID: {node.id}, Tags: {node.tags}")
Errors
Common errors & fixes
overpy.exception.OverpassException: Error 429 Too Many Requests
Request rate limited by Overpass server.
fixAdd delays between queries (e.g., time.sleep(10)) or use a more generous rate limit.
TypeError: 'Node' object is not subscriptable
Using index notation on a Node result instead of .tags dictionary.
fixAccess tags via node.tags['key'] or node.tags.get('key') AttributeError: 'NoneType' object has no attribute 'tags'
Result element is None because the query returned no data.
fixCheck if result is None before accessing attributes, or handle in try/except.
Upgrade
Version history
0.7latest on PyPI · released Dec 4, 2023
Audit
Dependencies
No dependency data recorded yet.