Teyaotlani
Modern Spartan protocol server and client implementation using asyncio
Teyaotlani (from Nahuatl: "warrior") is a Python library for building Spartan protocol servers and clients. It provides an async-first design with a clean, intuitive API.
Features
- Async-first design - Built on asyncio for high-performance concurrent connections
- Full protocol support - Complete Spartan client and server implementation
- CLI included - Command-line tools for fetching, uploading, and serving content
- Configurable server - Rate limiting, access control, and upload handling
- Type-safe - Full type annotations for modern Python development
Installation
# Using uv (recommended)
uv add teyaotlani
# Using pip
pip install teyaotlani
Quick Start
Client
import asyncio
from teyaotlani import get
async def main():
response = await get("spartan://example.com/")
print(response.body)
asyncio.run(main())
Server
import asyncio
from teyaotlani import ServerConfig, run_server
async def main():
config = ServerConfig(
host="localhost",
port=3000,
document_root="./capsule",
)
await run_server(config)
asyncio.run(main())
CLI
# Fetch a page
teyaotlani get spartan://example.com/
# Serve files
teyaotlani serve ./capsule --port 3000
# Upload content
teyaotlani upload spartan://localhost:3000/file.txt -c "Hello!"
Documentation
Full documentation is available at teyaotlani.readthedocs.io.
What is Spartan?
Spartan is a simple, text-focused internet protocol similar to Gemini but without TLS complexity. It's designed for:
- Lightweight content serving
- Native file uploads
- Easy implementation
- Internal networks and learning
Learn more in the Spartan Protocol explanation.
License
MIT License - see LICENSE for details.
Metadata
Release files for teyaotlani 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| teyaotlani-0.1.4.tar.gz | 24.4 kB | With provenance | Details for teyaotlani-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| teyaotlani-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for teyaotlani-0.1.4-py3-none-any.whl |
Total release size: 57.7 kB
Release files / teyaotlani-0.1.4.tar.gz
| Download URL | teyaotlani-0.1.4.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4a626a770a0c93b956e12080919525e5a4c490d92a6a9ec5b5648b7612f7591
|
|
BLAKE2b-256 checksum How to use checksums |
aa8f039b973c78b09b039ac44064ab5c00c9cdf285712fa49182d3b70a4ae582
|
| 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 Jan 8, 2026.
Transparency logRelease files / teyaotlani-0.1.4-py3-none-any.whl
| Download URL | teyaotlani-0.1.4-py3-none-any.whl |
|---|---|
| Size | 33.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
834153a972d566e025fbeb1d8994af410853b0c5452b56ef85a673c538959fc9
|
|
BLAKE2b-256 checksum How to use checksums |
71a2e5cf66515be86326afd543f7165f405620dba19ecf7f779bce3bb7e36a32
|
| 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 Jan 8, 2026.
Transparency logSecurity for teyaotlani 0.1.4
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.
Attestation for teyaotlani-0.1.4.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 Jan 8, 2026.
Transparency logA 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.