This is a bare-bones application providing a REST API to a database model for CRUD.
pip install requirements.txt
flask run
docker-compose up
The REST API to the idea app is described below.
GET /Ideas/
curl --location --request GET http://localhost:8080/Ideas
HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 2
[{"id":1,"idea":"Foo"},{"id":2,"idea":"Bar"}]
POST /Ideas/
curl --location --request POST http://localhost:8080/Ideas?idea=Foo
HTTP/1.1 201 Created
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 201 Created
Connection: close
Content-Type: application/json
Location: /idea/1
Content-Length: 36
{"id":1,"idea":"Foo"}
GET /Ideas/<idea_id>
curl --location --request GET http://localhost:8080/Ideas/1
HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 12:36:30 GMT
Status: 200 OK
Connection: close
Content-Type: application/json
Content-Length: 36
{"id":1,"idea":"Foo"}
UPDATE /Ideas/<idea_id>
curl --location --request PUT DELETE http://localhost:8080/Ideas/2?idea=Bar
HTTP/1.1 204 No Content
Date: Thu, 24 Feb 2011 12:36:33 GMT
Status: 204 No Content
Connection: close
DELETE /Ideas/<idea_id>
curl --location --request DELETE http://localhost:8080/Ideas/2/
HTTP/1.1 204 No Content
Date: Thu, 24 Feb 2011 12:36:33 GMT
Status: 204 No Content
Connection: close
How do I see the db? Can't find the info "Adam Test" "Id 1" When setting up a separate db, How do I add to that from flask via Terminal? Challenge getting curl or postman working
###Adam's Notes:
###todos
1finish python p 2podcast make a list of dope python podcasts 3cry 4figure out DB design 5plan for projects 6google db design 7find python / flask learning options 8work on fetch