Skip to main content

palito (Python)

Python binding for Palito. It uses only the standard library (ctypes).

pip install palito                # from PyPI
pip install ./bindings/python     # or from a clone of the repository

It needs the native libpalito library: install the Linux bundle or point PALITO_LIBRARY at your own build (see bindings).

import palito

with palito.Palito("model.gguf") as llm:
    reply = llm.chat([{"role": "user", "content": "Hello!"}],
                     on_text=lambda text: print(text, end="", flush=True))
    print(reply.finish_reason, reply.tokens_per_second)

    for text in llm.stream_chat([{"role": "user", "content": "A haiku about tea"}],
                                temperature=0.7, top_p=0.9, stop=["\n\n"]):
        print(text, end="", flush=True)
  • Generation keywords: max_tokens, thinking, temperature (0: greedy), top_p, top_k, min_p, repeat_penalty, repeat_last_n, presence_penalty, frequency_penalty, logit_bias ({token id: bias}; float("-inf") bans), seed, stop and json_schema (a dict or JSON string; the reply is JSON matching it, with reasoning off; {"type": "object"} for any object).
  • Results: a Completion dataclass.
  • Errors: raise palito.PalitoError.

Metadata

Release files for palito 0.16.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 palito 0.16.1
File Size Uploaded Provenance Actions
palito-0.16.1.tar.gz 7.0 kB With provenance Details for palito-0.16.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for palito 0.16.1
File Interpreter ABI Platform Actions
palito-0.16.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for palito-0.16.1-py3-none-win_amd64.whl
palito-0.16.1-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for palito-0.16.1-py3-none-manylinux_2_17_x86_64.whl
palito-0.16.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for palito-0.16.1-py3-none-macosx_11_0_arm64.whl

Total release size: 10.1 MB

Release files / palito-0.16.1.tar.gz

Download URL palito-0.16.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
66db5327ba02e05b802c992c1ad5e85c4cf422b2aa6d4ac52abfd07f6c826153
BLAKE2b-256 checksum
How to use checksums
ea2fac8f0e86dbe97bb616f509bd3017fe38382200cebcb34cc6a48ec04d6cfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / palito-0.16.1-py3-none-win_amd64.whl

Download URL palito-0.16.1-py3-none-win_amd64.whl
Size 3.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e2bd0ec0be3dae6ec8808cb8d405acf73c8113457005b5742edcecae2c2b34c1
BLAKE2b-256 checksum
How to use checksums
e7f10527fcff080864b4a468bbae2d916fa8971f4d19efb63edd67d869f6bcee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / palito-0.16.1-py3-none-manylinux_2_17_x86_64.whl

Download URL palito-0.16.1-py3-none-manylinux_2_17_x86_64.whl
Size 3.9 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
415cc546144ad1111543eff3c4d5feb192f320190ea262874f1366833d797d48
BLAKE2b-256 checksum
How to use checksums
f372cb1bf2a6d726ff13f1733467e2ded638706fe64f18ed9336fc46621af7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / palito-0.16.1-py3-none-macosx_11_0_arm64.whl

Download URL palito-0.16.1-py3-none-macosx_11_0_arm64.whl
Size 2.8 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
187a89212d822013f38d52e9e8d6929601af190cc4339ac5f3bc74a73b5d7261
BLAKE2b-256 checksum
How to use checksums
b209246bdcf0c8f0c71dbaa91eb1e5b6f3b4fba0de0fd06a3e30a3b2c72cab0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for palito 0.16.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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for palito-0.16.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

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.

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