Skip to main content

Attune.co API Client

Project description

attune-python
==========

Attune (http://attune.co/) ranking api client for python.


What is Attune?
----------------

Attune instantly and automatically optimizes the presentation of your catalog items and marketing content.

Each visitor sees a site that is built uniquely for them every time.

More information at http://attune.co/.


Features
--------

This library supports synchronous and asynchronous api calls to attune.co ranking api. The library also includes robustness features such as circuit breaker and a thread pool based load limiting.


Requirements
------------

The attune-python client depends on:

* [requests](https://pypi.python.org/pypi/requests/) - Python HTTP for Humans.
* [six](https://pypi.python.org/pypi/six/) - Six is a Python 2 and 3 compatibility library.
* [certifi](https://pypi.python.org/pypi/certifi/) - Python package for providing Mozilla's CA Bundle.
* [python-dateutil](https://pypi.python.org/pypi/python-dateutil/) - Extensions to the standard Python datetime module.
* [pybreaker](https://pypi.python.org/pypi/pybreaker/) - Python implementation of the Circuit Breaker pattern.


Installation
------------

To install, simply:

```
pip install attune-python
```


Tests
-----

```
python setup.py test
```

If you want run tests, please use source code cloned version from https://github.com/attune-api/attune-python

Hello world
-----------

Library supports one Configuration object cross all created clients (Singleton pattern), but you can pass
your custom settings project to init function of client object.

```python
from attune.client.client import Client
from attune.client.configuration import Settings

config = Settings()
client = Client(config)

token = client.get_auth_token('#user#', '#key#')
```

For more detailed usage samples, please see tests folder.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attune-python-1.0.2.tar.gz (17.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page