Skip to content

A JSON API using tornado framework. PyDBlite was used to create database purely on Python

License

Notifications You must be signed in to change notification settings

irtiq7/tornado_pyDBlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tornado_pyDBlite

A JSON API using tornado framework. PyDBlite was used to create database purely on Python. In order to install Tornado JSON:

pip install Tornado-JSON

Then install pyDBlite

pip install pydblite

Now you need to run the tornado server after cloning the file (helloworld.py file)

python helloworld.py

Once the server is running, you will see the following data on the terminal

Now on your web browser add url to access your database. Initially, the database will be empty so it would not show anything.

localhost:8888/getting_data/

Enter the following command to add data into the database

curl -v -H "Content-Type: application/json" -X POST -d "{ \"body\": \"Usama\",\"guid\": \"abc123\" }" http://localhost:8888/api/post_data/

Now refresh the browser to see the data

Now to delete a specific record from the database then use the record identifier to select and delete the specific record

curl -v -H "Content-Type: application/json" -X POST -d "{ \"id\": 5 }" http://localhost:8888/api/delete_record/

About

A JSON API using tornado framework. PyDBlite was used to create database purely on Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages