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.1.tar.gz (17.7 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.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file pykworldsim-0.1.1.tar.gz.

File metadata

  • Download URL: pykworldsim-0.1.1.tar.gz
  • Upload date:
  • Size: 17.7 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.1.tar.gz
Algorithm Hash digest
SHA256 94204e27409ef2276153779f7ab9990739a8bb80ee09e7957367c5da005bd881
MD5 87c29673eb072b8fa4a49e6526a496a0
BLAKE2b-256 0761f16e9a98ed972f77c411f3626426886df093042a66850ce843240fe7fd03

See more details on using hashes here.

File details

Details for the file pykworldsim-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pykworldsim-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c4dc59f643f51a798d6aa68be27dac5aae001b2ab1d7691337ab61f0598ccf5
MD5 7a62bede0d8fecde61b99e6f3e3484f3
BLAKE2b-256 c8e01282d32f7c2fc432d7b81584dfd56fda7480767bef65fbfe9f8e1251583e

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