Skip to main content

Python SDK for interacting with the MUD Autonomous World framework

Project description

mud-aw.py 🧱🐍

Python tools for:

  • querying mud tables
  • creating your own python game wrappers
  • interacting with worlds

Use case

  • create data dashboards of MUD worlds
  • automate in-game actions
  • create game-specific libraries for player interactions (wrappers)

Installation

Clone the repository and install dependencies:

git clone https://github.com/mud-aw.py.git
cd mud-aw.py
pip install -e .

MUD Indexer SDK

The MUD Indexer SDK allows users to parse a MUD configuration file, register tables dynamically, and query data using a simplified API.

Features

  • Dynamic Table Registration: Automatically register tables and schemas defined in a MUD configuration file.
  • SQL-like Queries: Perform table queries with filtering.

Usage

1. Initialize the SDK

Create an instance of MUDIndexerSDK:

from mud import MUDIndexerSDK

indexer_url = "https://indexer.example.com"
world_address = "0x123...abc"
mud_config_path = "path/to/mud.config"

sdk = MUDIndexerSDK(indexer_url, world_address, mud_config_path)

2. Query Tables

Use the SDK to interact with dynamically registered tables. For example, if Inventory is defined in the MUD configuration:

# Fetch tables and filter by properties
pickaxe_balance = sdk.tables.Inventory.get(playerId=PLAYER_ID, itemId=PICKAXE_ID)

# Fetch every Inventory entry 
inventories = sdk.tables.Inventory.get()

# limit the amount of entries returned, default is 1000
inventories = sdk.tables.Inventory.get(limit=500)

3. Access Table Names

Retrieve a list of all tables registered to the world:

table_names = sdk.get_table_names()
print("Registered tables:", table_names)

Contributing

  1. Fork the repository.
  2. Create a new feature branch.
  3. Submit a pull request.

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

mud-aw.py-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mud_aw.py-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file mud-aw.py-0.1.0.tar.gz.

File metadata

  • Download URL: mud-aw.py-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for mud-aw.py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e2c0bb2140b9755a0770f28012843460e77d2e4746b3428a7ed782033a3d3df9
MD5 bea43dbef676cd1c2c88217f697b4bda
BLAKE2b-256 432a1bdd6f8151d3aa69024e07bbfc9a0ca8a25f733be17da9328f6b41622ed3

See more details on using hashes here.

File details

Details for the file mud_aw.py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mud_aw.py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.20

File hashes

Hashes for mud_aw.py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d826acbafe6a20c596db7f27e7149f73b17780a6d1331c133cf7f98aa01a89a
MD5 29aac7257947f478acf4b83cd5427547
BLAKE2b-256 1dc87c01892aa27b166ff0ed0f0f4fb70cd31c35763bcb2ac6bbda2aa5ba5d70

See more details on using hashes here.

Supported by

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