Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ This is a thin wrapper around the OpenStreetMap [Overpass API](http://wiki.opens

## Install it

```
python setup.py install
```bash
$ python setup.py install
```

The module is not on PyPi yet.

## Use it

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

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:

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

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:

api = Overpass.API(endpoint=http://overpass.myserver/interpreter)
```python
api = Overpass.API(endpoint=http://overpass.myserver/interpreter)
```

#### `timeout`

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

api = Overpass.API(timeout=600)
```python
api = Overpass.API(timeout=600)
```

#### `debug`

Expand Down