Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/m-vdb/algolia-places-python

API wrapper for Algolia Places API
https://github.com/m-vdb/algolia-places-python

algolia-places api python3

Last synced: 2 months ago
JSON representation

API wrapper for Algolia Places API

Awesome Lists containing this project

README

        

# algolia-places-python
API wrapper for Algolia Places API. This module **only supports Python 3**.

[![Build Status](https://travis-ci.org/m-vdb/algolia-places-python.svg?branch=master)](https://travis-ci.org/m-vdb/algolia-places-python)
[![Coverage Status](https://coveralls.io/repos/github/m-vdb/algolia-places-python/badge.svg?branch=master)](https://coveralls.io/github/m-vdb/algolia-places-python?branch=master)
[![Pypi version](https://img.shields.io/pypi/v/algolia-places-python.svg)](https://pypi.python.org/pypi/algolia-places-python)

## Installation

```
$ pip install aloglia-places-python
```

## Usage

```python
from algolia_places import AlgoliaPlacesClient

client = AlgoliaPlacesClient('', '')

# set defaults for all calls
client.defaults(language='en', countries=['us'], type='city')

# do a search
resp = client.search('San Diego')

# do a search and override defaults
resp = client.search('San Diego', type='address')

# access results
for hit in resp.hits:
# do something with hit
pass
```

## How to

Publish on pypi:

```bash
$ python setup.py sdist upload
```