Skip to main content
snecs

snecs

A straightforward, nimble ECS for Python.

PyPI PyPI - Python Version PyPI - Implementation Mypy: checked GitHub

snecs is a pure Python 3.6+, dependency-free ECS library, heavily inspired by Rust’s Legion, and aiming to be as fast and easy-to-use as possible.

Scroll down to learn more, or check out the documentation!

Overview

snecs is an ECS library, written from the ground up to be:

Straightforward!

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.

Nimble!

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.

Dependency-free!

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

Pure Python!

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.

Fully typed!

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.

Lovingly-commented!

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.

License

snecs is made available under the terms of the Mozilla Public License Version 2.0, the full text of which is available here, and included in LICENSE. If you have questions about the license, check Mozilla’s MPL FAQ.

Metadata

Release files for snecs 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snecs 1.2.2
File Size Uploaded
snecs-1.2.2.tar.gz 29.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snecs 1.2.2
File Interpreter ABI Platform
snecs-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 67.6 kB

Release files / snecs-1.2.2.tar.gz

Download URL snecs-1.2.2.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e71c4500d8bf1c536c64517a5e2c168ae3683dd1b1e6139074879967aa927779
BLAKE2b-256 checksum
How to use checksums
39d68665a33a4be1547f0eaa70d1bc79efd9a1b7f084e648e99da095e0387dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.8.8-arch1-1

Release files / snecs-1.2.2-py3-none-any.whl

Download URL snecs-1.2.2-py3-none-any.whl
Size 38.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc7797c258ec4691d99e4b146d8cb4b44d80bff3778020bde56bc7a72d988adb
BLAKE2b-256 checksum
How to use checksums
7f960c6d170281522f924b23dd4a51b414f0c179a4c8ad1250d47570f4a26138
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.8.8-arch1-1

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page