Unilink Python Client
Overview
This document provides instructions for the Python client used to connect to the Unilink web service. The Unilink service receives text requests, processes them through artificial intelligence programs, and returns text responses.
Connection and Setup
To use the client, you must provide an access token and the base web address. Every request requires this access token, which is placed in the request headers automatically by the client.
The client verifies the connection upon creation. It returns a 403 error if the token is incorrect. It returns a connection error if the web address is incorrect.
Client Functions
The client provides the following functions to interact with the service:
send_message(user_id, message): Sends a user text request to the service and returns a generated answer. This function has a 120-second timeout.get_history(user_id): Returns a list of saved text records for a specific user.clear_history(user_id): Deletes all saved text records for a specific user.get_user(user_id): Retrieves stored information for a specific user. It returns nothing if the user is not found.create_user(user_id): Adds a new user to the database.update_user(user_id, new_user_id, content): Modifies existing information for a user. This includes changing their identification number or updating their data content.delete_user(user_id): Removes a user from the database.
Data Structures
The client receives data organized into the following structures:
- UserData: Contains the user details, including name, phone, email, address, city, problem_summary, and preferences.
- User: Contains the system identification number, unit identification number, external identification string, the user data content, and a timestamp.
- MessageResponse: Contains the text response from the artificial intelligence and the user information.
- Message: Contains the message identification number, user identification number, the text content, and a timestamp. The content is automatically converted from text format into a dictionary.
I can generate executable code examples demonstrating how to initialize the client and call these specific functions.
Metadata
Release files for unilink-lib 1.2.1
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 |
|---|---|---|---|---|
| unilink_lib-1.2.1.tar.gz | 6.3 kB | Without provenance | Details for unilink_lib-1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unilink_lib-1.2.1-py3-none-any.whl | Python 3 | none | any | Details for unilink_lib-1.2.1-py3-none-any.whl |
Total release size: 12.4 kB
Release files / unilink_lib-1.2.1.tar.gz
| Download URL | unilink_lib-1.2.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4648695f568ec117a5834b02b11a2a349ae4d71754c771a057b53c24ca3a3ac
|
|
BLAKE2b-256 checksum How to use checksums |
3828babaf1176bf28e7737be07180bc289785e6ec402a009013c8628d1873d9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / unilink_lib-1.2.1-py3-none-any.whl
| Download URL | unilink_lib-1.2.1-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79d6efb8c28720bad382b5cc46382c7b114cfa1d8d76ce7f87bd3b2ddd4cdcf0
|
|
BLAKE2b-256 checksum How to use checksums |
d11831ffcc4c8ebbc3db8c308cd138cadcb4d30d4ea7e2e57e2fbbcfd84a4ea8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for unilink-lib 1.2.1
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.