{"id":19248806,"url":"https://github.com/kevinkoech357/stage_two_backend","last_synced_at":"2026-04-24T23:31:43.130Z","repository":{"id":194391539,"uuid":"690081283","full_name":"kevinkoech357/stage_two_backend","owner":"kevinkoech357","description":"REST API","archived":false,"fork":false,"pushed_at":"2023-09-15T05:35:44.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T16:16:14.670Z","etag":null,"topics":["flask","flask-sqlalchemy","sqlite-database"],"latest_commit_sha":null,"homepage":"https://stagetwo-api-hngx.onrender.com/api","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinkoech357.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-11T13:49:21.000Z","updated_at":"2023-09-15T05:34:35.000Z","dependencies_parsed_at":"2024-11-09T18:10:42.470Z","dependency_job_id":"246bb36a-49f8-44fd-951e-5cc6cf721507","html_url":"https://github.com/kevinkoech357/stage_two_backend","commit_stats":null,"previous_names":["kevinkoech357/stage_two_backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kevinkoech357/stage_two_backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fstage_two_backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fstage_two_backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fstage_two_backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fstage_two_backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinkoech357","download_url":"https://codeload.github.com/kevinkoech357/stage_two_backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinkoech357%2Fstage_two_backend/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260249965,"owners_count":22980765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","flask-sqlalchemy","sqlite-database"],"created_at":"2024-11-09T18:10:39.452Z","updated_at":"2026-04-24T23:31:38.051Z","avatar_url":"https://github.com/kevinkoech357.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API DOCUMENTATION\n\n## Introduction\nThis repository hosts a REST API built using flask framework and sqlite as the database. It allows the user to perform different CRUD operations on a person resource, specifically name. Navigate to different directories to see the code:\n\n```bash\n(env) kevinkoech357@kevinkoech:~/Personal/HNGx/stage_two_backend$ tree -L 2\n.\n├── app\n│   ├── database\n│   ├── __init__.py\n│   ├── models\n│   ├── __pycache__\n│   └── routes\n├── docs\n│   └── DOCUMENTATION.md\n├── instance\n│   └── test.db\n├── __pycache__\n│   └── run.cpython-311.pyc\n├── README.md\n├── requirements.txt\n└── run.py\n```\n\n## Usage\n### Cloning repository\n```bash\ngit clone https://github.com/kevinkoech357/stage_two_backend\ncd stage_two_backend\n```\n### Creating virutalenv\n```bash\npython3 -m venv env\nsource env/bin/activate\n```\n### Installing dependencies\n```bash\npip install -r requirements.txt\n```\n### Starting server\n```bash\ngunicorn -w 4 run:app\n```\n\n## Testing\n### Using curl\n#### Create a new person:\n```bash\ncurl -X POST -H \"Content-Type: application/json\" -d '{\"name\": \"John Doe\"}' http://localhost:8000/api\n```\n#### Retrieve details of a person by ID:\n```bash\ncurl http://localhost:8000/api/1\n```\n#### Retrieve all persons\n```bash\ncurl -X GET http://localhost:8000/api/all\n```\n#### Update the details of an existing person:\n```bash\ncurl -X PUT -H \"Content-Type: application/json\" -d '{\"name\": \"Updated Name\"}' http://localhost:8000/api/1\n```\n#### Remove a person by ID:\n```bash\ncurl -X DELETE http://localhost:8000/api/1\n```\n### Using Postman\nVisit ```https://www.postman.com/kevinkoech357/workspace/hng-stage-two-internship/collection/29637783-a59d3879-5053-4704-958e-d97db1f62021?action=share\u0026creator=29637783``` to check collection and add more tests.\n\n### UML Diagram\nNavigate to docs and open uml_diagram or click ```https://github.com/kevinkoech357/stage_two_backend/blob/main/docs/uml_diagram```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinkoech357%2Fstage_two_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinkoech357%2Fstage_two_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinkoech357%2Fstage_two_backend/lists"}