Gameserverbackend

Latest version: v0.0.4

Safety actively analyzes 682334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3

API change:
- `requestProcessor.AbstractGame` has a new required abstract method `listPlayers`, with signature: `def listPlayers(self) -> List[Player]`
- This was required to allow players to rejoin a game by checking if they are already in it
- Also necessary for upcoming feature of code that writes games & players into a database for another process like a webserver to read

Other changes:
- minor cleanup
- fixed bug that prevents people from rejoining a game they are already in
- fixed bug where sending a message of "history" can call a method that doesn't exist
- added listPlayers to the AbstractGame
- cap on the URL of 2000 characters
- cap on names of 32 characters
- an implementation of TokenStorage using sqlite, PersistentTokenStorage
- updated docs

PyPI

0.0.4

API Change
- A new class: `AbstractTimeGame`
- it is a subclass of `AbstractGame`
- has a `onTimer` abstractmethod that is called every x seconds, where x is configurable in the `Server.run` call
- New Response class: `TimerResponse`
- It does not derive from `Response` because it lacks a sender as
it is time-triggered, not player triggered. `TimerResponse` allows the
`onTimer` method to send updates to players.
- New config options
- `ip` & `port` can now be specified in the config rather than with their own arguments
- `ip`: `str`
- `port`: `int`
- `printAllOutgoing`: `bool` makes the server print out all outgoing data for debugging purposes
- `Server.run` has two new optional arguments
- `timeout` is a float representing the seconds between calling games' `onTimer` method. If it is left at `None`, the timer does not run at all.
- `callOnTimer` is a function that takes no arguments and returns `None` and is called together with the `onTimer` method of games.


Internal
- `_ServerFactory` has a new method `handleTimerResponse` that processes the `TimerResponse` objects
- `_ServerFactory` has a new argument `printAllOutgoing` that is used to pass the config from the `Server` class.

0.0.3

0.0.2

0.0.1

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.