Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Pytide

Python port of Riptide, a light weight networking library.

This port provides functionality for establishing connections with clients and servers using the Riptide protocol.

Compatibility

This port was last tested for functionality with Riptide Commit 5a86ca0, Jan 26 2023

This port is compatible with Riptide 2.1.0 to 2.2.0.

The Compatibility can be tested by connecting the C# client provided in the unity folder with the server implemented in testing/serverTCPTest.py or testing/serverUDPTest.py

Compatible libraries in other languages

Getting Started

The API is mostly identical to Riptide.

Installation

From Source

Clone this repository and copy the folder "pytidenetworking" into your working directory.

Poetry

In your poetry project use

poetry add git+https://github.com/ebosseck/PytideNetworking.git

to add this project as an external dependency. This should already be sufficient to be able to use the PytideNetworking library in your poetry project.

Create a new Server

For an UDP server:

    server: Server = Server()
    server.start(PORT, 10)

For a TCP server:

    tcpTransport = TCPServer()
    server: Server = Server(tcpTransport)
    server.start(PORT, 10)

In order to process the messages:

    serverUpdater: FixedUpdateThread = FixedUpdateThread(server.update)
    serverUpdater.start()

Handling received messages:

def handleMessage(clientID: int, message: Message):
    pass # your code here
    
server.registerMessageHandler(messageID, handleMessage)

Create a new Client

For an UDP client:

    client: Client = Client()
    client.connect((SERVER_ADDRESS, PORT))

For a TCP client:

    tcpTransport = TCPClient()
    client: Client = Client(tcpTransport)
    client.connect((SERVER_ADDRESS, PORT))

In order to process the messages:

    clientUpdater: FixedUpdateThread = FixedUpdateThread(client.update)
    clientUpdater.start()

Handling received messages:

def handleMessage(message: Message):
    pass # your code here
    
client.registerMessageHandler(messageID, handleMessage)

Send Messages

    msg = message.create(MessageSendMode.Unreliable, MESSAGE_ID_HANDLED)
    msg.putString("Hello World !")
    client.send(msg)

For more details, also check out the documentation of Riptide, as well as the samples in the testing folder.

Furthermore, a low level documentation of the protocol used is available in docs/ as pdf.

Low-Level Transports supported by Pytide

  • UDP (built-in)
  • TCP (built-in)

License

Distributed under the MIT license. See LICENSE.md for more information. Copyright © 2023 VISUS, University of Stuttgart

This project is supported by VISUS, University of Stuttgart

Metadata

Release files for pytide-networking 2.1.0a0

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

Source distribution (sdist)

Source distribution for pytide-networking 2.1.0a0
File Size Uploaded Provenance Actions
pytide_networking-2.1.0a0.tar.gz 38.6 kB Without provenance Details for pytide_networking-2.1.0a0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytide-networking 2.1.0a0
File Interpreter ABI Platform Actions
pytide_networking-2.1.0a0-py3-none-any.whl Python 3 none any Details for pytide_networking-2.1.0a0-py3-none-any.whl

Total release size: 92.5 kB

Release files / pytide_networking-2.1.0a0.tar.gz

Download URL pytide_networking-2.1.0a0.tar.gz
Size 38.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4715e7cfcddd3fc65530f9e938a3c88c1c751a07952b308b2723532c419e1530
BLAKE2b-256 checksum
How to use checksums
db19ae1da1e16dd957e23d793f35609d00d122e983cbbc69edc6ac80b3b1a1a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.0

Release files / pytide_networking-2.1.0a0-py3-none-any.whl

Download URL pytide_networking-2.1.0a0-py3-none-any.whl
Size 53.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb895d7f8ca30744e92259a74243039fdeb97abf78e97b2fe54d13644048c33f
BLAKE2b-256 checksum
How to use checksums
e412a52818f1eed60bc0eafca5a5b83e33ce58118cdddf2b8fa9bd86add4216e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.0

Security for pytide-networking 2.1.0a0

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.

Release history Release notifications | RSS feed

This release
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