Skip to main content

No project description provided

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ollama_x_client-0.1.0.tar.gz (96.0 kB view hashes)

Uploaded Source

Built Distribution

ollama_x_client-0.1.0-py3-none-any.whl (72.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page