SQLAlchemy Tutorial with Python by Vinay Kudari

(365 views)

We often encounter data as Relational Databases. To work with them we generally would need to write raw SQL queries, pass them to the database engine and parse the returned results as a normal array of records. SQLAlchemy provides a nice “Pythonic” way of interacting with databases. So rather than dealing with the differences between specific dialects of traditional SQL such as MySQL or PostgreSQL or Oracle, you can leverage the Pythonic framework of SQLAlchemy to streamline your workflow and more efficiently query your data. Other stories on datascience can be found here Installing The Package pip install sqlalchemy Connecting to a database To start interacting with the database we first we need to establish a connection. import sqlalchemy as db engine = db.create_engine('dialect+driver://user:pass@host:port/db') Some examples of connecting to various databases can be found here Viewing Table Details SQLAlchemy can be used to automatically load tables from a database using....

August 30, 2019
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
© HAKIN9 MEDIA SP. Z O.O. SP. K. 2023
What certifications or qualifications do you hold?
Max. file size: 150 MB.
What level of experience should the ideal candidate have?
What certifications or qualifications are preferred?

Download Free eBook

Step 1 of 4

Name(Required)

We’re committed to your privacy. Hakin9 uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy.