5

I am writing a script that will be used by multiple users, and I am looking for a way to sync settings and other variables throughout them all. My first instinct fell upon using an online database, but looking through this site, and the wider web I couldn't find anything.

What I need is something that I can write to and read from using python script. This could be a database, but I also have multiple online hosting accounts (Mega, Dropbox, Skydrive, Google Drive) and if anybody knows any APIs I could use to read & write files to these services, that would do as well.

This question is sort-of what I was looking for, but it was closed as "not a real question" before a suitable answer. https://stackoverflow.com/questions/13149328/modify-online-file-with-python

To be clear, I am looking for a way to edit database entries in a database hosted online, using a script on a different PC - and a way to read them.

Also, if anybody knows of any free online-database hosting that I could access through Python, much appreciated - quite like you can get free web hosting or free file hosting.

UPDATE: Thanks to both who answered, but unfortunetly when trying MySQLDb, I found that it only supports python 2.x (sorry - I forgot to mention that I use 3). I did, however, find another option while trying this. MySQL have their own python connector to access MySQL databases through Python found here (http://dev.mysql.com/doc/refman/5.6/en/connector-python.html), and that works for both Python versions (1&2).

7
  • What type of database MySQL, etc? Commented Apr 21, 2013 at 21:01
  • Using a consumer data storage service (Dropbox, Skydrive, Google Drive, etc.) as a database for an application is probably a violation of their ToS, and not a very good idea for your app. However, if each user has their own data, and no data is shared between different users, then you can store some data in Dropbox or Google Drive on the user's behalf, with the user's account (that's why none of the data is shared). That's a valid use of their APIs. Commented Apr 21, 2013 at 21:05
  • @enginefree I would prefere MySQL, but I am open to suggestions, if people know ways to access other databases. Commented Apr 21, 2013 at 21:21
  • @Linuxios if this is a script that won't be distributed, only used by me and a small group, all on my account on my behalf, would that still be likely to violate T&Cs? Commented Apr 21, 2013 at 21:23
  • Probably, but I doubt anyone will chase you about it. Commented Apr 21, 2013 at 21:50

1 Answer 1

2

RethinkDB is a newish database system that is very easy to use with Python, and comes with a Python API. You can do everything you'd need with a database through Python, and its a pretty easy system to get going quickly

Sign up to request clarification or add additional context in comments.

2 Comments

Since it appears you are looking maybe for a free host also, I should add that RethinkDB is just the database software. You can install it on your own machine or any host you have install access to. Its definitely the easiest choice for python friendly DB though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.