🌪️ Twist
Fast and reliable distributed systems in Python.
Installation
pip install twist
Example
This example runs the server and client in the same Python program using subprocesses, but they could also be separate Python scripts running on different machines.
def server():
import twist
server = twist.Server(2222)
server.bind('add', lambda x, y: x + y)
server.bind('greet', lambda msg: print('Message from client:', msg))
server.start()
def client():
import twist
client = twist.Client('localhost', 2222)
future = client.add(12, 42)
result = future.result()
print(result) # 54
client.greet('Hello World')
if __name__ == '__main__':
import twist
server_proc = twist.Process(server, start=True)
client_proc = twist.Process(client, start=True)
client_proc.join()
server_proc.kill()
print('Done')
Metadata
Release files for twist 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| twist-0.1.0.tar.gz | 25.4 kB | Without provenance | Details for twist-0.1.0.tar.gz |
Release files / twist-0.1.0.tar.gz
| Download URL | twist-0.1.0.tar.gz |
|---|---|
| Size | 25.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1de4d9283f65f2632d306f451e9fb9b1ec04476cae00b487ba3af45b7ce04c1a
|
|
BLAKE2b-256 checksum How to use checksums |
1c9f1b3a272b8df3ff9772e4eaede6f88e61ad8fb379c05938016d9979cfab47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Security for twist 0.1.0
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.