Metadata-Version: 2.1
Name: verox
Version: 0.0.7
Summary: An implementation of IPC using websockets.
Home-page: https://github.com/YodaPY/verox-ipc
Author: Yoda
Author-email: yodarlswitch@gmail.com
License: MIT
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8.0,<3.11
Description-Content-Type: text/markdown
License-File: LICENSE

# Verox
Verox (inspired by [discord-ext-ipc](https://github.com/Ext-Creators/discord-ext-ipc)) is an implementation of [IPC](https://en.wikipedia.org/wiki/Inter-process_communication) using websockets.
It's designed to make dashboard development a lot easier and quicker.
While it's aimed at the hikari community, it does not depend on it at all which means you can use it for any discord API wrapper you like.

## Installation
```
pip install verox
```

## Usage

Verox is split into client-side and server-side. The client-side is usually the web app, the server-side is the bot.

The following example uses [quart](https://github.com/pgjones/quart) and [hikari](https://github.com/hikari-py/hikari):

`webapp.py`
```py
from quart import Quart
from verox import Client

app = Quart(__name__)
client = Client("your_secret_key")

@app.route("/")
async def home():
    count = await client.request("guild_member_count", guild_id=1234567890)
    return str(count)

app.run(debug=True)
```

`bot.py`
```py
import hikari
import verox

bot = hikari.GatewayBot(token="your_token", intents=hikari.Intents.GUILD_MEMBERS)
server = verox.Server("your_secret_key") #must match the secret key of your client

@verox.endpoint()
async def guild_member_count(context: verox.Context):
    return len(bot.cache.get_members_view_for_guild(context.data.guild_id))

server.start()
bot.run()
```

For more advanced examples, please take a look at [examples](examples) and its README

