Skip to content

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

Quick Example

import asyncio
from teyaotlani import get

async def main():
    response = await get("spartan://example.com/")
    print(response.body)

asyncio.run(main())

Documentation

This documentation follows the Diataxis framework:

Installation

# Using uv (recommended)
uv add teyaotlani

# Using pip
pip install teyaotlani

License

Teyaotlani is open source software licensed under the MIT license.