ThePerson is an open-source Python simulation of a person living
inside your computer. It features a central Person class that developers
can expand with new attributes, behaviors, and quirks.
theperson/person.py is the heart of the project. Inside the script is a
Person class where you can build in.
Our goal is to simulate a human in Python with plenty of features (and create a super long script) while providing a learning opportunity for beginners and a fun activity for experienced devs, and spark imagination and creativity. We also aim to keep our community safe and engaging for everyone.
- Beginner-Friendly: Whether you’re adding a new hobby, an
eat()method, or fixing a typo, no contribution is too small. - Learn OOP by Doing: Understand classes, methods, and inheritance by literally building a human being out of code.
- Infinite Possibilities: This project is never complete. From tracking
"hunger levels" to implementing a complex
dream()system, the only limit is your imagination. - Be Part of TheTown: TheTown is a fun little community that anyone can join. Read the section below to find out more.
Read our Contributing Guidelines to get started.
You can find tasks under the Issues tab on GitHub. These are
issues labeled task and are contributions you can make with specific
instructions and more guidance.
Read the Contributing Guidelines if you're interested in working on a task.
Click HERE to see available tasks (link filtered for pinned tasks or open tasks with no assignees)
In the root directory of this repo, you will see the_town.py. Add yourself
as an instance of Person!
Read out Contributing Guidelines to get started. Any PR not following the guidelines under "TheTown" will be closed.
In this repository, maintainers are expected to minimize the use of AI and prioritize human interaction; other than in GitHub Actions workflows and assistance in code reviews, all comments, review messages, task issues, and documentation are written by human hands, ensuring any AI assistance is thoroughly reviewed and understood.
We expect the same from contributors and discourage using AI for contributions, especially for writing large amounts of code.(Read our Code of Conduct)
Just so you know, it is quite easy to tell AI-generated code apart from human-writen code.
Please read the Contributing Guidelines for more information.
To try using the project yourself on your computer, follow these steps.
On the GitHub page:
- Click the green "Code" button
- Select "Download ZIP"
- Unzip the ZIP file on your machine.
- Extract any of the files in
thepersonto implement in your own projects!
Before trying this out:
- Ensure you have Python installed on your computer. (Install the latest version here and follow installation procedures)
- Follow the steps here to download the program.
After downloading the source code:
- Open
the_town.pywith IDLE (the code editor that comes with your Python installation):Right-click the file → Open With... → IDLE- If
IDLEdoesn't appear as an option, open the IDLE app manually and selectOpen → 'the_town.py'
- If
- Edit the code however you like.
- On the menu bar at the top of your screen (or the top of the window for
Windows), select
Run → Run Module - Keep experimenting!
If you have any questions or would like assistance or guidance with coding in general, feel free to open a Discussion in this repository's GitHub page — experienced developers in our community will be happy to help you out.
If you have a question or something to say, open a discussion [here] repo-disc, or leave a comment in an existing discussion.
This project is licensed under the MIT License.
If you enjoyed contributing to this project or appreciate the concept, consider dropping us a star to help others discover it! 🙏
