Skip to main content

Multiplayer w/ Supabase Realtime Python

Project description

Multipy

Make multiplayer in Python simple!

Quick Intro

Install it

pip install realtime mltipy

And use it

import multipy

# Create a new client
# Initialize by passing the Project ID and key...
client = multipy.Client(("<PROJECT ID>", "<API KEY>"))

# ...Or use a `.env`
### .env ###
# PROJECT_ID=<PROJECT_ID>
# API_KEY=<API KEY>
client = multipy.Client(open("./.env"))

async def main():
    client.set_username('client1')
    await client.activate()

    await client.join_room('<ROOM NAME>')
    await client.listen()

    # Recieve some stuff..
    @client.on_event("msg")
    def on_msg(payload):
        print(payload)
    
    # Or send some!
    await client.send_event

    # Do Stuff...
    await client.terminate()
    # or use this
    -client

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

mltipy-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

mltipy-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file mltipy-0.1.0.tar.gz.

File metadata

  • Download URL: mltipy-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mltipy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e1c1c53cd4d0e436888a389e4df37e10d89528ba79e601e354f8f41f5110203f
MD5 42a5bb6285ce8465906c10dfef2c73af
BLAKE2b-256 b875f852b8690f321f4c13af2ca106c5613aa3392d81ede8ce7200474e552912

See more details on using hashes here.

Provenance

The following attestation bundles were made for mltipy-0.1.0.tar.gz:

Publisher: publish.yaml on Crunchitect/multipy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mltipy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mltipy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for mltipy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 724df601cc0b48703cfec1df83c2dbf0a8383a57746c927bf2921b548b2e1140
MD5 ac097def07e6e6d51ffd045f216d2395
BLAKE2b-256 29a36fb0e64f1bd59686cacc284dfecfa26c7317fbff9a556c9f0dc1845b7923

See more details on using hashes here.

Provenance

The following attestation bundles were made for mltipy-0.1.0-py3-none-any.whl:

Publisher: publish.yaml on Crunchitect/multipy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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