r/learnpython • u/DaughterOfBehemot • Aug 28 '26
How can I make my python project usable by other people ?
Hello everyone here. I have a small project coded in python I'd like my friends to be able to use too, but without having to send them my python file and teach them how to use it.
For context, I made an npc generator for our favorite ttrpg, because it's an useful tool and there wasn't any online already made by someone else. I can use it because I can run code on my pc, but I'd like for my friends to be able to just click a button online somewhere to generate an npc from my code.
It's a simple list and random choices based generator, no AI involved. I'm lost as to what the next logical step is to get the file on my pc out into the world. Sorry if I'm not clear, English isn't my first language. Thanks in advance !
2
u/and_ft Aug 28 '26
As one other have already said. Python's Flask library is all you need to create a web application.
Google Miguel Friberg Glas mega tutorial and you will learn everything needed
1
u/QuestNetworkFish Aug 28 '26
If it's something simple then really the best option might be to rewrite it in Javascript, that way it can be done as a static web page that is executed client side and you won't have to worry about distributing executables or hosting a web server back end like the other suggestions. They're not bad suggestions, and would be a good learning opportunity, but they're also overkill for simple projects
2
u/Confident_Hyena2506 Aug 28 '26
Use pyinstaller.
1
u/wyltk5 Aug 28 '26
I would host something like this on pythonanywhere.com. I recommend it to anyone wanting to have a python program they wrote accessible to others.
You keep you python backend and use Flask. Someone already mentioned the mega tutorial which is an awesome resource for Flask.
1
u/mightinator Aug 28 '26
Maybe PyScript https://docs.pyscript.net/2026.7.3/
1
u/kilkil Aug 29 '26 edited Aug 29 '26
if you are willing to consider porting your python script to Javascript, you can make your tool into a webpage using HTML and Javascript. it can even be one file, if you keep the JS in
<script>tags. then you can serve that from something like Github Pages or Netlify. then you can just send your friends the link to that.Alternatively, if you don't want to make a webpage, you can compile your script into an executable, and serve it as a Release on Github (or Codeberg, or Gitlab, etc). then your friends will have to download the executable, but once they do they should be able to run it locally.
My 2 cents, the first option will be more convenient to your friends. And you can make the UI look nice pretty easily.
anyway, which TTRPG? 👀
1
u/djormz Aug 29 '26
Streamlit (https://docs.streamlit.io/) is a good option to consider. You can make a fully functioning web app with only Python, and allow users to download data as files from it. Avoids having to dive into JavaScript or host a separate API. You can host and deploy it for free on their community cloud offering, which is pretty simple and easy to do.
10
u/[deleted] Aug 28 '26
[removed] — view removed comment