LibLynx Python Library
Python Library to interact with LibLynx https://www.liblynx.com/
Usage example:
import liblynx
CLIENT_ID = "< your ID >"
CLIENT_SECRET = "< your SECRET >"
ll = liblynx.Connect(CLIENT_ID, CLIENT_SECRET)
# or just,
ll = liblynx.Connect() # Then the ENV Variables LIBLYNX_CLIENT_ID and LIBLYNX_CLIENT_SECRET are used
print(ll.access_token)
print(ll.endpoint)
# Note how the .access_token and .endpoint attribute access results in a cached lookup
identification1 = ll.new_identification("127.0.0.127", "https://example.com/foo/", "Python-LibLynx-Testing/0.1")
ll.api("new account", c.endpoint["_links"]["@new_account"]["href"], "POST", {"account_name":"Some Account", "subscriptions":[{"title":"Foo", "start": "2020-11-01 10:56:58", "end": "2020-12-01 10:56:58"}]})
The environment variable LIBLYNX_BASE is checked for specifying a BASE URL, for example:
export LIBLYNX_BASE=https://connect.liblynx.com
if not found it uses: https://sandbox.liblynx.com
Middlewares
This library currently contains some integraitons with popular frameworks, Django and Starlette.
Django
To use the middleware, add it to the django.conf.MIDDLEWARE entry in the Django project settings file.
If a request can be identified, the attached LibLynx account name is stored in the session under the key LIBLYNX_ACCOUNT and the account id is stored in LIBLYNX_ACCOUNT_ID
It is optional (and normally highly desirable) to add the following settings;
LIBLYNX_FETCH_PRODUCTS : this will retrieve all the Content Units for the identified account, and add it to the request session under the LIBLYNX_PRODUCTS key.
Starlette
Documentation in progress, this middleware is subject to modification. It might be desirable to unify the session-based account retrieval in the same way as the Django middleware.
Metadata
Release files for LibLynx 0.17
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 | |
|---|---|---|---|---|
| LibLynx-0.17.tar.gz | 7.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| LibLynx-0.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.8 kB
Release files / LibLynx-0.17.tar.gz
| Download URL | LibLynx-0.17.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
291813af0eeaf23f07664bb76c876c4463c77dd830a0178d871536b842ae6c22
|
|
BLAKE2b-256 checksum How to use checksums |
d9d319c5ff0b0fd71cc2fe334e70700bc36ba40d19f46cb36192810742b1361a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0
|
Release files / LibLynx-0.17-py3-none-any.whl
| Download URL | LibLynx-0.17-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d2aa4decd547b8098765c5f0ad7a9aa7c6534c442973c5f05642661070e3056
|
|
BLAKE2b-256 checksum How to use checksums |
4f1bc6d8b2f820287c08108c4efea842e3091db2644bbaea6c8ced7397c5a507
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.0
|
Security for LibLynx 0.17
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.