PyGaSe
Python Game Server
A package for Python 3.6+ that contains a game-ready client-server architecture and UDP-based network protocol.
It deals with problems such as package loss or network congestion so you don't have to. Instead it gives you a high-level API to easily connect clients and backends that share a synchronized game state and exchange events. The async framework for this one is curio, which I highly recommend.
PyGaSe is built to be easy to use, lightweight, fast, scalable and reliable. You can build a fast-paced real-time online game with this. You can also build a large-scale MMO with thousands of clients if you like.
I'm actively developing PyGaSe in the context of several Indie game projects and I'm happy to share it.
BREAKING CHANGE: Version 0.2.0 is basically a new API and updating from 0.1.9 or lower will break you code. It is also much more stable, flexible and powerful, so make sure to use 0.2.0 or higher.
Installation
pip install pygase
or better yet poetry add pygase. Seriously, use poetry, it's a revelation.
Usage
API Reference & Tutorials
For API documentation and a Getting Started section go here.
Example
This example game implements an online game of tag, in which players can move around, while one of them is the chaser who has to catch another player. A player who has been catched becomes the next chaser and can catch other players after a 5s protection countdown.
Run server.py first, then run client.py in additional terminal sessions to add players.
Only use the same player name once.
Debugging & Logging
You can use the standard logging module. On level INFO you will get logging output for events such as
startups, shutdowns, new connections or disconnects. On DEBUG level you get detailed output right down to the level
of sending, receiving and handling single network packages.
Debug logs are also a good way to understand the inner workings of PyGaSe.
Changes
0.3.1
- improved documentation
- minor logging fixes
0.3.0
- sticking to SemVer from here on out
- logging added using the standard
loggingmodule - improve event handler arguments
Backendclass added to reduce server-side boilerplate- various bugfixes
0.2.0
- complete overhaul of pygase 0.1.x with breaking API changes
Metadata
Release files for pygase 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygase-0.3.1.tar.gz | 23.0 kB | Without provenance | Details for pygase-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygase-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for pygase-0.3.1-py3-none-any.whl |
Total release size: 49.1 kB
Release files / pygase-0.3.1.tar.gz
| Download URL | pygase-0.3.1.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3423c66181c2984168bfe208111f442fc897e238b542d1854ed43eefe8d135c6
|
|
BLAKE2b-256 checksum How to use checksums |
fd8e15010e003b4c614f30cc6d5561d455801a26640218beceb6125b11fcaf61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.12 CPython/3.6.5 Windows/10
|
Release files / pygase-0.3.1-py3-none-any.whl
| Download URL | pygase-0.3.1-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b1c8a129c1aade08fa9e14b69b747c56273e1212ff47b49a85c49dd500fc6151
|
|
BLAKE2b-256 checksum How to use checksums |
9eec4bbd4af36b29d17c1a7000d4f3ec54d7dc8d6f949f08dfc1ac00fa7e844d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.12 CPython/3.6.5 Windows/10
|
Security for pygase 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.