Name | kognic-auth JSON |
Version |
3.1.2
JSON |
| download |
home_page | |
Summary | Kognic Authentication |
upload_time | 2023-04-25 14:01:38 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.6 |
license | MIT |
keywords |
kognic
api
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Kognic Authentication
Python 3 library providing foundations for Kognic Authentication
on top of the `requests` or `httpx` libraries.
Install with `pip install kognic-auth[requests]` or `pip install kognic-auth[httpx]`
Builds on the standard OAuth 2.0 Client Credentials flow. There are a few ways to provide auth credentials to our api
clients. Kognic Python clients such as in `kognic-io` accept an `auth` parameter that
can be set explicitly or you can omit it and use environment variables.
There are a few ways to set your credentials in `auth`.
1. Set the environment variable `KOGNIC_CREDENTIALS` to point to your Api Credentials file.
The credentials will contain the Client Id and Client Secret.
2. Set to the credentials file path like `auth="~/.config/kognic/credentials.json"`
3. Set environment variables `KOGNIC_CLIENT_ID` and`KOGNIC_CLIENT_SECRET`
4. Set to credentials tuple `auth=(client_id, client_secret)`
API clients such as the `InputApiClient` accept this `auth` parameter.
Under the hood, they commonly use the AuthSession class which is implements a `requests` session with automatic token
refresh. An `httpx` implementation is also available.
```python
from kognic.auth.requests.auth_session import RequestsAuthSession
sess = RequestsAuthSession()
# make call to some Kognic service with your token. Use default requests
sess.get("https://api.app.kognic.com")
```
## Changelog
See Github releases from v3.1.0, historic changelog is available in CHANGELOG.md
Raw data
{
"_id": null,
"home_page": "",
"name": "kognic-auth",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "Kognic,API",
"author": "",
"author_email": "Kognic <michel.edkrantz@kognic.com>",
"download_url": "https://files.pythonhosted.org/packages/3e/81/6784d107bb63077e97db6d287e23c46695809fd33e068dac850f52de2fd2/kognic-auth-3.1.2.tar.gz",
"platform": null,
"description": "# Kognic Authentication\n\nPython 3 library providing foundations for Kognic Authentication\non top of the `requests` or `httpx` libraries.\n\nInstall with `pip install kognic-auth[requests]` or `pip install kognic-auth[httpx]` \n\nBuilds on the standard OAuth 2.0 Client Credentials flow. There are a few ways to provide auth credentials to our api\n clients. Kognic Python clients such as in `kognic-io` accept an `auth` parameter that\n can be set explicitly or you can omit it and use environment variables. \n\nThere are a few ways to set your credentials in `auth`. \n1. Set the environment variable `KOGNIC_CREDENTIALS` to point to your Api Credentials file. \nThe credentials will contain the Client Id and Client Secret.\n2. Set to the credentials file path like `auth=\"~/.config/kognic/credentials.json\"` \n3. Set environment variables `KOGNIC_CLIENT_ID` and`KOGNIC_CLIENT_SECRET`\n4. Set to credentials tuple `auth=(client_id, client_secret)` \n\nAPI clients such as the `InputApiClient` accept this `auth` parameter.\n\nUnder the hood, they commonly use the AuthSession class which is implements a `requests` session with automatic token\n refresh. An `httpx` implementation is also available. \n```python\nfrom kognic.auth.requests.auth_session import RequestsAuthSession\n\nsess = RequestsAuthSession()\n\n# make call to some Kognic service with your token. Use default requests \nsess.get(\"https://api.app.kognic.com\")\n```\n\n## Changelog\nSee Github releases from v3.1.0, historic changelog is available in CHANGELOG.md\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Kognic Authentication",
"version": "3.1.2",
"split_keywords": [
"kognic",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6ac95c70bef74e0848fbb89e0686d3cd9fef7ee7b2761598f756478da09edd43",
"md5": "bebdbb0fcbeb116c88ee0217a919077d",
"sha256": "17041bf92e9ec3f36975bede97a364a3725a7ca0ca142749cff35079342f6a7b"
},
"downloads": -1,
"filename": "kognic_auth-3.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bebdbb0fcbeb116c88ee0217a919077d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6971,
"upload_time": "2023-04-25T14:01:35",
"upload_time_iso_8601": "2023-04-25T14:01:35.743455Z",
"url": "https://files.pythonhosted.org/packages/6a/c9/5c70bef74e0848fbb89e0686d3cd9fef7ee7b2761598f756478da09edd43/kognic_auth-3.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3e816784d107bb63077e97db6d287e23c46695809fd33e068dac850f52de2fd2",
"md5": "e01cdbbfd71f4836c0e6c802847c13b1",
"sha256": "93eaf1ef3328fbd997933de0370d507256457fb588aba7c16d3ee150f0386e7f"
},
"downloads": -1,
"filename": "kognic-auth-3.1.2.tar.gz",
"has_sig": false,
"md5_digest": "e01cdbbfd71f4836c0e6c802847c13b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8230,
"upload_time": "2023-04-25T14:01:38",
"upload_time_iso_8601": "2023-04-25T14:01:38.487335Z",
"url": "https://files.pythonhosted.org/packages/3e/81/6784d107bb63077e97db6d287e23c46695809fd33e068dac850f52de2fd2/kognic-auth-3.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-04-25 14:01:38",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "kognic-auth"
}