billomat.com API client
Project description
[![Travis CI build status](https://travis-ci.org/lociii/billomat.svg)](https://travis-ci.org/lociii/billomat)
Python client for the [billomat.com](http://www.billomat.com) [API](http://www.billomat.com/en/api/)
=====================================================================================================
The syntax of the client is inspired by the great [Django ORM](https://docs.djangoproject.com/en/dev/topics/db/queries/).
Example usage
--------------
```python
from billomat import models
from billomat.base import Client
Client.api_name = 'apiname'
Client.api_key = 'apikey'
# set optional app-id and -secret
Client.app_id = 'app_id'
Client.app_secret = 'app_secret'
articles = models.Article.objects.all()
for article in articles:
print unicode(article.title)
articles = articles.filter(title='Awesome')
for article in articles:
print unicode(article.title)
article = models.Article.objects.get(article_number=2)
article.title = u'This is an awesome article'
article.save()
article = models.Article.objects.create(
title=u'This is an awesome article',
)
article.delete()
```
Django support
---------------
Automatic client configuration by django config is supported
```python
BILLOMAT_API_NAME = 'aaa'
BILLOMAT_API_KEY = 'bbb'
BILLOMAT_APP_ID = 'ccc'
BILLOMAT_APP_SECRET = 'ddd'
```
The client sends 3 django signals:
- billomatclient_request, send before the request
- billomatclient_response, send after the request containing the response
- billomatclient_error, send after a request error containing the exception
Each signal sends a request_id which is a unique identifier (uuid4) for each request to track the status along the signal flow.
License
--------
[MIT](https://github.com/lociii/billomat/blob/master/LICENSE.md)
Python client for the [billomat.com](http://www.billomat.com) [API](http://www.billomat.com/en/api/)
=====================================================================================================
The syntax of the client is inspired by the great [Django ORM](https://docs.djangoproject.com/en/dev/topics/db/queries/).
Example usage
--------------
```python
from billomat import models
from billomat.base import Client
Client.api_name = 'apiname'
Client.api_key = 'apikey'
# set optional app-id and -secret
Client.app_id = 'app_id'
Client.app_secret = 'app_secret'
articles = models.Article.objects.all()
for article in articles:
print unicode(article.title)
articles = articles.filter(title='Awesome')
for article in articles:
print unicode(article.title)
article = models.Article.objects.get(article_number=2)
article.title = u'This is an awesome article'
article.save()
article = models.Article.objects.create(
title=u'This is an awesome article',
)
article.delete()
```
Django support
---------------
Automatic client configuration by django config is supported
```python
BILLOMAT_API_NAME = 'aaa'
BILLOMAT_API_KEY = 'bbb'
BILLOMAT_APP_ID = 'ccc'
BILLOMAT_APP_SECRET = 'ddd'
```
The client sends 3 django signals:
- billomatclient_request, send before the request
- billomatclient_response, send after the request containing the response
- billomatclient_error, send after a request error containing the exception
Each signal sends a request_id which is a unique identifier (uuid4) for each request to track the status along the signal flow.
License
--------
[MIT](https://github.com/lociii/billomat/blob/master/LICENSE.md)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
billomat-0.1.30.tar.gz
(10.6 kB
view details)
File details
Details for the file billomat-0.1.30.tar.gz
.
File metadata
- Download URL: billomat-0.1.30.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f344dcbf32d6a3f02969b6e41ce95182fabddfb141d09f093edc764a9da9d2ca |
|
MD5 | c35b64319f1c13d4e6fa76913ef02a20 |
|
BLAKE2b-256 | 36772ecda5f71cec104b816cce5d11d53adb61a87115d39dc053aa2cd7409ce3 |