I'm working on a project where I want to build a webpage that generates timetables using Python. I've been trying to use SQLite3 along with an AI model, but I've run into issues related to creating an NGrok tunnel, which led to problems with generating the intended URL. Can someone explain why NGrok is needed, or suggest any alternatives for developing a web app in Python? Thanks for your help! By the way, I think I might have been mixing concepts, and I'm considering using Flask instead.
3 Answers
NGrok is primarily for exposing your localhost to the internet, which isn't necessary for building a web app in Python. Just start with Flask, and you can run it and visit localhost:5000 in your browser. If you're looking for something a bit more modern, FastAPI could be a good option, but Flask is simpler for beginners. I did a project with Flask for my studies, and it was pretty easy to grasp! You can pick up the basics in just a few hours.
It sounds like you're getting a bit mixed up with concepts. NGrok is only necessary if you want to expose your local server to the internet, like for testing webhooks or sharing your progress with someone remotely. For your timetable generator, you should really focus on getting Flask or Django running locally first before worrying about deployment. Once you have Flask set up with your SQLite database, you can figure out the URL generation issues later. Flask is pretty straightforward for this type of project, and you've got this! Oh, and if you need alternatives to NGrok down the line, consider LocalTunnel or deploying on Heroku or Render when you're ready to go live.
NGrok is mainly for local testing, and with Flask, you can run everything locally unless you need to show it to someone outside your network. For simpler alternatives, have a look at Streamlit for quick data-driven sites, or Render/Railway for easy, free hosting.

I feared that was the problem-- I'm still an amateur coder, so this clears up a lot! Thanks 😀