# LNX Edge API Client
##### Written for Python ≥ 3.7
---
## Quickstart
Install using pip:
```shell
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 the `staging=True` flag. see below)
Then you're off:
```python
# 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 `dateRange` field. # TODO FIX THIS
- Timezone should _always_ be specified in the request body. `EdgeAPI._get_report(...)` defaults to
`America/New_York`, but can be overridden.
---
#### Test script:
```shell 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/
Raw data
{
"_id": null,
"home_page": "https://github.com/Lnmix/edge_api_client",
"name": "api-client-lnx-edge",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "Nick Tulli",
"author_email": "ntulli@leadnomics.com",
"download_url": "https://files.pythonhosted.org/packages/65/b1/66948978d4a65883bca77af2e42536a2ed39edefdf053ddec8611a6c5bb1/api-client-lnx-edge-0.3.8.tar.gz",
"platform": null,
"description": "# LNX Edge API Client\n##### Written for Python \u2265 3.7\n\n---\n\n## Quickstart\n\nInstall using pip:\n\n```shell\npip install api-client-lnx-edge\n```\n\nSet the following environment variables:\n\n- `EDGE_API_KEY`: your production API Key (will be looked up automatically on init)\n- `EDGE_STAGING_API_KEY`: your staging API Key (also will be looked up automatically on init, requires the use of the `staging=True` flag. see below)\n\n\nThen you're off:\n\n```python\n# import\nfrom edge_api_client import EdgeAPI\n\n# initialize\nedge = EdgeAPI() # uses the environment variable `EDGE_API_KEY`\n# or\nedge = EdgeAPI(api_key='XXX') # try not to do this, but if you have to...\n# or\nedge = EdgeAPI(staging=True) # uses the environment variable `EDGE_STAGING_API_KEY`, targets the staging backend\n# or\nedge = EdgeAPI(api_key='XXX', staging=True) # provide a staging API key and target staging backend\n\n# and you're off:\nresp = edge.get_offers()\n```\n\n\n#### Behavioral rules of thumb:\n\nWhen requesting a report:\n - Pass _date_ (YYYY-MM-DD) strings instead of _datetime_ strings (YYYY-MM-DDTHH:MM:SS.sss) to the `dateRange` field. # TODO FIX THIS\n - Timezone should _always_ be specified in the request body. `EdgeAPI._get_report(...)` defaults to \n `America/New_York`, but can be overridden.\n\n---\n\n#### Test script:\n```shell script\n(venv) > pytest -v\n```\n\n\nNow using marshmallow for data validation on the client-side, allowing users to either specify content as JSON or as \npython arguments for Create Offer endpoint.\n\n\nPackaging instructions found here: https://packaging.python.org/en/latest/tutorials/packaging-projects/ \n",
"bugtrack_url": null,
"license": null,
"summary": "Client for the LNX Edge API",
"version": "0.3.8",
"project_urls": {
"Homepage": "https://github.com/Lnmix/edge_api_client"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "34a8e9ff302ce8d0e2baaef1cae4e7848abff530eed7a7106600754741241768",
"md5": "70ea65ea1ff0d8c02540ed5937bddee2",
"sha256": "05b134621c9aa663146dba31e66746ae754d23fb59db80e115ee1836436f47be"
},
"downloads": -1,
"filename": "api_client_lnx_edge-0.3.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "70ea65ea1ff0d8c02540ed5937bddee2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 10132,
"upload_time": "2025-01-02T23:50:42",
"upload_time_iso_8601": "2025-01-02T23:50:42.435435Z",
"url": "https://files.pythonhosted.org/packages/34/a8/e9ff302ce8d0e2baaef1cae4e7848abff530eed7a7106600754741241768/api_client_lnx_edge-0.3.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "65b166948978d4a65883bca77af2e42536a2ed39edefdf053ddec8611a6c5bb1",
"md5": "e331f68799e3b1aefb5c3c2c906df69e",
"sha256": "5a10162430a882c9aca688cb4e29b63029c919fa65fe3b7a48ec45da48201756"
},
"downloads": -1,
"filename": "api-client-lnx-edge-0.3.8.tar.gz",
"has_sig": false,
"md5_digest": "e331f68799e3b1aefb5c3c2c906df69e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 9158,
"upload_time": "2025-01-02T23:51:06",
"upload_time_iso_8601": "2025-01-02T23:51:06.597609Z",
"url": "https://files.pythonhosted.org/packages/65/b1/66948978d4a65883bca77af2e42536a2ed39edefdf053ddec8611a6c5bb1/api-client-lnx-edge-0.3.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-02 23:51:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Lnmix",
"github_project": "edge_api_client",
"github_not_found": true,
"lcname": "api-client-lnx-edge"
}