1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 11:34:18 +00:00
Services network for the RYG community
Find a file
2020-09-15 17:32:56 +02:00
.github/workflows I ran reformat code on the whole project 2020-08-05 02:52:06 +02:00
docs Update index.html 2020-08-10 01:47:29 +02:00
docs_source BREAKING: Drop matrix support (for now) 2020-08-19 00:22:08 +02:00
pycharm_templates Add apistar pycharm template 2020-05-07 01:20:46 +02:00
royalnet 🐞 Fix find_author not working in callbacks 2020-09-04 03:21:35 +02:00
.gitattributes Update docs 2020-01-30 19:33:15 +01:00
.gitignore Bump version 2020-01-16 02:27:56 +01:00
.sentryclirc I ran reformat code on the whole project 2020-08-05 02:52:06 +02:00
LICENSE.txt Create LICENSE.txt 2020-03-28 00:31:04 +01:00
poetry.lock ⬆️ Update prehistoric lock file 2020-09-15 17:31:47 +02:00
publish.bat Fix publish.bat 2020-05-28 17:05:29 +02:00
pyproject.toml ⬆️ Bump version to 5.11.10 2020-09-15 17:32:56 +02:00
README.md BREAKING: Drop matrix support (for now) 2020-08-19 00:22:08 +02:00
sample_config.toml I ran reformat code on the whole project 2020-08-05 02:52:06 +02:00

royalnet PyPI

A framework for small Internet communities

About Royalnet

royalnet is a Python framework composed of many interconnected services that may be useful to small Internet communities (gaming clans, university groups, etc).

Serfs

Serfs are services that allow Royalnet to respond to chat commands on multiple chat platforms.

Commands using the Royalnet Serf API share their code between chat platforms: each serf will handle the specifics for their respective platform, preventing potential bugs due to code duplication!

Supported chat platforms

More can easily be added by implementing a new serf!

Alchemy

The Alchemy module allows all Royalnet services to use a PostgreSQL database with a SQLAlchemy interface.

This allows the usage of a shared and easy-to-use ORM: Alchemy handles for you everything, from the creation of new tables to isolating in transactions the calls made from a Serf command to the database.

Herald Network

All Royalnet services can communicate with each other through the Herald Network, a websockets-based system allowing Remote Procedure Calls ("events") between services.

For example, in response to a Telegram message, the Telegram Serf can contact the Discord Serf to ask it to connect to voice chat in Discord.

Connections between different hosts are possible too, even if they currently are unused by the Royalnet Launcher.

Constellation

The Constellation service is a Starlette-based webserver that can supply dynamic pages ("stars") while being connected to the other parts of Royalnet through the Herald.

APIs

The Constellation service also offers utilities for creating REST APIs as Python functions with dicts as inputs and outputs, leaving (de)serialization, transmission and eventually authentication to Royalnet.

Sentry

Royalnet can automatically report uncaught errors in all services to a Sentry-compatible server, while logging them in the console in development environments to facilitate debugging.

Packs

New Serf commands, Constellation stars, Herald events and Alchemy tables can be added to Royalnet through plugins called "Packs" that can be activated or deactivated on each single instance.

Config

Each pack can access only its individual section in the configuration file, preventing key conflicts (as long as the packs themselves don't share the same name).

Template

New packs can be created starting from this GitHub template.

Installing Royalnet

To install royalnet, run:

pip install royalnet

To install a specific module, run:

pip install royalnet[MODULENAME]

To install all royalnet modules, run:

pip install royalnet[telegram,discord,matrix,alchemy_easy,bard,constellation,sentry,herald,coloredlogs]

Documentation

A work-in-progress documentation is available here.

Developing for Royalnet

To develop for royalnet, you need to have Poetry installed on your PC.

After you've installed Poetry, clone the git repo with the command:

git clone https://github.com/Steffo99/royalnet

Then enter the new directory:

cd royalnet

And finally install all dependencies and the package:

poetry install -E telegram -E discord -E matrix -E alchemy_easy -E constellation -E sentry -E herald -E coloredlogs

Help!

Need help in anything Royalnet-related? Open a issue on GitHub!