Skip to main content

djeli

Python client for the djeli local LLM server.

djeli is a small, typed Python library for talking to a djeli serve process running on your machine. It lets you run GGUF language models locally and offline — no cloud, no API key, no data leaving your computer.

Installation

pip install djeli

Requires Python 3.8 or newer.

Prerequisite

This package is a client only. To use it, you need the djeli engine running on your machine.

  1. Install the engine

Download the standalone binary for your OS (Linux, macOS, or Windows) from the official repository:

👉 https://github.com/bigdahaut/djeli

Follow the one-line install instructions in the repository's README.

  1. Start the server
djeli serve

By default, it listens on http://127.0.0.1:11435.

Usage

from djeli import Djeli

client = Djeli()

answer = client.chat(
    model="qwen2.5-1.5b-instruct-q4_k_m",
    messages=[
        {"role": "system", "content": "You are a concise assistant."},
        {"role": "user", "content": "What is the capital of Kenya?"},
    ],
)
print(answer)
# The capital of Kenya is Nairobi.

Streaming

for chunk in client.chat(
    model="qwen2.5-1.5b-instruct-q4_k_m",
    messages=[{"role": "user", "content": "Write a haiku about Dakar."}],
    stream=True,
):
    print(chunk, end="", flush=True)

API Reference

Djeli(base_url="http://127.0.0.1:11435", timeout=300.0)

Create a client. timeout is the maximum time in seconds to wait for a response.

Argument Type Default Description

ase_url str "http://127.0.0.1:11435" URL of the local engine.

timeout float 300.0 Request timeout in seconds.


client.models() -> list[dict]

Return the models the engine can load. Each entry has id, object, created, and owned_by fields.

client.chat(model, messages, temperature=0.7, max_tokens=1024, stream=False)

Send a chat request.

Argument Type Default Description

model str — Model name: the .gguf filename without extension.

messages list[dict] — Conversation history. Each dict has role ("system", "user", "assistant") and content.

temperature float 0.7 Sampling temperature. 0.0 greedy, 0.7 balanced, 1.0+ creative.

max_tokens int 1024 Maximum generated tokens.

stream bool False Return an iterator of string chunks.


Returns str when stream=False, Iterator[str] when stream=True.

DjeliError

Raised on non-2xx responses, connection failures, or malformed responses. The message contains the engine's error text when available.

License

MIT

Metadata

Release files for djeli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djeli 0.1.1
File Size Uploaded Provenance Actions
djeli-0.1.1.tar.gz 3.2 kB Without provenance Details for djeli-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for djeli 0.1.1
File Interpreter ABI Platform Actions
djeli-0.1.1-py3-none-any.whl Python 3 none any Details for djeli-0.1.1-py3-none-any.whl

Total release size: 6.6 kB

Release files / djeli-0.1.1.tar.gz

Download URL djeli-0.1.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
85d5eb20bba413ee58aad17994138801e25a69b7b38d414edd0cab14099ba4ef
BLAKE2b-256 checksum
How to use checksums
93ef0a8816bb4a66b9a3e8097055641a3a8af675e60976b457eb6003d5aead0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / djeli-0.1.1-py3-none-any.whl

Download URL djeli-0.1.1-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e32343fc2597aec0a3e7bf7f4ab9454b86a79f96106185f8168d5de7ae6d0dc
BLAKE2b-256 checksum
How to use checksums
59bd65257395c0d5954ef25f41c3728977dd94907639ae6216533129ce62c9d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Security for djeli 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page