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.0a2.tar.gz
(22.7 kB
view hashes)
Built Distribution
Close
Hashes for hoist_http-1.0.0a2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2e9d5a60c845647cb969f1c50d9fbbdbf320443ec17de73a9dedfef1d570eaa |
|
MD5 | 2e813178d1e11455616588118126ee6d |
|
BLAKE2b-256 | f62a9ecd58199ca77106fee94cb0136b08d88740a12e903a0d4a48c1492649d8 |