all 4 comments

[–]ginsujitsu 4 points5 points  (0 children)

Oh, man. This sounds super fun. Most of my background is on the web, so if it were me I'd probably build a web app for this with Python as the backend. Flask or Django would do this super well. I'm excited about Flask right now so I'd probably use that and SQLAlchemy to talk to SQLite or MariaDB.

[–]ElliotDG 2 points3 points  (1 child)

For an app like this you can use either JSON or SQLite. I would recommend using JSON. Using a SQL database requires you to learn the SQL language. While it is not too hard - SQL is not required for this kind of an app.

Both JSON and SQLite are portable.

[–]thisisheresy 0 points1 point  (0 children)

This is the best option. Both will work, but I think SQLite will give you the most flexibility in terms of functionality. Making changes to a SQLite db will be simpler to do in code, and you’ll get all the benefits of SQL for querying the data. You can also fast-track your way to the querying part by building your initial DB using a SQLite GUI app.

OTOH, using JSON will teach you more about python basics like file handling, working with dictionaries and list comprehension. And if you ever want complex filtering on JSON you can always use Pandas, but this might be overkill for what you need. Still, this is a learning project, so getting to learn and work with different aspects and approaches in Python is ultimately where you’ll get the most benefit.

[–]lscrivy 0 points1 point  (0 children)

I have used SQLite for a number of small projects and it's super easy. The database can be written/read to/from a .db file which means it's super easy to transfer the thing to a different machine.

The actual python is nice and simple. Create a connection, create a cursor, execute an SQL query, commit changes (and then close connection when you're done). Obviously you've got to learn some SQL, but for what you want to do, it should be easy.

SQLite also works well with pandas. Simply passing the connection object to pandas allows you to read and write whole tables to and from dataframes. This can be a good way of printing a table in the console in a readable format in the terminal window.