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:
-
:material-school: Tutorials
Step-by-step lessons for learning Teyaotlani from the ground up.
-
:material-directions: How-to Guides
Practical guides for solving specific problems and accomplishing tasks.
-
:material-book-open-variant: Reference
Technical reference for the API, CLI, and configuration options.
-
:material-lightbulb: Explanation
Background information and conceptual discussion of the Spartan protocol.
Installation¶
License¶
Teyaotlani is open source software licensed under the MIT license.