How to create a database engine using Sqlalchemy in Python?

0 votes

Hi Guys,

I am trying to create one Database Engine in my python code. Can anyone tell me how can I do that?

Jun 26 in Python by akhtar
• 33,120 points
159 views

1 answer to this question.

0 votes

Hi@akhtar,

You can use the Sqlalchemy module in your python code. It helps you to run the SQL command in your python code. You can use the below code in your script.

from sqlalchemy import create_engine
# Create the db engine
engine = create_engine('sqlite:///:memory:')

I hope this will help you.

answered Jun 26 by MD
• 78,020 points

Related Questions In Python

+1 vote
1 answer

How to create plots using python matplotlib in IPython notebook?

I think you should try: I used %matplotlib inline in ...READ MORE

answered Aug 8, 2018 in Python by Priyaj
• 57,700 points
359 views
0 votes
2 answers

How do I connect to a MySQL Database in Python?

connect mysql database with python import MySQLdb db = ...READ MORE

answered Mar 28, 2019 in Python by rajesh
• 1,230 points
601 views
0 votes
1 answer

How to use Pandas HDF5 as a Database in Python?

HDF5 works fine for concurrent read only ...READ MORE

answered Nov 30, 2018 in Python by Nymeria
• 3,520 points

edited Dec 10, 2018 by Nymeria 282 views
0 votes
1 answer

How to correctly return an a dictionary as an output in zappier code using python?

David here, from the Zapier Platform team. ...READ MORE

answered Dec 3, 2018 in Python by charlie_brown
• 7,780 points
381 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 1,560 views
0 votes
0 answers
0 votes
1 answer

Create a SQL table from a Pandas DataFrame.

Hi@akhtar, You can use the Sqlalchemy module to ...READ MORE

answered Jun 26 in Python by MD
• 78,020 points
75 views
0 votes
1 answer

How to transfer multiple lines in a file using python?

Hi@akhtar, I don't know it will help you ...READ MORE

answered Mar 31 in Python by MD
• 78,020 points
132 views
0 votes
1 answer

How to crop face from a photo using cv2 in python?

Hi@akhtar, You can do this task using cv2 ...READ MORE

answered Apr 9 in Python by MD
• 78,020 points
108 views