LNX Edge API Client
Written for Python ≥ 3.7
Quickstart
Install using pip:
pip install api-client-lnx-edge
Set the following environment variables:
EDGE_API_KEY: your production API Key (will be looked up automatically on init)EDGE_STAGING_API_KEY: your staging API Key (also will be looked up automatically on init, requires the use of thestaging=Trueflag. see below)
Then you're off:
# import
from edge_api_client import EdgeAPI
# initialize
edge = EdgeAPI() # uses the environment variable `EDGE_API_KEY`
# or
edge = EdgeAPI(api_key='XXX') # try not to do this, but if you have to...
# or
edge = EdgeAPI(staging=True) # uses the environment variable `EDGE_STAGING_API_KEY`, targets the staging backend
# or
edge = EdgeAPI(api_key='XXX', staging=True) # provide a staging API key and target staging backend
# and you're off:
resp = edge.get_offers()
Behavioral rules of thumb:
When requesting a report:
- Pass date (YYYY-MM-DD) strings instead of datetime strings (YYYY-MM-DDTHH:MM:SS.sss) to the
dateRangefield. # TODO FIX THIS - Timezone should always be specified in the request body.
EdgeAPI._get_report(...)defaults toAmerica/New_York, but can be overridden.
Test script:
(venv) > pytest -v
Now using marshmallow for data validation on the client-side, allowing users to either specify content as JSON or as python arguments for Create Offer endpoint.
Packaging instructions found here: https://packaging.python.org/en/latest/tutorials/packaging-projects/
Metadata
Release files for api-client-lnx-edge 0.3.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| api-client-lnx-edge-0.3.11.tar.gz | 9.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| api_client_lnx_edge-0.3.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.0 kB
Release files / api-client-lnx-edge-0.3.11.tar.gz
| Download URL | api-client-lnx-edge-0.3.11.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a95231c7b1fff58e9d2889030c4d3e2ad1de11f6ec8bdc0da13fe1d038f9d70
|
|
BLAKE2b-256 checksum How to use checksums |
f866a118fbc8025846fd7e36d25edca6adab950ad4e28aafa2ace379d15cded3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.17
|
Release files / api_client_lnx_edge-0.3.11-py3-none-any.whl
| Download URL | api_client_lnx_edge-0.3.11-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfd0fe72fb32efa1d99b2551847c468cd0f307cefc4ae1e6bb22ea6b6d79da02
|
|
BLAKE2b-256 checksum How to use checksums |
23933f1e2f12c6044c712ce8b12b963764381577990b98d07c3c5b2c5fa1f8fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.17
|
Security for api-client-lnx-edge 0.3.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.