#๐Ÿ”’ "Database" Help

11 messages ยท Page 1 of 1 (latest)

merry kelp
#

If im making a bot that requires users to have their own settings based on their choices, I want to store these settings in a database. What would this best approach to this be? Does reading the settings in from a .csv file into a pandas df locally work well even if I need to update the settings potentially frequently? (updating the pandas df that is) Then I could re-write the df to the .csv periodically for future times the code is executed?

Other approaches I imagine are some SQL database I assume but I have minimal experience with that and really databases in general. I don't have any code for this yet im just wondering how to proceed.

merry questBOT
#

@merry kelp

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

leaden jewel
merry kelp
#

So your saying the SQL database is faster

leaden jewel
#

if you dont plan on scaling this to be a large thing with lots of information you can get away with using a json file

leaden jewel
merry kelp
#

Thx for advice

rough token
#

I would recommend a key: value database on NoSQL (e.g. redis), but SQLite with a custom setup work fine as well if you doesn't want to run a database server

merry kelp
merry questBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.