i need a database!
August 26, 2011 11:37 AM   Subscribe

[Python/database filter] I wrote a script in python for a class and I want to challenge myself now to make it attached to a database...

Basically for a class I created a python script which acted like an ATM interface. What I would like to do is create a database (sql, my sql?) Which would contain members/pins/bank balance.

What resources should I use to accomplish this task? I am doing this for shits and giggles as I would think expanding this old assignment. Plus I would learn along the way.

Thank you in advance!
posted by handbanana to Computers & Internet (8 answers total) 6 users marked this as a favorite
 
How about SQLite for the database - it's small, lightweight, doesn't require any extra server processes.
posted by Calloused_Foot at 11:43 AM on August 26, 2011


Forgot to link to the binaries
posted by Calloused_Foot at 11:44 AM on August 26, 2011


Sqlite with the sqlite3 module would be a good place to start.
posted by wongcorgi at 11:47 AM on August 26, 2011


I'll third the SQLite recommendation. It's one of my absolute favorite pieces of software. Also, if you're interested in frontends to SQLite, see SQLite Manager, which is a Firefox extension, or SQLiteStudio.
posted by Numenius at 12:18 PM on August 26, 2011


Fourthing SQLite and SQLite Manager. The sqlite3 module docs are pretty good, and the Stackoverflow Python and SQLite tags are what you want to use if you run into difficulty, or have questions about best approaches. If you're comfortable with Python and OO basics, this will be an evening or two's interesting-and-not-horribly-challenging coding. And when you're done with it, you can have a look at wxPython, and think about making a nice-looking GUI keypad.
posted by urschrei at 2:12 PM on August 26, 2011


Python database programming wiki page. But yes, using sqlite through the standard sqlite dbapi module, as everyone has suggested, is the obvious choice.
posted by hattifattener at 5:27 PM on August 26, 2011 [1 favorite]


Also recommending SQLite over MySQL/Postgres/anything else until you need a production system (any maybe even then).
posted by beerbajay at 12:02 PM on August 27, 2011


If you want to make the whole system more robust, consider adding SqlAlchemy to the toolkit. *You don't need it yet* (it'll slow you down at this stage!), but when your db project gets bigger, you might. http://www.sqlalchemy.org/ . In particular, standardizing connections, properly escaping queries, and the like are all built-in there.
posted by gregglind at 3:04 PM on August 27, 2011


« Older Help me find an awesome laptop within my budget...   |   Who are the inspiring leaders who aten't ded? Newer »
This thread is closed to new comments.