Skip to main content

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

pykworldsim-0.1.0.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pykworldsim-0.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

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

Hashes for pykworldsim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bafe2e56c37a9a1b7b26b817a0d076c0d4ea853d63ff0df63da74af7f2647ce2
MD5 6174472fa0d15c13bef05530c8d1f232
BLAKE2b-256 bcb59794810581d18ef8786686eb117032ab90af3b21792b8b876f0dc2c96f8f

See more details on using hashes here.

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

Hashes for pykworldsim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32b3bfd982d72e918c1067f070565213fb67fca6144d73e6d745f0b84b435a20
MD5 7874d95cc9f02417b17b51c3b098ea1a
BLAKE2b-256 52ff305d33a55ff1f0cfbaa491f33e8c3f14c3020798602520cfd29f47f5f035

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page