A straightforward, nimble ECS for Python
A straightforward, nimble ECS for Python.
Scroll down to learn more, or check out the documentation!
snecs is an ECS library, written from the ground up to be:
The snecs API is designed to be both easy-to-use, and encourage cleanly structured code. It follows a simple principle - functions do things, classes represent things - in an attempt to reduce the incidence of antipatterns like ClassesAsNamespaces.
snecs is written with a benchmark-driven approach. Every statement in the hot path is benchmarked against alternative ways to express the same behavior, to let your code run as fast as you need it to.
One of the design goals is outrunning esper, and eventually I’ll have a benchmark suite to post here.
snecs has no dependencies whatsoever, other than Python 3.6 or higher; you won’t need to worry about deprecation warnings from dependencies, or having to install systemwide libraries for dependencies to work - because there are none! Installing snecs is as simple as running:
$ pip install snecs
snecs is written entirely in Python. It does not use any modules written in C or any other language, which means that you don’t have to worry about needing a C compiler if there are no wheels for your platform and distribution, and that it works perfectly under PyPy, and gets the full benefit of its JIT compiler and optimizations.
snecs is checked against a very aggressive mypy configuration to catch bugs and let you fully enjoy the library even when writing type-annotated code. You won’t have to # type: ignore any use of snecs.
Over a third of the non-blank lines in the snecs/ directory are comments. If you ever need to dive into the code to see how snecs works under the hood, they will guide you through the source and explain every workaround, optimization, and obscure trick you might find non-obvious.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size snecs-1.2.1-py3-none-any.whl (38.2 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size snecs-1.2.1.tar.gz (29.4 kB)||File type Source||Python version None||Upload date||Hashes View|