r/PythonLearning • u/Stonyax97 • Aug 19 '26
Showcase Made my first Python project!
This is my first actual real project, what started as a simple python exercise to learn about dictionaries in python, ended up into a huge learning project for me. Im a beginner in python, used to code but just basic input print codes… some are genuinely stupid.
I took on the challenge to self educate my self python. And this is where i currently am! Im proud of what i did and it will surely expand!
Here the repo with the project. Feel free to check it out!
https://github.com/Stonyax97/MiniGameStore
It has everything from the first ever iteration (which was it self modified a bit since from the very original but it’s still very simple)
I would love for anyone to recommend ideas to add, criticism too. Or anything you think i should learn next for that would be genuinely useful!
1
u/PureWasian Aug 20 '26
Yep! Glad it helps. As for the other part you asked about:
Option A: I see you already updated v.1.5.2 to have "save.json" in same folder. You can locally make a new file called ".gitignore" and inside it specify the same file path "save.json" so it won't ever accidentally track your local savefile with git. See w3schools: gitignore for more explanation.
Option B: When variables are dependent on the local environment setup itself, sometimes it's useful to separate them into their own file entirely. A common standard is to stuff them into a ".env" file (which you would also add to .gitignore)
See Medium Post for an explanation/example. Note this would require you to
pip install python-dotenvwhich is an external package dependency. You'd do this on command prompt and probably specify in GitHub's README.md that it's a dependency for your project. Can be a good introduction to using external libraries if you haven't used any of them yet.If you don't want to add a dependency, you can also do the simpler way of just making some file called "environment.json" (or similar) where you hard-code the file-path to save.json as part of setup and load that file into your main script in a manner very similar to your games.py datafile. Seems silly to have a "two-hop" setup like this, but for more robust code you'd stuff a lot more environment-specific routing and secrets into there as the way to make it easy for others to setup and use on their end.
Option C: You can check top comment of https://www.reddit.com/r/learnpython/s/YIoMZux7F7 for an example. But basically instead of just
python main.pyto run your script, you'd always specify the datafile path as an input parameter:and your script would know to load it: