A python library that simulates a world with people, relationships, and cities
Project description
๐ PyKWorldSim
A lightweight Python simulation engine for modeling people, relationships, cities, and dynamic worlds.
PyKWorldSim provides a modular framework to simulate interactions between entities such as individuals, locations, jobs, and events โ making it useful for experiments in AI, social simulations, and system modeling.
๐ Features
- ๐ค Person system โ create and manage individuals
- ๐ค Relationships โ model connections between people
- ๐๏ธ Locations & cities โ simulate environments
- ๐ผ Jobs & roles โ assign occupations
- ๐ฏ Goals โ define motivations and behaviors
- ๐ Events โ simulate time-based interactions
- ๐ Reports โ analyze simulation outcomes
๐ฆ Installation
From PyPI (after publishing)
pip install pykworldsim
For local development
pip install .
๐ง Basic Usage
from pykworldsim.world import World
from pykworldsim.person import Person
# Create world
world = World()
# Create people
alice = Person(Name="Alice")
bob = Person(Name="Bob")
# Add people to the world
world.addPerson(alice)
world.addPerson(bob)
# Run simulation step (example)
world.Simulate()
# Generate report
report = world.generate_report()
print(report)
๐ Project Structure
pykworldsim/
โ
โโโ pykworldsim/
โ โโโ world.py
โ โโโ person.py
โ โโโ relationship.py
โ โโโ goal.py
โ โโโ event.py
โ โโโ job.py
โ โโโ location.py
โ โโโ report.py
โ
โโโ pyproject.toml
โโโ README.md
โโโ LICENSE
โ๏ธ Requirements
- Python 3.8+
๐ Use Cases
- AI simulations
- Social behavior modeling
- Game prototyping
- Agent-based systems
- Experimental world-building
๐ License
This project is licensed under the MIT License.
๐ค Author
Kairav Dutta
โญ Contributing
Contributions, issues, and feature requests are welcome and appreciated!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pykworldsim-0.1.0.tar.gz.
File metadata
- Download URL: pykworldsim-0.1.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bafe2e56c37a9a1b7b26b817a0d076c0d4ea853d63ff0df63da74af7f2647ce2
|
|
| MD5 |
6174472fa0d15c13bef05530c8d1f232
|
|
| BLAKE2b-256 |
bcb59794810581d18ef8786686eb117032ab90af3b21792b8b876f0dc2c96f8f
|
File details
Details for the file pykworldsim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pykworldsim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32b3bfd982d72e918c1067f070565213fb67fca6144d73e6d745f0b84b435a20
|
|
| MD5 |
7874d95cc9f02417b17b51c3b098ea1a
|
|
| BLAKE2b-256 |
52ff305d33a55ff1f0cfbaa491f33e8c3f14c3020798602520cfd29f47f5f035
|