I'm an intermediate python developer with quite a bit of experience working with t-sql/mysql in data analytics. I'm trying my hand at some web programming using python to build certain components of the back-end of my site.
In one of my applications, instead of querying a database, I've placed some dictionary-based data structures directly in a list in a python file, and I import it into the script that holds the application logic. Important to note that this data is static and around 5k dictionaries at this point.
The data itself contains key-value pairs where the values is frequently a list of a tuple, so I find the flexibility of the python data structure to be easier to work with than a traditional RDBMS table.
I've scoured the internet and I can't seem to find any reference to developers actually using a .py file to store data for use in their programs, which leads me to believe this method shouldn't be used in a production site.
I'm hoping for some clarity around why this might be the case (and potential alternatives)
- Will my .py solution scale poorly vs a RDBMS solution? Either as the number of users using my application grows or if I choose to support more vehicles in my data set?
- Is there a nosql solution that might give me the flexible data structure I need if the .py solution doesn't work? Or is a mysql solution still superior in this use case? Thanks!