CI/CD pipeline for automating the build, test, and deployment of Mission Control CRUD
- Create resources
- Retrieve all resources
- Retrieve a single resource
- Update a resource
- Delete all resources
- Delete a resource
Ensure you have Python 3.10+ installed.
git clone https://github.com/VougJo23/Martian-CRUD.git
cd Martian-CRUDpip install -e .Run the App
martian-compileror
python -m martian_crud.maindocker build -t martian-crud .
docker run -p 5000:5000 martian-crudYou should see:
* Running on http://127.0.0.1:5000/
- Method:
POST - Endpoint:
/resources - Request Example:
curl -X POST http://127.0.0.1:5000/resources \ -H "Content-Type: application/json" \ -d "{\"name\": \"Oxygen Tanks\", \"quantity\": 50}"
- Method:
GET - Endpoint:
/resources - Request Example:
curl -X GET http://127.0.0.1:5000/resources
- Method:
GET - Endpoint:
/resources/<id> - Request Example:
curl -X GET http://127.0.0.1:5000/resources/1
- Method:
PUT - Endpoint:
/resources/<id> - Request Example:
curl -X PUT http://127.0.0.1:5000/resources/1 \ -H "Content-Type: application/json" \ -d "{\"quantity\": 75}"
- Method:
DELETE - Endpoint:
/resources - Request Example:
curl -X DELETE http://127.0.0.1:5000/resources
- Method:
DELETE - Endpoint:
/resources/<id> - Request Example:
curl -X DELETE http://127.0.0.1:5000/resources/1
- The application uses SQLite in-memory storage, meaning data is lost when the app restarts.
- Modify
app.pyif you need persistent storage.