Python wrapper for the Ometria API
Project description
=======
Ometria
=======
.. image:: https://badge.fury.io/py/ometria.png
:target: http://badge.fury.io/py/ometria
.. image:: https://travis-ci.org/nwjlyons/ometria.png?branch=master
:target: https://travis-ci.org/nwjlyons/ometria
.. image:: https://pypip.in/d/ometria/badge.png
:target: https://crate.io/packages/ometria?version=latest
Python wrapper for the `Ometria API`_.
Install
=======
::
pip install ometria
Usage
====
::
import ometria
client = ometria.Client(key="...", secret="...")
# GET /products?offset=10&limit=10
r = client.products.get(params={"offset":10, "limit":10})
r.response # Original response object from Python requests library.
r.data # Dictionary from HTTP response body.
# PUT /products/1234
client.products(1234).put(data={"url": "http://example.com",
"title": "T-shirt", "price": 5.99})
# POST /transactions/1234/lineitems
client.transactions(1234).lineitems.post(data={
"product_id": "blue_tshirt", "quantity": 3, "unit_price": 2.31, "subtotal": 14.32, "total": 6.04})
# POST /products/_bulk
client.products._bulk.post(data=[{"id": ""}, {"id": ""}])
.. _Ometria API: http://docs.ometria.com/Developers/
History
-------
1.0.0 (2019-03-14)
++++++++++++++++++
* Switched to v2 API
* Python 3 support (dropped Python 2)
0.1.0 (2014-04-23)
++++++++++++++++++
* First release on PyPI.
Ometria
=======
.. image:: https://badge.fury.io/py/ometria.png
:target: http://badge.fury.io/py/ometria
.. image:: https://travis-ci.org/nwjlyons/ometria.png?branch=master
:target: https://travis-ci.org/nwjlyons/ometria
.. image:: https://pypip.in/d/ometria/badge.png
:target: https://crate.io/packages/ometria?version=latest
Python wrapper for the `Ometria API`_.
Install
=======
::
pip install ometria
Usage
====
::
import ometria
client = ometria.Client(key="...", secret="...")
# GET /products?offset=10&limit=10
r = client.products.get(params={"offset":10, "limit":10})
r.response # Original response object from Python requests library.
r.data # Dictionary from HTTP response body.
# PUT /products/1234
client.products(1234).put(data={"url": "http://example.com",
"title": "T-shirt", "price": 5.99})
# POST /transactions/1234/lineitems
client.transactions(1234).lineitems.post(data={
"product_id": "blue_tshirt", "quantity": 3, "unit_price": 2.31, "subtotal": 14.32, "total": 6.04})
# POST /products/_bulk
client.products._bulk.post(data=[{"id": ""}, {"id": ""}])
.. _Ometria API: http://docs.ometria.com/Developers/
History
-------
1.0.0 (2019-03-14)
++++++++++++++++++
* Switched to v2 API
* Python 3 support (dropped Python 2)
0.1.0 (2014-04-23)
++++++++++++++++++
* First release on PyPI.
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
ometria-1.0.0.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file ometria-1.0.0.tar.gz
.
File metadata
- Download URL: ometria-1.0.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62b3152fcb5171a490a99beaaabb99c0438a94bda579a36caee7a2d083706c0b |
|
MD5 | 473866212ab7911f9ebe11797ab22470 |
|
BLAKE2b-256 | 00471d7cb872108749fba0bbbbfb5dc6100498e167f1e859cfa98655e4d247de |
File details
Details for the file ometria-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ometria-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5f9a775f6a8603bdd26738a85387533caaea5aeaecbec090361f0c17edabd38 |
|
MD5 | 40a17a9545c7bd7c3fedc7f425ccef9b |
|
BLAKE2b-256 | d8ca3bfcf6bfa42411a086a590c8411f175ca5bf39aacea062e20bac7b6a10c9 |