https://github.com/eruvanos/mcore
Python code I always use!
https://github.com/eruvanos/mcore
Last synced: 8 months ago
JSON representation
Python code I always use!
- Host: GitHub
- URL: https://github.com/eruvanos/mcore
- Owner: eruvanos
- License: mit
- Created: 2020-10-17T00:22:13.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-04T00:14:07.000Z (about 1 year ago)
- Last Synced: 2025-01-30T21:16:12.220Z (10 months ago)
- Language: Python
- Size: 347 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MCore - Maic's Core Utils
Collection of Python code I always copy into new projects.
Supportive code for logging, testing, network, and arcade game development.
## Installation
```
pip install git+https://github.com/eruvanos/mcore.git#main
or
pip install git+https://github.com/eruvanos/mcore.git#main[]
```
## Overview
### General
* `mcore.log.configure()` - configures loggers (stdout: info|debug; stderr: warn|error)
* `mcore.serialize.EnhancedJSONEncoder` - json support for dataclass
* `mcore.enum.AutoNameEnum` - the missing AutoNameEnum
* `mcore.dispatcher.Dispatcher` - Dispatcher for objects, register listener by type
* `mcore.dispatcher.AsyncDispatcher` - Like `Dispatcher` with async interface
### Networking
> `mcore.net.SecureNetwork` requires `mcore[secnet]`
* `mcore.net.Packet` - Dict like wrapper with access to items via attributes
* `mcore.net.Network` - Handles data transfer via socket
* `mcore.net.SecureNetwork` - Like `Network` with end-to-end encryption
* `mcore.net.AIONetwork` - Like `Network` with async interface
### Test
> requires `mcore[test]`
* `mcore.test.local_dynamodb` - Manage local dynamodb within test setups
* `mcore.test.mock_server` - Mock json API with Flask in test setups
### Game development
> requires `mcore[game]`
* `mcore.game.fps.FPSDisplay` - Pyglets FPSDisplay with fix for arcade
* `mcore.game.frozen` - Utils for frozen environments (PyInstaller)
* `mcore.game.sound.SoundPlayer` - Sound controls (music, sound effects, adjust volume)
* `mcore.game.animation.Animation` - Time based animations within arcade
* `mcore.game.transition.Effect` - Time based change of values
* `mcore.game.esper_ext.World` - improved version of `esper.World`
* `mcore.game.predict.PredictedValue` - Helper to smooth network latency
* `mcore.game.camera` - different camera implementations
* `MarginCamera` - Camera keeps margin between borders and tracked sprite
* `ZoomCamera` - Supports zoom
* `FreeCamera` - Moveable with mouse interaction