from ollama_x_client import AuthenticatedClient
ollama-x-client
This is the autogenerated client for the Ollama-X project. Ollama-X is a backend application that allows to balance the load of Ollama instances and control users' access to them.
Installation
Using pip:
pip install ollama-x-client
Using poetry:
poetry add ollama-x-client
Usage
from ollama_x_client.client import AuthenticatedClient
from ollama_x_client.api.user.create import sync_detailed as create_user
from ollama_x_client.models import CreateUserRequest
client = AuthenticatedClient(base_url="http://localhost:8000")
response = create_user(
client=client,
body=CreateUserRequest("test-user")
)
How to generate
To generate the client, you need to have the OpenAPI specification file. You can download it from the Ollama-X server by visiting the /openapi.json endpoint.
Then, you can generate the client using the OpenAPI CLI:
openapi-cli generate --url https://<ollama_x_instance>/openapi.json --output ollama_x_client
--no-install --no-interaction
This will generate the client in the ollama_x_client directory.
Metadata
Release files for ollama-x-client 0.1.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 | |
|---|---|---|---|
| ollama_x_client-0.1.0.tar.gz | 96.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ollama_x_client-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 168.3 kB
Release files / ollama_x_client-0.1.0.tar.gz
| Download URL | ollama_x_client-0.1.0.tar.gz |
|---|---|
| Size | 96.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb13cd60cc235604d624bdedbdec0e605df0eb1dbff6f9050e28c866c2007869
|
|
BLAKE2b-256 checksum How to use checksums |
a60af89e637e0bd5ce0c1187ca47755952401e206a12829fa1813cb67bc37f9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.1 Darwin/23.6.0
|
Release files / ollama_x_client-0.1.0-py3-none-any.whl
| Download URL | ollama_x_client-0.1.0-py3-none-any.whl |
|---|---|
| Size | 72.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d17d8e20632f9bf94b75b2fbe6d0d64d672ee61a11883e6ff83fb2ee41304df
|
|
BLAKE2b-256 checksum How to use checksums |
0664853e5362c58ac0176b28233b8f9006e1b6cb01012d3a126f29fb833f963c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.11.1 Darwin/23.6.0
|