DEPO Delivery Service Bindings for Python
Python wrapper for DEPO's application interface. At the moment, it provides easy access to contracted places (input / output) and placing and canceling orders.
Detailed information of DEPO's API can be found at their website. If you feel like you need covering additional API methods, please open an issue or create a pull request.
Setup
You can install this package by using pip:
pip install depo
If you fancy pipenv use:
pipenv install depo
To install from source, run:
python setup.py install
For the API client to work you would need Python 2.7+ or Python 3.4+.
To install via requirements file from your project, add the following for the moment before updating dependencies:
git+git://github.com/palosopko/depo-python.git#egg=depo
Usage
First off, you need to require the library and provide authentication information by providing your user name and password do DEPO's admin interface
import depo
dibuk.api_credentials = ('email', 'password')
Getting contracted places is accomplished by calling depo.Place.all(). The method returns a list with depo.Place objects containing all the relevant details. Please note boolean properties is_input and is_output – if you are just trying to implement DEPO's service for your customers to get their orders, you will only be interested in the latter.
To place a new order you need to run depo.Order.create() with code of a place (or Place object), recipient's name, phone, email and order's amount, product amount and optionally an order reference. Method returns dictionary with delivery details including reference number under the number key.
Contributing
- Check for open issues or open a new issue for a feature request or a bug.
- Fork the repository and make your changes to the master branch (or branch off of it).
- Send a pull request.
Development
Run all tests on all supported Python versions:
make test
Run the linter with:
make lint
The client library uses Black for code formatting. Code must be formatted with Black before PRs are submitted. Run the formatter with:
make fmt
Changelog
v0.2.0: 30/09/2019
Python 3 compatibility for real, code formatting is covered by Black and various small fixes to make everything better and easier including first test.
v0.1.1: 04/04/2017
Fixes creating order from place's identifiers sent as unicode.
v0.1.0: 28/03/2017
Initial version with support for getting pickup places.
Release files for depo 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| depo-0.2.0.tar.gz | 6.2 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| depo-0.2.0-py3.7.egg | Legacy Egg format | - | - | Details |
| depo-0.2.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
| depo-0.2.0-py2.7.egg | Legacy Egg format | - | - | Details |
Total release size: 30.2 kB
Release files / depo-0.2.0.tar.gz
| Download URL | depo-0.2.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5e8791e9c66f770f7af56514b4f376e4cbe040bb7ad4f949b51559983b9cd6c
|
|
BLAKE2b-256 checksum How to use checksums |
7dab701a07eecf61990615d4b14c02471acaf3fbfa08d72cc36a1f36975e12fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16
|
Release files / depo-0.2.0-py3.7.egg
| Download URL | depo-0.2.0-py3.7.egg |
|---|---|
| Size | 8.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
e9442531e227c94ad9dc8ab3a039effbba08d852c6c960edc02e2228dd599c9d
|
|
BLAKE2b-256 checksum How to use checksums |
28f9d3e4328f6f00f888378f92999b77372f5f9f29573c995987125fb2b5a46a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16
|
Release files / depo-0.2.0-py2.py3-none-any.whl
| Download URL | depo-0.2.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
07dfbcebe246f891d9cf344763cf2507feaaea12b8aedadb8ca18f4d4d11d89e
|
|
BLAKE2b-256 checksum How to use checksums |
3da46ae1d5751bb94ab9d627daba9e1160ccfc5153797700b08063294e44d5ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16
|
Release files / depo-0.2.0-py2.7.egg
| Download URL | depo-0.2.0-py2.7.egg |
|---|---|
| Size | 9.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
21c010a37e7f3da83a699c0d2ceae5e74300510480aaf30aa9a9f875b983c3be
|
|
BLAKE2b-256 checksum How to use checksums |
9bd5ece4d0d1f6a0b32cc1d45010533d42dd533bb9d5f7fdba770d0e14004528
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/2.7.16
|