-1

can we connect our python script to interact with the database whose url is known.If yes then how we would do that?? and will we be able to interact with the datbase??

I am going to start working on automating a process whic right now is done manually in my company by accessing a datbase and using it for extracting values or data. Now this is my first day and i don't know from where to start.All that i know is right now i am having a url to database and the database consists of a "query section" where i will feed what i want to search using different fields of the database query page and will get a list matching my search.

i have to use this list in my GUI that i have to develop. for this purpose i need to know how to access a database using its url and how to interact with it.My database is developed using JavaScript

i am a beginner.Please folks help me with this.

rikki
  • 431
  • 1
  • 8
  • 18
  • Possible duplicate of [How do I connect to a MySQL Database in Python?](https://stackoverflow.com/questions/372885/how-do-i-connect-to-a-mysql-database-in-python) – ADyson Sep 03 '18 at 13:08

1 Answers1

1

You should specify your database first. e.g mysql then you can use a ORM like SQLALCHEMY to ease the process for you and in that case this is how you address the db, something like:

"mysql://{}:{}@{}:{}"  
.format("YOUR_SQL_USERNAME","YOUR_SQL_PASSWORD", "YOUR_SQL_HOST", "YOUR_SQL_PORT")
Nima Hashemi
  • 176
  • 4