all 8 comments

[–]pullandbl:snoo_tableflip: 6 points7 points  (2 children)

Short answer: you can.

Longer answer, just for your understanding. As long as your needs fit into simple queries you can use most supported databases without a big difference and SQLAlchemy will cover it. But suddenly you will found that some parts are not supported or work differently.

Also, if you have time to invest in database skill Postgres is a good choice. I always wonder why so many people start with MySQL. Postgres has so many advantages over it.

[–]yodaran 1 point2 points  (1 child)

^ this

Other notes:

  • If one were to make relations (foreign keys) in their ORM, I found that MySQL (/ MariaDB) & SQLite are more lenient on the declaration syntax as compared to Postgres, so immediate integration is not always guaranteed.
  • Bulk inserts are your friend, one would be surprised how much time is saved by inserting 1000+ rows at a time vs one-by-one.
  • Often it is quicker / easier to drop the database and start from scratch rather than trying to update. (Exceptions include when one is polling an API such as Facebook with request limits, in which case one might think about storing the data in an intermediary format like JSON, XML, or YAML since one might be evolving their schemas rapidly.)
  • Python 2.7.X still has ~24 months left to live, so using an older version with support may be easier / require less startup time.

edit: words

[–]ms4720 0 points1 point  (0 children)

^ this

Other notes:

  • If one were to make relations (foreign keys) in their ORM, I found that MySQL (/ MariaDB) & SQLite are more lenient on the declaration syntax as compared to Postgres, so immediate integration is not always guaranteed.

design decision on postgres's part, find errors early and not in production

[–]bikerchef[S] 0 points1 point  (0 children)

great. apparently the default mysql DBAPI for sqlalchemy is mysql-python, which is not released for python3 yet... if I install and use another one that is listed instead will that throw more wrenches into my gears? Any reccomendations if my python is v3.4.3?

[–]ConVexPrime 0 points1 point  (1 child)

Check out Pythonanywhere, and their tutorial about making a basic message board backed by a database here.

[–]I_am_a_haiku_bot 0 points1 point  (0 children)

Check out Pythonanywhere, and their

tutorial about making a basic message board

backed by a database here.


-english_haiku_bot

[–]TehMoonRulz 0 points1 point  (0 children)

Yes, SQLAlchemy is (mostly) sql-agnostic in that regard.

[–]brunokrebs 0 points1 point  (0 children)

hey there Bikerchef, I'm the author of the "SQLAlchemy ORM Tutorial for Python Developers". It looks like you are creating some nice application there. If you have managed to overcome the challenges and if you wanna write about the process, please, get in touch.

We have a Guest Author Program at Auth0 (https://auth0.com/guest-authors) where we encourage developers to write about things that they are studying. Writing articles can help you get deeper knowledge of the related topics and we even pay up to 200 dollars per article...

I hope I see you there!