This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

ecs is an MIT-licensed Python entity/component system library for games.

There are many articles on the Internet advocating a switch to entity-based systems for game logic. However, many authors seem to burn themselves out telling why the old inheritance-based approach is problematic and how an entity system will solve your problems — without ever really explaining what it is or how to do it. This project attempts to provide an actual implementation for use in real games.

The library is called an “entity/component system” library rather than an “entity system,” as the entity portion is just one building block of the total concept.

The module is called ecs. ces is too close to something else, and while there is another library called ecs, it’s for an E-Commerce service from Amazon and is unlikely to name-clash in your projects.

As this module is in somewhat rarefied air, with not a lot of company, the concepts and API may change during development. Inspiration is taken from the Ash framework for ActionScript 3.0 and Artemis framework for Java.


ecs stands for Entity, Component, and System. Each of these parts is important. So what are these?

Simply a unique identifier, used to label components as belonging to a logical grouping.
A collection of data. Has no behavior associated with it.
Piece of code to operate on data in components for a single frame.


ecs defines a few core core classes:

  • Entity
  • Component
  • System
  • EntityManager
  • SystemManager

The Entity class is simply a representation of a unique identifier, and is not to be subclassed. The Component class is intended to be subclassed for your custom components. System is also intended to be subclassed for your custom systems.

The EntityManager is a database that stores Component subclasses, referenced by their type and entity ID. The SystemManager maintains a set of System instances and allows them to perform their operations.

The real action happens in the update() method of your subclassed System classes. A System instance queries the EntityManager database for a set of Component subclasses and operates on the data contained in them.


ecs is compatible with CPython 2.6, 2.7, 3.3, and PyPy 2.2.0. CPython 3.0–3.2 may also work, but Python 3 users are encouraged to upgrade to Python 3.3. If upgrade is not a possibility for you, please file a issue! Tests ensuring compatibility are run continuously on Travis-CI and can also be run locally using tox.

Examples, Documentation, Contributions, and Issues

ecs is a very young project. As such, work on examples and documentation is just getting started. However, if you have read some of the articles mentioned on the Entity Systems wiki, use of ecs should be quite clear. The codebase is quite small and simple and has a comprehensive set of tests to go with it. Those with questions of any sort are encouraged to open an issue. Contributions are always welcome!

Similar Projects

This module was written because current entity/component system implementations for Python are scarce or underdeveloped. Here are some other projects similar to this one:

  • PyArtemis, a seemingly unmaintained port of Artemis to Python
  • Marcus von Appen’s python-utils, which include ebs, an entity system framework similar to ecs. However, ebs does not draw a distinction between entity and component, which we feel is significant.

Further Reading

Entity/component systems are a relatively new concept. The canonical source for all entity system-related topics is the Entity Systems wiki, created by Adam Martin. Adam Martin has also written abundantly in his series of posts about Entity Systems, which are a great read for those just getting familiar with the concept.


ecs was originally created by Kevin Ward, and is now maintained by Sean Fisk. I (Sean) am using ecs in a game written using the Panda3D game engine.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ecs-0.1.tar.gz (20.6 kB) Copy SHA256 Checksum SHA256 Source Jan 13, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting