Metadata-Version: 2.1
Name: hoist-http
Version: 1.0.0a2
Summary: Easy client-server communication
Project-URL: Documentation, https://hoist.zintensity.dev
Project-URL: Issues, https://github.com/ZeroIntensity/hoist/issues
Project-URL: Source, https://github.com/ZeroIntensity/hoist
Author-email: ZeroIntensity <zintensitydev@gmail.com>
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Requires-Dist: aiohttp>=3.8.1
Requires-Dist: click>=8.1.3
Requires-Dist: rich>=12.5.1
Requires-Dist: starlette>=0.20.4
Requires-Dist: typing-extensions>=4.3.0
Requires-Dist: uvicorn[standard]>=0.18.2
Requires-Dist: versions>=1.1.0
Requires-Dist: yarl>=1.7.2
Description-Content-Type: text/markdown

# Hoist

## Easy client-server communication

### Quick Example

```py
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")
```

```py
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")
```
