A library for handling Second Life things.
Project description
PyMetaverse
A library for connecting to Second Life, OpenSimulator, or other compatible grids.
Simple bot example
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
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
metaverse-0.0.5.tar.gz
(28.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
metaverse-0.0.5-py3-none-any.whl
(32.1 kB
view details)
File details
Details for the file metaverse-0.0.5.tar.gz.
File metadata
- Download URL: metaverse-0.0.5.tar.gz
- Upload date:
- Size: 28.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
691874754a62def58a6bb92949104627f8b29d2df3ce4461e0c2b514b777a4cf
|
|
| MD5 |
c3c60b9177bcd6a0a523f69aa4f76ec2
|
|
| BLAKE2b-256 |
e15ee0c876cfc3bf9ffa6df75bfef581dd145621922dee94f78865c69841d6a1
|
File details
Details for the file metaverse-0.0.5-py3-none-any.whl.
File metadata
- Download URL: metaverse-0.0.5-py3-none-any.whl
- Upload date:
- Size: 32.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
077181434be514d0aaa43f6a3fa349e8b4c91a3de977f444a2e356da32d3d138
|
|
| MD5 |
08006be28d4e97590526caabf19f37ff
|
|
| BLAKE2b-256 |
69be54c56a04647ed09dbf14e94e4eddfe0ff48bde4149c678fb8f1982b93620
|