DjangoMOO 1.0.0 — a MOO server built on Django

Just released DjangoMOO 1.0.0, a project I’ve been working on for a while. The short version: it’s a LambdaMOO-inspired text world server that uses Django as its backbone.

A MOO is a persistent online world where objects (rooms, things, players) have properties and verbs (methods) that can be written and modified in-world. DjangoMOO keeps that model but replaces the original C runtime with Python, using Django for the data layer, Celery for async verb execution, and AsyncSSH for the connection layer.

How Django is actually used here:

  • Object, Property, Verb, and Message are all ORM models, with a ManyToManyField on Object for the inheritance graph
  • The Django admin exposes the entire world: browse objects, edit properties, modify verb source code with syntax highlighting
  • Each player command dispatches a Celery task; the verb sandbox (RestrictedPython) runs in the worker process
  • Verb code runs in RestrictedPython with a carefully audited allowlist of builtins and imports
  • AsyncSSH handles connections, supporting direct SSH and WebSocket proxying for browser access

The 1.0.0 release ships with a default bootstrap world (rooms, exits, containers, lighting, in-world mail, object placement) and a companion package called moo-agent that connects autonomous LLM agents to the world via SSH.

GitLab: https://gitlab.com/bubblehouse/django-moo
Docs: https://django-moo.readthedocs.io/

Happy to discuss any of the architectural choices — there are some interesting design problems that come up when you’re running user-submitted Python code in a multi-tenant environment.

2 Likes