https://github.com/felixwolf/pymetaverse
Python Library for Second Life
https://github.com/felixwolf/pymetaverse
bot metaverse python3 second-life zlib-license
Last synced: about 1 month ago
JSON representation
Python Library for Second Life
- Host: GitHub
- URL: https://github.com/felixwolf/pymetaverse
- Owner: FelixWolf
- License: other
- Created: 2025-06-18T04:55:02.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-08-30T01:21:24.000Z (about 1 month ago)
- Last Synced: 2025-08-30T03:18:34.578Z (about 1 month ago)
- Topics: bot, metaverse, python3, second-life, zlib-license
- Language: Python
- Homepage:
- Size: 189 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://pypi.python.org/pypi/metaverse/)
[](https://pypi.python.org/pypi/metaverse/)# PyMetaverse
A library for connecting to Second Life, OpenSimulator, or other compatible grids.# Simple bot example
```py
import asyncio
import datetime
from metaverse import login
from metaverse.bot import SimpleBot
from metaverse.const import *bot = SimpleBot()
@bot.on("message", name="ChatFromSimulator")
def ChatFromSimulator(simulator, message):
# Ignore start / stop
if message.ChatData.ChatType in (4, 5):
return
sender = message.ChatData.FromName.rstrip(b"\0").decode()
text = message.ChatData.Message.rstrip(b"\0").decode()
if text == "logout":
bot.say(0, "Ok!")
bot.logout()
print("[{}] {}: {}".format(
datetime.datetime.now().strftime("%Y-%M-%d %H:%m:%S"),
sender,
text
))async def main():
await bot.login(("Example", "Resident"), "password")
await bot.run()# Run everything
asyncio.run(main())
```# Similar Projects
* Second Life Viewer (C++) - https://github.com/secondlife/viewer
* LibreMetaverse (C#) - https://github.com/cinderblocks/libremetaverse
* Node Metaverse (NodeJS) - https://github.com/CasperTech/node-metaverse