Skip to main content

Xitzin

Application Framework for the Geminispace

Xitzin brings a modern Python developer experience to the Gemini protocol. Build Gemini capsules with familiar patterns: decorators for routing and type-annotated path parameters.

from xitzin import Xitzin, Request

app = Xitzin()

@app.gemini("/")
def home(request: Request):
    return "# Welcome to my capsule!"

@app.gemini("/user/{username}")
def profile(request: Request, username: str):
    return f"# {username}'s Profile"

@app.input("/search", prompt="Enter query:")
def search(request: Request, query: str):
    return f"# Results for: {query}"

if __name__ == "__main__":
    app.run()

Features

  • Decorator-based routing with @app.gemini() and automatic path parameter extraction
  • User input handling via @app.input() for Gemini's status 10/11 prompts
  • Certificate authentication with @require_certificate and fingerprint whitelisting
  • Jinja2 templates with Gemtext-aware filters (links, headings, lists)
  • Middleware support for logging, rate limiting, and custom processing
  • Testing utilities with in-memory TestClient
  • Async support for both sync and async handlers

Installation

pip install xitzin

Or with uv:

uv add xitzin

Quick Start

  1. Create app.py:
from xitzin import Xitzin, Request

app = Xitzin()

@app.gemini("/")
def home(request: Request):
    return "# Hello, Geminispace!"

if __name__ == "__main__":
    app.run()
  1. Generate TLS certificates:
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost"
  1. Run your capsule:
python app.py
  1. Visit gemini://localhost/ with a Gemini client like Astronomo.

Documentation

Full documentation is available at xitzin.readthedocs.io.

License

MIT

Metadata

Release files for xitzin 0.8.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 xitzin 0.8.0
File Size Uploaded Provenance Actions
xitzin-0.8.0.tar.gz 39.6 kB With provenance Details for xitzin-0.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 87.1 kB

Release files / xitzin-0.8.0.tar.gz

Download URL xitzin-0.8.0.tar.gz
Size 39.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2617dab7062420761494e4410616abb556f3c42a43124b68effaef7681790888
BLAKE2b-256 checksum
How to use checksums
9934ceadb562ba0cebe2fee8ecb1f3b0febb33d8faec3e7af4377c3395c13ab2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 20, 2026.

Transparency log

Release files / xitzin-0.8.0-py3-none-any.whl

Download URL xitzin-0.8.0-py3-none-any.whl
Size 47.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b739f6f2956919c1973e52cb166a1297f4ab6d8fefba932005d0a81f43bb980e
BLAKE2b-256 checksum
How to use checksums
86a1f95cc945636143c77eaa23089ff0d5b41688dfb10af05f8efce93012d9c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 20, 2026.

Transparency log

Security for xitzin 0.8.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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xitzin-0.8.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 Feb 20, 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