{"id":19956625,"url":"https://github.com/shmup/miniboa","last_synced_at":"2025-07-23T06:05:31.777Z","repository":{"id":57441744,"uuid":"49987899","full_name":"shmup/miniboa","owner":"shmup","description":"An asynchronous, single-threaded, poll-based Telnet server","archived":false,"fork":false,"pushed_at":"2022-09-19T03:24:01.000Z","size":141,"stargazers_count":64,"open_issues_count":4,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-15T08:23:44.731Z","etag":null,"topics":["mud","python","server","tcp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shmup.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-19T22:34:11.000Z","updated_at":"2025-05-29T16:07:38.000Z","dependencies_parsed_at":"2022-09-26T17:20:54.250Z","dependency_job_id":null,"html_url":"https://github.com/shmup/miniboa","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/shmup/miniboa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmup%2Fminiboa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmup%2Fminiboa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmup%2Fminiboa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmup%2Fminiboa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shmup","download_url":"https://codeload.github.com/shmup/miniboa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmup%2Fminiboa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266626115,"owners_count":23958344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mud","python","server","tcp"],"created_at":"2024-11-13T01:35:01.918Z","updated_at":"2025-07-23T06:05:31.754Z","avatar_url":"https://github.com/shmup.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"===============================\nMiniboa: a simple Telnet server\n===============================\n\n.. image:: https://github.com/shmup/miniboa/actions/workflows/python-package.yml/badge.svg\n   :alt: build status\n   :target: https://github.com/shmup/miniboa/actions\n\n.. image:: https://img.shields.io/pypi/v/miniboa.svg\n   :target: https://pypi.python.org/pypi/miniboa\n   :alt: downloads\n\n-----\nWhat?\n-----\n\nMiniboa 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.\n\n--------\nFeatures\n--------\n\n- Asynchronous - no waiting on player input or state.\n- Single threaded - light on resources with excellent performance.\n- Runs under your game loop - you decide when to poll for data.\n- Supports 1000 users under Linux and 512 under Windows (untested).\n- Miniboa is compatible with both Python 2.7, and 3.x\n\n-----------\nQuick Start\n-----------\n\nFirst:\n\n.. code-block:: bash\n\n    pip install miniboa\n\nAnd then:\n\n.. code-block:: python\n\n    from miniboa import TelnetServer\n    server = TelnetServer()\n    while True: server.poll()\n\nBut you probably want to do something with the connecting/disconnecting clients:\n\n.. code-block:: python\n\n    clients = []\n\n\n    def on_connect(client):\n        client.send(\"Hello, my friend. Stay awhile and listen.\")\n        clients.append(client)\n\n\n    def on_disconnect(client):\n        clients.remove(client)\n\n\n    server = TelnetServer(\n        port=3333,\n        address='',\n        on_connect=on_connect,\n        on_disconnect=on_disconnect\n        encoding='utf-8')\n\n    while True:\n        server.poll()\n\n\nTo 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.\n\nFor 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).\n\nThis will launch a server listening on the default port, that accepts Telnet connections and sends a simple message.\n\n.. code-block:: bash\n\n    $ telnet localhost 7777\n    Trying 127.0.0.1...\n    Connected to localhost.\n    Escape character is '^]'.\n    Hello, my friend. Stay awhile and listen.\n\nFurther documentation can be `found here \u003chttps://github.com/shmup/miniboa/blob/master/docs/index.rst/\u003e`_.\n\n=========\nCopyright\n=========\n\n.. code-block:: bash\n\n    Copyright 2009 Jim Storch\n    Copyright 2015 Carey Metcalfe\n    Copyright 2016 Joseph Schilz\n    Copyright 2018 Jared Miller\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshmup%2Fminiboa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshmup%2Fminiboa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshmup%2Fminiboa/lists"}