Links Client - Python Implementation
Python client library for link-cli — implementation of Links Theory database.
Installation
Prerequisites
Install link-cli globally:
dotnet tool install --global clink
Package Installation
pip install -e .
Or install from the repository root:
cd python
pip install -e .
Usage
Basic Usage
from links_client import LinkDBService
db = LinkDBService('/path/to/database.links')
# Create a link
link = db.create_link(100, 200)
print(link) # {'id': 1, 'source': 100, 'target': 200}
# Read all links
links = db.read_all_links()
# Delete a link
db.delete_link(1)
Menu Storage
from links_client import MenuStorageService
menu_storage = MenuStorageService()
menu = [
{
"label": "Dashboard",
"icon": "pi pi-home",
"to": "/dashboard",
"items": [
{"label": "Analytics", "to": "/dashboard/analytics"}
]
}
]
menu_storage.store_menu_structure(menu, 0)
retrieved_menu = menu_storage.get_menu_structure(0)
Authentication Storage
from links_client import AuthStorageService
auth_storage = AuthStorageService()
# Create user
user = auth_storage.create_user({
"username": "alice",
"email": "alice@example.com"
})
# Set password
auth_storage.set_password(user['userId'], {
"hash": "hashed_password",
"salt": "random_salt"
})
API
For detailed API documentation, see the docs/ directory.
Examples
See examples in the examples/ directory:
basic_usage.py- Basic clink integration testsmenu_storage_example.py- Menu storage demonstrationauth_storage_example.py- Authentication storage demonstration
Testing
Run tests with pytest:
pytest tests/
License
The Unlicense
Links
- Source repository: https://github.com/link-foundation/links-client
- link-cli: https://github.com/link-foundation/link-cli
Metadata
Release files for links-client 1.0.0
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 | Actions |
|---|---|---|---|---|
| links_client-1.0.0.tar.gz | 16.6 kB | Without provenance | Details for links_client-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| links_client-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for links_client-1.0.0-py3-none-any.whl |
Total release size: 29.1 kB
Release files / links_client-1.0.0.tar.gz
| Download URL | links_client-1.0.0.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6927a4902757b30ae102e8e37be74f5ee63848bd2e322c985616d1d78459c321
|
|
BLAKE2b-256 checksum How to use checksums |
da09ee3b0fea125867ceecbc8e7ea68a78c20e45a554348b63fc7cd113d19a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / links_client-1.0.0-py3-none-any.whl
| Download URL | links_client-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd24103b222c85b647bae671291fde10f2481c0c2a5bd0e7f0148b6cf0ca474c
|
|
BLAKE2b-256 checksum How to use checksums |
1c11ca14eba52f9c71c1456472c139c6694b4650ff3221419fe61d6b07c28c33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for links-client 1.0.0
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.