Easy client-server communication
Project description
Hoist
Easy client-server communication
Quick Example
import hoist
server = hoist.start("test") # set "test" as the authentication key
@server.receive("hello")
async def hello(socket: hoist.Message, payload: dict) -> None:
print("server got hello")
await message.reply("hi")
import hoist
@hoist.connect_to("http://localhost:5000", "test") # log in to the server with key "test"
async def main(server: hoist.Connection):
@server.receive("hi")
async def hello(message: hoist.Message, payload: dict):
print("client got hi")
await server.message("hello")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hoist_http-1.0.0a3.tar.gz
(27.1 kB
view hashes)
Built Distribution
Close
Hashes for hoist_http-1.0.0a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f48a657b9db3f9a920b7c97947c4a690e29741b358a98f536ea91ed46e9736e0 |
|
MD5 | 35cd1ed94e6eac4f4709784581dde523 |
|
BLAKE2b-256 | 4db79910b7a72667d21d951cc57aba2937c90bee868e2ad8749f402deb682c24 |