Skip to content

Commit 74f62b2

Browse files
committed
Merge remote-tracking branch 'mvexel/master' into feature/queries
2 parents 0f8d3f0 + 4dc36cb commit 74f62b2

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ This is a thin wrapper around the OpenStreetMap [Overpass API](http://wiki.opens
44

55
## Install it
66

7-
```
8-
python setup.py install
7+
```bash
8+
$ python setup.py install
99
```
1010

1111
The module is not on PyPi yet.
1212

1313
## Use it
1414

15-
```
15+
```python
1616
>>> from overpass import Overpass
1717
>>> api = Overpass.API()
1818
>>> response = api.Get('node["name"="Salt Lake City"]')
@@ -22,7 +22,7 @@ Note that you don't have to include any of the output meta statements. The wrapp
2222

2323
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:
2424

25-
```
25+
```python
2626
>>> print [(feature['tags']['name'], feature['id']) for feature in response['elements']]
2727
[(u'Salt Lake City', 150935219), (u'Salt Lake City', 585370637), (u'Salt Lake City', 1615721573)]
2828
```
@@ -35,13 +35,17 @@ The API takes a few parameters:
3535

3636
The default endpoint is `http://overpass-api.de/api/interpreter` but you can pass in the rambler instance (`http://overpass.osm.rambler.ru/cgi/interpreter`) or your own:
3737

38-
api = Overpass.API(endpoint=http://overpass.myserver/interpreter)
38+
```python
39+
api = Overpass.API(endpoint=http://overpass.myserver/interpreter)
40+
```
3941

4042
#### `timeout`
4143

4244
The default timeout is 25 seconds, but you can set it to whatever you want.
4345

44-
api = Overpass.API(timeout=600)
46+
```python
47+
api = Overpass.API(timeout=600)
48+
```
4549

4650
#### `debug`
4751

File renamed without changes.
File renamed without changes.
File renamed without changes.

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
requests==2.3.0
1+
requests>=2.3.0

0 commit comments

Comments
 (0)