All Projects → cmyui → gulag

cmyui / gulag

Licence: MIT License
A dev-oriented, production-geared osu! server implementation in modern py

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to gulag

PepperBot
An intuitive multi-platform bot framework, write once, run everywhere. 一个符合直觉的跨社交平台机器人框架,轻松地在平台间传递消息,支持QQ、微信
Stars: ✭ 21 (-79.21%)
Mutual labels:  asyncio
aiohttp traversal
Traversal based router for aiohttp.web
Stars: ✭ 21 (-79.21%)
Mutual labels:  asyncio
simple-matrix-bot-lib
An easy to use bot library for the Matrix ecosystem written in Python. https://matrix.to/#/#simplematrixbotlib:matrix.org
Stars: ✭ 27 (-73.27%)
Mutual labels:  asyncio
AmimeWatch
Telegram bot made in Python 3 using the @pyrogram framework.
Stars: ✭ 19 (-81.19%)
Mutual labels:  asyncio
aiohttp-socks
Proxy (HTTP, SOCKS) connector for aiohttp
Stars: ✭ 147 (+45.54%)
Mutual labels:  asyncio
binance-chain-python
Binance chain SDK in Python
Stars: ✭ 22 (-78.22%)
Mutual labels:  asyncio
python-libmaas
Official python client library for MAAS
Stars: ✭ 45 (-55.45%)
Mutual labels:  asyncio
aioethereum
Ethereum RPC client library for Python asyncio (PEP 3156)
Stars: ✭ 16 (-84.16%)
Mutual labels:  asyncio
caligo
SelfBot for Telegram
Stars: ✭ 34 (-66.34%)
Mutual labels:  asyncio
Pyot
AsyncIO based high-level Python Riot Games API framework which encourages rapid development and clean, pragmatic design.
Stars: ✭ 56 (-44.55%)
Mutual labels:  asyncio
mitm
👨🏼‍💻 ‎‎‎‏‏ A customizable man-in-the-middle TCP proxy.
Stars: ✭ 44 (-56.44%)
Mutual labels:  asyncio
asyncio-mqtt
Idomatic asyncio wrapper around paho-mqtt
Stars: ✭ 137 (+35.64%)
Mutual labels:  asyncio
p3ui
C++ & Python User Interface Library
Stars: ✭ 21 (-79.21%)
Mutual labels:  asyncio
hypercorn-fastapi-docker
Docker image with Hypercorn for FastAPI apps in Python 3.7, 3.8, 3.9. Ready for HTTP2 and HTTPS
Stars: ✭ 18 (-82.18%)
Mutual labels:  asyncio
tukio
Tukio is an event based workflow generator library
Stars: ✭ 27 (-73.27%)
Mutual labels:  asyncio
fastapi-sqlalchemy-1.4-async
https://rogulski.it/blog/sqlalchemy-14-async-orm-with-fastapi/
Stars: ✭ 17 (-83.17%)
Mutual labels:  asyncio
zero
Zero: A simple, fast, high performance and low latency Python framework (RPC + PubSub) for building microservices or distributed servers
Stars: ✭ 296 (+193.07%)
Mutual labels:  asyncio
aioesphomeapi
Python Client for ESPHome native API. Used by Home Assistant.
Stars: ✭ 52 (-48.51%)
Mutual labels:  asyncio
waiter
Delayed iteration for polling and retries.
Stars: ✭ 17 (-83.17%)
Mutual labels:  asyncio
kbio
Another Async IO Framework based on io_uring
Stars: ✭ 54 (-46.53%)
Mutual labels:  asyncio

gulag - a dev-oriented, production-geared osu! server

Python 3.9+ Code style: black pre-commit.ci status Discord

gulag is an in-progress osu! server implementation geared towards running production servers - it is developed primarily by Akatsuki with our long-term goal being to replace our current Ripple stack with something more easily maintainable, reliable, scalable, and feature-rich.

Setup

# clone the repository & init the submodules
git clone https://github.com/cmyui/gulag.git && cd gulag

# clone the submodules (oppai-ng)
git submodule init && git submodule update

# python3.9 is often not available natively
# https://github.com/deadsnakes/python3.9
sudo add-apt-repository ppa:deadsnakes/ppa

# install project requirements (separate programs)
sudo apt install python3.9 python3.9-dev python3.9-distutils \
                 mysql-server redis-server nginx build-essential certbot

# install pip for python3.9
wget https://bootstrap.pypa.io/get-pip.py
python3.9 get-pip.py && rm get-pip.py

# install gulag's python requirements
python3.9 -m pip install -U pip setuptools \
                         -r requirements.txt

# setup pre-commit's git hooks
# https://pre-commit.com/
pre-commit install

######################################
# NOTE: before continuing, create an #
# empty database in mysql for gulag  #
######################################

# import gulag's mysql structure
mysql -u your_sql_username -p your_db_name < migrations/base.sql

# generate an ssl certificate for your domain (change email & domain)
sudo certbot certonly \
    --manual \
    --preferred-challenges=dns \
    --email [email protected] \
    --server https://acme-v02.api.letsencrypt.org/directory \
    --agree-tos \
    -d *.your.domain

# copy our nginx config to `sites-enabled` & open for editing
sudo cp ext/nginx.conf /etc/nginx/sites-enabled/gulag.conf
sudo nano /etc/nginx/sites-enabled/gulag.conf

##########################################
# NOTE: before continuing, make sure you #
# have completely configured the file.   #
##########################################

# reload the reverse proxy's config
sudo nginx -s reload

# create a config file from the sample & open it for editing
cp .env.example .env
nano .env

##########################################
# NOTE: before continuing, make sure you #
# have completely configured the file.   #
##########################################

# start the server
./main.py

Directory Structure

.
├── app                   # the server - logic, classes and objects
|   ├── api                 # code related to handling external requests
|   |   ├── domains           # endpoints that can be reached from externally
|   |   |   ├── api.py        # endpoints available @ https://api.ppy.sh
|   |   |   ├── ava.py        # endpoints available @ https://a.ppy.sh
|   |   |   ├── cho.py        # endpoints available @ https://c.ppy.sh
|   |   |   ├── map.py        # endpoints available @ https://b.ppy.sh
|   |   |   └── osu.py        # endpoints available @ https://osu.ppy.sh
|   |   |
|   |   ├── init_api.py       # logic for putting the server together
|   |   └── middlewares.py    # logic that wraps around the endpoints
|   |
|   ├── constants           # logic & data for constant server-side classes & objects
|   |   ├── clientflags.py    # anticheat flags used by the osu! client
|   |   ├── gamemodes.py      # osu! gamemodes, with relax/autopilot support
|   |   ├── mods.py           # osu! gameplay modifiers
|   |   ├── privileges.py     # privileges for players, globally & in clans
|   |   └── regexes.py        # regexes used throughout the codebase
|   |
|   ├── objects             # logic & data for dynamic server-side classes & objects
|   |   ├── achievement.py    # representation of individual achievements
|   |   ├── beatmap.py        # representation of individual map(set)s
|   |   ├── channel.py        # representation of individual chat channels
|   |   ├── clan.py           # representation of individual clans
|   |   ├── collection.py     # collections of dynamic objects (for in-memory storage)
|   |   ├── match.py          # individual multiplayer matches
|   |   ├── menu.py           # (WIP) concept for interactive menus in chat channels
|   |   ├── models.py         # structures of api request bodies
|   |   ├── player.py         # representation of individual players
|   |   └── score.py          # representation of individual scores
|   |
|   ├── state               # objects representing live server-state
|   |   ├── cache             # data saved for optimization purposes
|   |   ├── services          # instances of 3rd-party services (e.g. databases)
|   |   └── sessions          # active sessions (players, channels, matches, etc.)
|   |
|   ├── bg_loops.py           # loops running while the server is running
|   ├── commands.py           # commands available in osu!'s chat
|   └── packets.py            # a module for (de)serialization of osu! packets
|
├── ext                   # external entities used when running the server
├── migrations            # database migrations - updates to schema
├── tools                 # various tools made throughout gulag's history
├── main.py               # an entry point (script) to run the server
└── settings.py           # manages configuration values from the user
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].