Nauyaca¶
A modern, high-performance implementation of the Gemini protocol in Python
Nauyaca (pronounced "now-YAH-kah", meaning "serpent" in Nahuatl) brings modern Python async capabilities to the Gemini protocol, providing both server and client implementations with a focus on performance, security, and developer experience.
Why Nauyaca?¶
-
High Performance
Built on asyncio's low-level Protocol/Transport pattern for maximum efficiency and fine-grained control over network I/O
-
Security First
TOFU certificate validation, rate limiting, access control, and TLS 1.2+ enforcement built-in from the ground up
-
Production Ready
Comprehensive TOML configuration, middleware system, systemd integration, and deployment-ready architecture
-
Developer Friendly
Full type hints, extensive test coverage, clean APIs, and powered by
uvfor fast dependency management
Quick Example¶
Get started in seconds with both client and server:
Installation¶
Choose the installation method that fits your use case:
Recommended: Install with uv
Requirements: Python 3.10 or higher
Key Features¶
Server Capabilities¶
- Complete Protocol Support - TLS 1.2+, all status codes (1x-6x), client certificates
- Security Hardened - Rate limiting, IP-based access control, path traversal protection
- TOML Configuration - Flexible configuration with sensible defaults and CLI overrides
- Middleware Architecture - Composable middleware for logging, rate limiting, and access control
- Production Ready - Systemd integration, graceful shutdown, comprehensive error handling
Client Capabilities¶
- TOFU Validation - Trust-On-First-Use certificate validation with SQLite-backed database
- Async/Await API - Clean, modern Python API built on asyncio
- Certificate Management - Import/export known hosts, revoke trust, manual certificate trusting
- CLI Interface - Full-featured command-line client for browsing Geminispace
- Redirect Handling - Automatic redirect following with loop detection
Documentation Sections¶
-
Installation, quick start guide, and your first Gemini server
-
Step-by-step lessons for building Gemini servers and clients
-
Practical guides for common tasks and deployment scenarios
-
Complete API reference, CLI commands, and configuration options
-
Understanding the Gemini protocol, TOFU, and architecture decisions
-
Security features, best practices, and vulnerability reporting
What is Gemini?¶
The Gemini protocol is a modern, privacy-focused alternative to HTTP and the web. It aims to be:
- Simple - Easier to implement than HTTP, harder to extend (by design)
- Privacy-focused - No cookies, no tracking, no JavaScript
- Secure - TLS is mandatory, not optional
- Lightweight - Text-focused content with minimal formatting
- User-centric - Readers control how content is displayed
Think of it as a modern take on Gopher, sitting comfortably between the complexity of the web and the simplicity of plain text.
Project Status¶
Version 0.2.0 - Core Features Complete
Current phase: Security Hardening & Integration Testing
| Feature | Status |
|---|---|
| Core Protocol Implementation | |
| TLS 1.2+ Support | |
| Server Configuration (TOML) | |
| TOFU Certificate Validation | |
| Rate Limiting & DoS Protection | |
| IP-based Access Control | |
| Client Session Management | |
| Security Documentation | |
| Integration Testing | |
| CLI Interface | |
| Static File Serving | |
| Content Type Detection |
Community & Support¶
-
Source code, issue tracker, and project development
-
Report bugs and request features
-
Ask questions and share ideas with the community
-
Responsible disclosure for security vulnerabilities
License¶
Nauyaca is released under the MIT License. See the LICENSE file for details.
Next Steps¶
Ready to get started? Here's what to do next:
- Install Nauyaca - Get up and running in minutes
- Quick Start Guide - Build your first Gemini server
- Explore Tutorials - Learn by building real projects
- Read the Security Guide - Understand TOFU, rate limiting, and best practices
Development Status
This project is in active development (pre-1.0). Core protocol and security features are stable, but the high-level API may change based on community feedback.