Skip to content

API Reference

Python API documentation for Mototli modules.

  • Client


    GopherClient for fetching resources from gopher servers.

    Client API

  • Server


    GopherServer, ServerConfig, and handler classes.

    Server API

  • Protocol


    Protocol types: ItemType, GopherRequest, GopherResponse.

    Protocol API

Module Overview

mototli
├── client          # Client implementation
│   ├── GopherClient
│   └── GopherClientProtocol
├── server          # Server implementation
│   ├── GopherServer
│   ├── ServerConfig
│   ├── Router
│   └── handlers
├── protocol        # Protocol types
│   ├── ItemType
│   ├── GopherRequest
│   ├── GopherResponse
│   └── GopherAttributes
├── content         # Content generation
│   └── directory
└── utils           # Utilities
    └── mime

Quick Import Reference

# Client
from mototli.client import GopherClient

# Server
from mototli.server import (
    GopherServer,
    ServerConfig,
    run_server,
    start_server,
)

# Protocol types
from mototli.protocol import (
    ItemType,
    GopherRequest,
    GopherResponse,
    GopherItem,
    GopherAttributes,
)

# Utilities
from mototli.utils import get_item_type, get_mime_type

See Also