A light Python wrapper around the METRC Web API
Project description
Python METRC
A light Python wrapper around the METRC Web API
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Installing
$ pip install python_metrc
Running the tests
cd python_metrc pytest
Documentation
To generate and call the endpoint - https://sandbox-api-ca.metrc.com/transfers/v1/delivery/packages/states - you can use any of the following combinations:
>>> from python_metrc import METRC
>>> metrc = METRC('https://sandbox-api-ca.metrc.com', vendor_key={VENDOR_KEY}, user_key={USER_KEY}, license_number={LICENSE_NUMBER})
>>> metrc.transfers('delivery').packages('states').get()
<Response [200]>
>>> metrc.transfers.delivery.packages('states').get()
<Response [200]>
>>> metrc.transfers.delivery.packages.states.get()
<Response [200]>
>>> metrc.transfers('delivery', 'packages', 'states').get()
<Response [200]>
The METRC class instance provides the GET, POST and DELETE HTTP methods as binded on itself. The return type is the requests module’s Response object.
Contributing
Please read the Contribution guidelines for details on our code of conduct, and the process for submitting pull requests to us.
License
This project is licensed under the MIT License - see the LICENSE file for details
Acknowledgments
Hammock - Used to generate RESTful URLs
History
0.1.2 (2018-09-26)
Convert main class to inherit from Hammock instead.
0.1.1 (2018-09-26)
Clean up unnecessary artefacts after setup.
0.1.0 (2018-09-26)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_metrc-0.1.4.tar.gz.
File metadata
- Download URL: python_metrc-0.1.4.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
193b7cc2fe292e3aac7e122cb4a92b793f9e90fc08d78a159a56065ee3aeaaf2
|
|
| MD5 |
00b8b35408776fd9f464cf2ea79dc0a0
|
|
| BLAKE2b-256 |
4ec3a990c16119a573bd773829a033170774d9d0d023ba2d4443182d0f72b436
|
File details
Details for the file python_metrc-0.1.4-py2.py3-none-any.whl.
File metadata
- Download URL: python_metrc-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f73c8e59035ccc210f88e011ba17dffbc9534987d81ca78cb74e05325f79b5c5
|
|
| MD5 |
c64e6910e54c1f31c330fd6a72fa7d24
|
|
| BLAKE2b-256 |
5c3d3e454a4175c7f0e992313591a9fe5e0bdd2e15323e176e6749e70c7189b2
|