{"id":19235242,"url":"https://github.com/kiminzajnr/rest-api","last_synced_at":"2026-05-13T13:44:49.015Z","repository":{"id":243088917,"uuid":"809891445","full_name":"kiminzajnr/REST-API","owner":"kiminzajnr","description":"A complete REST API built with Flask and Python","archived":false,"fork":false,"pushed_at":"2024-07-02T22:16:08.000Z","size":94676,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-23T12:55:44.652Z","etag":null,"topics":["docker","flask-api","flask-restful","flask-smorest","jwt-authentication","mailgun-api","python3","render-deployment","swagger-ui"],"latest_commit_sha":null,"homepage":"https://know-us-rest-api.discoverwitherick.tech/swagger-ui","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiminzajnr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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":"2024-06-03T16:41:56.000Z","updated_at":"2024-07-03T16:18:56.000Z","dependencies_parsed_at":"2024-06-27T17:12:41.957Z","dependency_job_id":"aba9ec07-ca82-42a9-9762-ca7f0c6fe44f","html_url":"https://github.com/kiminzajnr/REST-API","commit_stats":null,"previous_names":["kiminzajnr/restful-flask-api","kiminzajnr/rest-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiminzajnr%2FREST-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiminzajnr%2FREST-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiminzajnr%2FREST-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiminzajnr%2FREST-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiminzajnr","download_url":"https://codeload.github.com/kiminzajnr/REST-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240317416,"owners_count":19782388,"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":["docker","flask-api","flask-restful","flask-smorest","jwt-authentication","mailgun-api","python3","render-deployment","swagger-ui"],"created_at":"2024-11-09T16:16:22.281Z","updated_at":"2026-05-13T13:44:48.950Z","avatar_url":"https://github.com/kiminzajnr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Know-US States REST API\nA complete REST API built with Flask and Python\n\n![API Screenshot](/sc.png)\n\n# API Endpoints\n\n## Users\n\n| Method | Endpoint          | Description                                       |\n|--------|-------------------|---------------------------------------------------|\n| POST   | /register         | Create user accounts given an email and password. |\n| POST   | /login            | Get a JWT given an email and password.            |\n| 🔒 POST | /logout          | Revoke a JWT.                                     |\n| 🔒 POST | /refresh          | Get a fresh JWT given a refresh JWT.              |\n| GET    | /user/{user_id}   | (dev-only) Get info about a user given their ID.  |\n| DELETE | /user/{user_id}   | (dev-only) Delete a user given their ID.          |\n\n## States\n\n| Method | Endpoint          | Description                                       |\n|--------|-------------------|---------------------------------------------------|\n| POST   | /state            | Create a state given a its name.                  |\n| GET   | /state             | Get a list of states.                             |\n| GET | /state/{state_id}    | Delete a state given its ID.                      |\n| DELETE | /state/{state_id} | Get a state given its ID.                         |\n\n## Cities\n\n| Method | Endpoint          | Description                                       |\n|--------|-------------------|---------------------------------------------------|\n| POST   | /city             | Create a city given its name and state ID.        |\n| GET    | /city             | Get a list of cities.                             |\n| GET    | /city/{city_id}   | Get a city given its ID.                          |\n| PUT    | /city/{city_id}   | Update a city given its ID.                       |\n| DELETE | /city/{user_id}   | Delete a city given its ID.                       |\n\n# Setup\n\n## Using virtual env\n```\ngit clone https://github.com/kiminzajnr/RESTful-Flask-API.git\ncd RESTful-Flask-API\npython3 -m venv venv\n. venv/bin/activate\npip install -r requirements.txt\n```\n\n#### Run the app\n```\nflask run\n```\n\n## Using docker\n```\ngit clone https://github.com/kiminzajnr/RESTful-Flask-API.git\ncd RESTful-Flask-API\ndocker build -t flask-api .\ndocker run -dp 5000:5000 -w /app -v \"$(pwd):/app\" flask-api\n```\n\n#### Common errors when using docker\n`Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:5000 -\u003e 0.0.0.0:0: listen tcp 0.0.0.0:5000: bind: address already in use.`\n\n- Use another port:\n    - `docker run -dp 5005:5000 -w /app -v \"$(pwd):/app\" flask-api`\n- Or, kill process running on the port if not needed:\n    - Run `lsof -i :5000` and note the `PID`\n    - Run `kill -9 PID` - `PID` obtained from above\n\n`docker: Cannot connect to the Docker daemon at ... docker.sock. Is the docker daemon running?.`\n- If on macOS/Windows run docker desktop.\n- On Linux start docker service.\n\n\n# Usage\n\n![Usage Video](/output.gif)\n\n# License\n[MIT license](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiminzajnr%2Frest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiminzajnr%2Frest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiminzajnr%2Frest-api/lists"}