Skip to content

sddai/Flask_SQL_query_HTTP_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask_SQL_query_API_and_web_app_using_SQLAlchemy

This is a simple app using Flask, SQLAlchemy and the connecting Flask-SQLAlchemy library.

Once deployed, you could use url such as http://localhost:5000/api?id={$id} to implement an HTTP REST API and do SQL queries. Besides, you could also do SQL query using HTML page.

Installing Dependencies

pip install -r requirements.txt

Running the App

To run the app, first run the models.py file directly to create the database tables:

$ python models.py

You only need to do this once, unless you change your model definitions (see below).

Then run the app itself:

$ python app.py

Visit http://localhost:5000/ and http://127.0.0.1:5000/api?identifier=foo in your browser to see the results.

About

Flask_SQL_query_RestAPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published