Skip to main content

A multipurpose bot and web framework

Project description

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!

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

royalnet-5.11.18.tar.gz (60.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

royalnet-5.11.18-py3-none-any.whl (85.6 kB view details)

Uploaded Python 3

File details

Details for the file royalnet-5.11.18.tar.gz.

File metadata

  • Download URL: royalnet-5.11.18.tar.gz
  • Upload date:
  • Size: 60.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.6 Linux/5.9.1-arch1-1

File hashes

Hashes for royalnet-5.11.18.tar.gz
Algorithm Hash digest
SHA256 9095ca0caa6f140040b52149d6fb49dc9a2e4dcdad890b2217d9b44c3fcff39c
MD5 d12d2e1eb116470649dc12f93d0cf06f
BLAKE2b-256 522a9812c0140258cf69de4612256ea1906033f75dd5f13abc38aa3fff04247e

See more details on using hashes here.

File details

Details for the file royalnet-5.11.18-py3-none-any.whl.

File metadata

  • Download URL: royalnet-5.11.18-py3-none-any.whl
  • Upload date:
  • Size: 85.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.6 Linux/5.9.1-arch1-1

File hashes

Hashes for royalnet-5.11.18-py3-none-any.whl
Algorithm Hash digest
SHA256 466569adfd91e4935042c6ce5870aa8a2ec06c482e0566606d6d443189b84214
MD5 68efa56035464a1fd26cb15f01a338d0
BLAKE2b-256 70cdd726a0cf4196be79b6fa19c55df0e3e1e9036a58040dc12b6d3d74ac2d2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page