Skip to main content

palito (Python)

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

pip install ./bindings/python
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.12.0

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.12.0
File Size Uploaded Provenance Actions
palito-0.12.0.tar.gz 6.8 kB With provenance Details for palito-0.12.0.tar.gz

Built distributions (wheels)

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

Total release size: 9.9 MB

Release files / palito-0.12.0.tar.gz

Download URL palito-0.12.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c138f47411f85b1431caf678adfb6f12497965394d65d56b559b1adfb427a0db
BLAKE2b-256 checksum
How to use checksums
cfb66d211e2c395490f74f1d7cb5aca1ccd6aff432558d135e1482c100f8eae6
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 24, 2026.

Transparency log

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

Download URL palito-0.12.0-py3-none-win_amd64.whl
Size 3.3 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
f83b11b68ee0e0609da7de01a8ce7ede2236beb276a09b89ce7a19d0c86aa790
BLAKE2b-256 checksum
How to use checksums
ab65672b7f4a01aa5ae9d2a75cf62b278ef0703d3cca7ea85b188f7a0facc616
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 24, 2026.

Transparency log

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

Download URL palito-0.12.0-py3-none-manylinux_2_17_x86_64.whl
Size 3.8 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
573db78d6b67ba0305e0ce380d07f25c2b78c175670da99ad12020604080780e
BLAKE2b-256 checksum
How to use checksums
2444d955b15062967f5967ada1adde88ab08f54f968732cab9eff9c92f90bceb
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 24, 2026.

Transparency log

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

Download URL palito-0.12.0-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
34b438829835f57559a1685f1dcb1d3ae8747d422b0c60f538e4d3ff76607c6d
BLAKE2b-256 checksum
How to use checksums
0f3faf82b0245d7ea01a3993c1afc3ecd6fd7873ef7a13e1682c7104d5d948f0
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 24, 2026.

Transparency log

Security for palito 0.12.0

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.12.0.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 24, 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