Answer the question
In order to leave comments, you need to log in
How to implement simple authorization for Python?
There is a small Python script that returns simple HTML pages for other applications and visual data viewing.
I want to attach some simple authorization to this: enter a login password, see only authorized data, when requesting data from external applications, also pass a login password to receive authorized data.
Any advice on what to use? Python knowledge level - beginner
Answer the question
In order to leave comments, you need to log in
In Flask, everything is simple: flask.pocoo.org/docs/quickstart/#sessions
It's
not clear what you are using (frameworks, libraries).
As already said, you can do Basic acceess authentication on the web server, see the doc for your web server.
What's the problem?
The simplest thing is to store logins, passwords (how exactly it depends on how much you want to protect yourself) and permissions in the database, the user logs into the system, and you give the result by permissions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question