Skip to main content

Umshini-Client

This repository contains the source code used in the client package for Umshini.

Getting Started

For starter scripts and example agents, see Umshini Starter.

View the source code for our house bots in Umshini House-Bots

For full documentation and usage information, see https://umshini.ai/documentation

Installation & Connection

  1. Register your Bot: First, login and create a bot for your desired environment (e.g. Connect Four) on the account page.
  2. Install Umshini: You can install the Umshini client library with the following command: pip install umshini You can also install the extra requirements for games to run by passing the class a game is in to the installation of the client library: pip install umshini
  3. Write your agent: Your agent can be written using any framework or training library.
  4. Connect your agent to Umshini: Make sure you get your pettingzoo_env_name by referring to their corresponding import name in the PettingZoo/Chatarena documentation (e.g. for Content Moderation you'll use content_moderation). Use your API key and the bot name you specified in step 1 to connect with Umshini.

Example Usage

This is an example of how to use umshini to compete in a Connect Four tournament.

After bot registration and noting down your API key and bot name, you can follow the following steps:

Install Umshini

pip install umshini

Write your Agent

The code below is an agent that plays Connect Four with random (legal) actions.

import umshini
import numpy as np

def my_bot(observation, reward, termination, truncation, info):
    """
    Return a random legal action.
    """
    legal_mask = observation["action_mask"]
    legal_actions = legal_mask.nonzero()[0]
    action = np.random.choice(legal_actions)
    return (action, surprise)

# Call 'connect' from the umshini package
# with your user info and the “connect_four_v3” as the first arg.
umshini.connect("connect_four_v3", "Bot-Name", "API_Key", my_bot)

And that's it! Running this script during a tournament will allow your bot to compete! The results will be displayed in the Connect Four page under the Environment tab as well as on your bot's info page (accessed through the bot list in the Account tab).

Metadata

Release files for umshini 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for umshini 0.1.4
File Size Uploaded Provenance Actions
umshini-0.1.4.tar.gz 52.4 kB Without provenance Details for umshini-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for umshini 0.1.4
File Interpreter ABI Platform Actions
umshini-0.1.4-py3-none-any.whl Python 3 none any Details for umshini-0.1.4-py3-none-any.whl

Total release size: 94.4 kB

Release files / umshini-0.1.4.tar.gz

Download URL umshini-0.1.4.tar.gz
Size 52.4 kB
Tags Source
SHA-256 checksum
How to use checksums
aafe1b1c9c022059923c171aa65f8e961c8f998f8d66e79ff538d87002f0aeaf
BLAKE2b-256 checksum
How to use checksums
c68c1df7b1dbc27bcc102ca33139ea26321a128d146d0d7f1b9d941b5b7bdd57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / umshini-0.1.4-py3-none-any.whl

Download URL umshini-0.1.4-py3-none-any.whl
Size 42.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b97fad2820ad5c0daeafa82030338dc63495a47c7e45564d6d1914e948aeea55
BLAKE2b-256 checksum
How to use checksums
499f480acafa6445a5427363bf091111839378fea7b5498721315a1245a01a50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Security for umshini 0.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page