![]() |
Python and SQL
I need some handholding here, asking for some hints to get going with an SQL database and Python. Just some information on what to download, how to connect with Python, and maybe some code examples. Hopefully something easy such as SqLite or MySQLdb. I am in the experimenting mood!
|
|
MysqlDB is what you need, and I gave Bulio code to do this in the thread Sane mentions... I was experimenting with this myself, pretty cool stuff.
|
So what all do I have to download and install on my old HP Windows XP machine, so I can play around a little?
Also, how about SQlite, wouldn't that be a little simpler for starters? |
Python and MySQLdb...
This only looks hard on the surface, I downloaded MySQLdb and tinkered with the connection, search, and insert methods and had a working solution in few minutes... with a limited knowledge of Python. I'm sure you'll be able to figure it out, give it a go and see what you come up with. You could always come back for help if needed. |
Do you want to use databases? or learn how to use SQL + Python to manipulate a database. If you want to do the latter stick with the above solutions. But if you want to just use a database and not care to much about how it works you should give SQLObject or SQLAlchemy. They allow you map objects to database tables. They aren't perfect and performance won't be as good (unless you down to raw SQL) but they provide a pythonic way to access databases.
|
Do I need to download the actual database MySQL? That one is somewhat huge.
|
Yes, unless you have access to a remote server with a MySql database.
|
Python 2.5 comes with SQLite built in, so you don't have to go as heavy weight as MySQL if you don't need it.
|
Quote:
|
| All times are GMT -5. The time now is 12:44 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC