snecs - the straightforward, nimble ECS for Python

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.

Read the Changelog, or scroll down to get started.


snecs is hosted on PyPI; you can install it the same way as any PyPI package. Depending on the dependency manager you’re using for your project 1:


$ pip install snecs


$ pipenv install snecs


$ poetry add snecs


The main part of this documentation is A guided tour of snecs, which is structured into sections of increasing technical detail. It’s written manually, and intended as a gentle introduction to the library and underlying design pattern that doesn’t require or presume familiarity with the core concepts.

The guided tour is supplemented by the API Reference, generated from the source code docstrings.

To start learning how to use snecs:

  • If you’re not familiar with Entity-Component-Systems, the What’s an ECS? page provides a quick explanation of the design pattern.

  • When you’re ready to start developing with snecs, read Getting started. It’s a high-level explanation of the library, detailing the general flow of working with it.

  • You can find the full documentation of all the names that are part of the snecs public API in API Reference.

Indices and tables



I highly recommend Poetry. It offers a very pleasant development experience, and makes it effortless to manage dependencies, and your entire project.

Regardless of which tool you’re using, I recommend installing snecs and other Python packages in a virtual environment. Poetry and Pipenv handle that for you!