Skip to main content

No project description provided

Project description

PyMUSH - A Barebones MUSH Framework for Python

WARNING: Early Alpha!

Pardon our dust, this project is still in its infancy. It kinda runs, but if you're not a developer intent on sprucing it up, it may not have much for you just yet.


Name: Volund



Discord: Volund#1206

Discord Channel:


Home Repository:


MIT license. In short: go nuts, but give credit where credit is due.

Please see the included LICENSE.txt for the legalese.


Building off the solid MU* framework provided by Athanor and taking full advantage of the ANSI formatting magic of mudstring , PyMUSH is the 'next level up' for those desiring to create whole new MU* experiences.

PyMUSH provides a game architecture and scripting engine based off the principles of MUSH - see TinyMUSH , PennMUSH and RhostMUSH for some examples - without committing entirely to the MUSH way of handling permissions and building.

PyMUSH implements its own dialect of MUSHcode, however, and does not care much about backwards compatability. MUSHcode is a very cantankerous language, and the PyMUSH ideal is to modernize it as much as possible while still retaining its core advantages: being flexible, and easy to maintain using a standard MU* client.

As with Athanor, however, PyMUSH is not a fully-fledged game. This library lacks a database for persistence, and further lacks much of the itty-bitty details of most MUSHes (such as object FLAGs). Instead, PyMUSH provides a versatile API upon which to hang those features. It tries not to be too opinionated about how it might be used, or what kind of games it might be used to make.

For a more bells-and-whistles, batteries-included project built upon PyMUSH, the flagship vmush might be of interest.


Connections: Courtesy of Athanor, Each client connection results in a Connection object. These are homogenized into a single API, regardless of their source protocol.

GameSession: A GameSession object represents a logged-in user who has chosen their character to play. Multiple Connections can be linked to a GameSession, and GameSessions are highly customizable - such as a replaceable prompt handler, to various ways of handling both graceful and unexpected disconnections/logouts.

GameObject: Everything from a player character, to user accounts, to a room or an exit is a GameObject, with a unique object ID. GameObjects have Attributes, their (optional) Location is another GameObject, they have owners (usually an Account), and can inherit Attributes (and thus, code) from their optional parent/ancestor chain. As GameObject types are simply Python Classes, creating new ones (or replacing existing ones) is easy.

The Queue: The Command Queue/Action Queue/Task Queue (once we decide what to call it) is a first-in, first-out (FIFO) queue that tracks all actions to be undertaken by game entities - whether this is a command entered by a client, or a script triggered by the game itself. Tasks are one-or-more commands that share the same parser instance/variables, used for both handling user commands and implementing the in-game scripting language - MUSHCode.

Commands: Commands are implemented in either Python or by setting a @cmd match to an Attribute on a GameObject, and implementing them as a script comprised of other commands. Python Commands are bundled up (or generated!) by CommandMatchers, and - in addition to simply adding more Python paths to the game's config files - replaceable APIs on various classes allow for much flexibility in determining what commands are available to who, when.

Functions: MUSHCode functions are implemented in Python, or aimed at a specific <gameobject>'s Attribute to call via scripting. Functions are a key element of the integrated scripting engine. Combined with Commands, this allows MUSHcode virtually unlimited ability to modify the game's state from within the game itself.


Glad you asked!

You can install pymush using pip install pymush

This adds the pymush command to your shell. use pymush --help to see what it can do.

The way that athanor and projects built on it work:

pymush --init <folder> will create a folder that contains your game's configuration, save files, database, and possibly some code. Enter the folder and use pymush start and pymush stop to control it. you can use --app server or --app portal to start/stop specific programs.

Examine the appdata/ and and - which get their initial configuration from pymush's defaults - for how to change the server's configuration around.

Again, though, it doesn't do much...


As with Athanor that it's built atop of, The true power of PyMUSH is in its extendability. Because you can replace any and all classes the program uses for its startup routines, and the launcher itself is a class, it's easy-peasy to create a whole new library with its own command-based launcher and game template that the launcher creates a skeleton of with --init <folder>.

Not gonna lie though - that does need some Python skills.

If you're looking for a project already built on PyMUSH for you, check out vmush and don't let the MUSH in the name fool you - it's built for MUDs too!


Q: This is cool! How can I help?
A: Patreon support is always welcome. If you can code and have cool ideas or bug fixes, feel free to fork, edit, and pull request! Join our discord to really get cranking away though.

Q: I found a bug! What do I do?
A: Post it on this GitHub's Issues tracker. I'll see what I can do when I have time. ... or you can try to fix it yourself and submit a Pull Request. That's cool too.

Q: But... I want a MUD! Where do I start making a MUD?
A: check out vmush

Special Thanks

  • The Evennia Project.
  • All of my Patrons on Patreon.
  • Anyone who contributes to this project or my other ones.
  • The PennMUSH and RhostMUSH dev teams, especially Ashen-Shugar.

Download files

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

Source Distribution

pymush-0.0.1.tar.gz (15.3 kB view hashes)

Uploaded source

Built Distribution

pymush-0.0.1-py3-none-any.whl (12.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page