{"id":19985098,"url":"https://github.com/rakin406/pecs","last_synced_at":"2025-03-01T20:24:16.500Z","repository":{"id":207940231,"uuid":"720455776","full_name":"rakin406/pecs","owner":"rakin406","description":"An entity component system (ECS) for Python","archived":false,"fork":false,"pushed_at":"2024-06-12T11:54:29.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T11:27:54.680Z","etag":null,"topics":["data-oriented-design","ecs","entity-component-system","game-development","gamedev","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rakin406.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-18T14:43:41.000Z","updated_at":"2024-06-12T11:54:28.000Z","dependencies_parsed_at":"2023-12-04T05:38:12.602Z","dependency_job_id":"dd54e154-75c3-4266-95f7-b2407cc704f6","html_url":"https://github.com/rakin406/pecs","commit_stats":null,"previous_names":["rakin406/pecs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakin406%2Fpecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakin406%2Fpecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakin406%2Fpecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rakin406%2Fpecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rakin406","download_url":"https://codeload.github.com/rakin406/pecs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241419442,"owners_count":19959900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-oriented-design","ecs","entity-component-system","game-development","gamedev","python"],"created_at":"2024-11-13T04:22:42.126Z","updated_at":"2025-03-01T20:24:16.478Z","avatar_url":"https://github.com/rakin406.png","language":"Python","readme":"# Introduction\n**pecs** is a library for integrating Entity Component System (ECS) with game\ndevelopment. It is inspired by [**entt**](https://github.com/skypjack/entt),\nanother ECS library but for C++.\n\nFrom [Wikipedia](https://en.wikipedia.org/wiki/Entity_component_system):\n\n\u003e **Entity component system (ECS)** is a software architectural pattern mostly\n\u003e used in video game development for the representation of game world objects.\n\u003e An ECS comprises _entities_ composed of _components_ of data, with _systems_\n\u003e which operate on entities' components.\n\n## Code Example\n```python\nimport pecs\n\nfrom dataclasses import dataclass\n\n\n@dataclass\nclass Position:\n    x: float\n    y: float\n\n\ndef update(registry: pecs.Registry):\n    view: list = registry.view(Position)\n    for entity in view:\n        pos = registry.get(entity, Position)\n        ...\n\n\ndef main():\n    registry = pecs.Registry()\n\n    for i in range(10):\n        entity = registry.create()\n        registry.emplace(entity, Position(i * 2, i))\n\n    update(registry)\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## Authors\n\nRakin Rahman\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frakin406%2Fpecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frakin406%2Fpecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frakin406%2Fpecs/lists"}