Skip to content

Partial port of uni-mas for Python, initially written as part of 3rd year assignment

Notifications You must be signed in to change notification settings

vakus/uni-mas-py

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

UNI-MAS-PY

This repository is a port of what-will-we-do-now/uni-mas for Python.

Usage

The usage of uni-mas.py is relatively simple.

To create a client use the following code

import unimaspy

# you can change the name of the client here
client = unimaspy.Client('client')

# next you need to connect to the router.
client.connect(ip='127.0.0.1', port=42069)
# you can also forgo the ip and port parameters
# to connect to the defaults used in the parameters above

# now we can send a message
message = unimaspy.Message('client', 'recipient', unimaspy.MessageType.USER_MSG, 'Hello')

client.send(message)

# next we can receive a message
response = client.recv()
print(response.getSender() + ": " response.getMessage())

# and now we can close the connection
client.disconnect()

for more help you can always check

help(unimaspy)

About

Partial port of uni-mas for Python, initially written as part of 3rd year assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%