Skip to content

Commit fa4ae00

Browse files
committed
adding readme
1 parent 9d31157 commit fa4ae00

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Overpass API python wrapper
2+
3+
This is a thin wrapper around the OpenStreetMap [Overpass API](http://wiki.openstreetmap.org/wiki/Overpass_API).
4+
5+
## Use it
6+
7+
```
8+
>>> import Overpass
9+
>>> api = Overpass.API()
10+
>>> response = api.Get('[out:json];node["name":"Salt Lake City"];out body;')
11+
```
12+
13+
You will get your result as a dictionary, which (for now) represents the JSON output you would get [from the Overpass API directly](http://overpass-api.de/output_formats.html#json). So you could do this for example:
14+
15+
```
16+
>>> print [(feature['tags']['name'], feature['id']) for feature in response['elements']]
17+
[(u'Salt Lake City', 150935219), (u'Salt Lake City', 585370637), (u'Salt Lake City', 1615721573)]
18+
```
19+
20+
## Fork it
21+
22+
[Yes please](https://github.com/mvexel/overpass-api-python-wrapper/fork).

0 commit comments

Comments
 (0)