Skip to main content

Draw objects and run programs in the ARENA using Python!

Project description


Draw objects and run programs in the ARENA using Python!


The ARENA Python library user guide and tutorials: ARENA Documentation: Python.


Install package using pip (

pip3 install arena-py

Hello ARENA Example Program

Run the example:

cd examples

from arena import *

scene = Scene(host="", scene="example")

def make_box():


arena-py Library

The above is the simplest example of an ARENA Python program. This library sits above the ARENA pub/sub MQTT message protocol: JSON messages described in more detail at which runs in a browser. That forms a layer, in turn, on top of A-Frame and THREE.js javascript libraries.


We have added protection to the ARENA MQTT broker to limit access to change your scenes, which requires Python programs to supply authentication through a Google account.

Desktop OS

If you have a web browser available, the arena-py library Scene(host="") will launch a web browser the first time and ask you for an account to authenticate you with, before opening a client MQTT connection.

Server/Headless OS

For headless environments, the arena-py library Scene(host="") will provide you with a url to cut and paste in a browser anywhere, ask you for an account to authenticate you with, and show you a code you can enter on the command line, before opening a client MQTT connection.


Some helper script aliases have been added in this library to help you manage authentication and quick command-line (CLI) publish and subscribe to the ARENA.



Show Permissions


CLI Subscribe to Scene Messages

arena-py-sub -mh -s example

CLI Subscribe to Custom Topic

arena-py-sub -mh -t realm/g/a

CLI Publish a Scene Object Message

arena-py-pub -mh -s example -m '{"object_id": "gltf-model_Earth", "action": "create", "type": "object", "data": {"object_type": "gltf-model", "position": {"x":0, "y": 0.1, "z": 0}, "url": "store/models/Earth.glb", "scale": {"x": 5, "y": 5, "z": 5}}}'

CLI Help

arena-py-pub --help
arena-py-sub --help


Changelog can be found here.

arena-py Repository Files

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

arena-py-0.9.6.tar.gz (63.3 kB view hashes)

Uploaded Source

Built Distribution

arena_py-0.9.6-py3-none-any.whl (94.5 kB view hashes)

Uploaded Python 3

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