Skip to main content

Asynchronous, single-threaded, poll-based Telnet server

Project description

Miniboa: a simple Telnet server

build status downloads


Miniboa is a bare-bones Telnet server to use as the base for a MUD or similar interactive server. Miniboa has several nice features for this type of application.


  • Asynchronous - no waiting on player input or state.

  • Single threaded - light on resources with excellent performance.

  • Runs under your game loop - you decide when to poll for data.

  • Supports 1000 users under Linux and 512 under Windows (untested).

  • Miniboa is compatible with both Python 2.7, and 3.x

Quick Start


pip install miniboa

And then:

from miniboa import TelnetServer
server = TelnetServer()
while True: server.poll()

But you probably want to do something with the connecting/disconnecting clients:

clients = []

def on_connect(client):
    client.send("Hello, my friend. Stay awhile and listen.")

def on_disconnect(client):

server = TelnetServer(

while True:

To use Miniboa, you create a Telnet Server object listening at a specified port number. You have to provide two functions for the server; the first is a handler for new connections and the second is the handler for lost connections. These handler functions are passed Telnet Client objects – these are your communication paths to and from the individual player’s MUD client.

For example, let’s say Mike and Joe connect to your MUD server. Telnet Server will call your on_connect() function with Mike’s Telnet Client object, and then again with Joe’s Telnet Client object. If Mike’s power goes out, Telnet Server will call your on_disconnect() function with Mike’s Telnet Client object (same exact one).

This will launch a server listening on the default port, that accepts Telnet connections and sends a simple message.

$ telnet localhost 7777
Connected to localhost.
Escape character is '^]'.
Hello, my friend. Stay awhile and listen.

Further documentation can be found here.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miniboa-1.0.9.tar.gz (17.0 kB view hashes)

Uploaded source

Built Distribution

miniboa-1.0.9-py2.py3-none-any.whl (16.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page