Skip to main content

Mototli

CI PyPI version codecov Python versions License Documentation

Modern Gopher protocol server and client implementation using asyncio.

Mototli brings the classic Gopher protocol (RFC 1436) into modern Python with full Gopher+ extensions (RFC 4266), async/await support, and a developer-friendly API.

Part of the small internet protocol family alongside Nauyaca (Gemini) and Mapilli.

Features

  • Async Client - Browse gopherspace with an elegant async API
  • Full Server - Host your own gopherhole with static files, CGI, and directory listings
  • Gopher+ Support - Complete RFC 4266 implementation with attributes and views
  • CLI Tools - Rich command-line interface for browsing and serving
  • TOML Config - Flexible server configuration
  • Type Safe - Full type hints with strict mypy

Installation

# Using uv (recommended)
uv add mototli

# Using pip
pip install mototli

Quick Start

Browse Gopherspace

# Fetch a directory listing
mototli get gopher.floodgap.com

# Fetch a text file
mototli text gopher.floodgap.com /gopher/welcome

# Get Gopher+ attributes
mototli attrs gopher.floodgap.com /gopher

Serve a Gopherhole

# Serve current directory
mototli serve --port 7070

# With configuration
mototli serve --config server.toml

Python Client

import asyncio
from mototli.client import GopherClient

async def main():
    async with GopherClient() as client:
        response = await client.get("gopher.floodgap.com", "/")
        for item in response.items:
            print(f"[{item.item_type.value}] {item.display_text}")

asyncio.run(main())

Python Server

import asyncio
from mototli.server import run_server

asyncio.run(run_server(document_root="./gopherhole", port=7070))

Documentation

Full documentation is available at mototli.readthedocs.io:

Development

# Clone and install
git clone https://github.com/alanbato/mototli.git
cd mototli
uv sync

# Run tests
uv run pytest

# Run linting
uv run ruff check .

# Run type checking
uv run mypy src/

# Build docs locally
uv run mkdocs serve

License

MIT License - see LICENSE for details.

Metadata

Release files for mototli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mototli 0.1.1
File Size Uploaded Provenance Actions
mototli-0.1.1.tar.gz 36.6 kB With provenance Details for mototli-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 85.6 kB

Release files / mototli-0.1.1.tar.gz

Download URL mototli-0.1.1.tar.gz
Size 36.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e1c41d6793520ad0c7a387542bb2a92a7f2696561f8515ff4dfa2104b76322f4
BLAKE2b-256 checksum
How to use checksums
a05ecb07611cae463ad785c5a4bf43fb455a4f384468e9f46d7739fb4684e3e5
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 1, 2026.

Transparency log

Release files / mototli-0.1.1-py3-none-any.whl

Download URL mototli-0.1.1-py3-none-any.whl
Size 49.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad3ad7b577a0278324a80c64de2141815fefee460ffe9863117017728b76cf8c
BLAKE2b-256 checksum
How to use checksums
764b4be272839864fced62a5bed21e76c72575e319e6bfed16e1e54129488b1e
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 1, 2026.

Transparency log

Security for mototli 0.1.1

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 mototli-0.1.1.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 1, 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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