A
A
alex-bul2019-08-21 21:17:07
Python
alex-bul, 2019-08-21 21:17:07

How to connect a python application and a database?

Hello, I wrote a small application that has an authorization function, so I need to have some kind of remote database to store user data. How can I do this better and what can you advise?
Need a very small api for a few methods

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
ArtiomK, 2019-08-22
@KOT10

If you write for training, it is not necessary to create a remote database, login passwords can be stored in json files - which is convenient for later retrieval, or simply in text files - which is less inconvenient, if you want SQL, you can use SQLITE3 - you don’t need to download anything, it’s part of standard library, the database is stored as a separate file on the computer. If you wish, you can also encode the data before writing it to a file, the SQLITE3 database. I use the MYSQL database at work - it lives on the server, but no one bothers to install mysql locally on my working machine. In general, the choice of data storage method depends on the size of the project and your desire. This is how I wrote the SQLITE3 db query module in my pet project:
https://github.com/ArtyomKozyrev1989/ICMP_Ping_Mon...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question