{"id":16983327,"url":"https://github.com/mubangizi/flask-rest-api-template","last_synced_at":"2026-04-14T19:31:31.094Z","repository":{"id":45329942,"uuid":"327529257","full_name":"Mubangizi/flask-rest-api-template","owner":"Mubangizi","description":"This project is aimed at creating initial structure for any flask restful api","archived":false,"fork":false,"pushed_at":"2022-12-29T20:56:20.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T21:28:03.786Z","etag":null,"topics":["flask","flask-api","flask-application","flask-restful","flask-server","flask-sqlalchemy"],"latest_commit_sha":null,"homepage":"","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/Mubangizi.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-01-07T06:55:35.000Z","updated_at":"2021-12-20T19:17:27.000Z","dependencies_parsed_at":"2023-01-31T09:45:18.491Z","dependency_job_id":null,"html_url":"https://github.com/Mubangizi/flask-rest-api-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/Mubangizi/flask-rest-api-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubangizi%2Fflask-rest-api-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubangizi%2Fflask-rest-api-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubangizi%2Fflask-rest-api-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubangizi%2Fflask-rest-api-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mubangizi","download_url":"https://codeload.github.com/Mubangizi/flask-rest-api-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mubangizi%2Fflask-rest-api-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31812968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-api","flask-application","flask-restful","flask-server","flask-sqlalchemy"],"created_at":"2024-10-14T02:28:24.603Z","updated_at":"2026-04-14T19:31:31.072Z","avatar_url":"https://github.com/Mubangizi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask API Template\n\nThis project is aimed at creating initial boiler plate for any flask restful api.\n\n- It provides a basic CRUD functionality for `user` and `product` models\n- It also has basic authentication and authorization for users\n\n\n[Flask API Template](#flask-api-template)\n\n- [Project Setup](#project-setup)\n  - [Clone The Repo](#clone-the-repo)\n- [Run the app locally using docker](#run-the-app-locally-using-docker)\n  - [Install Docker](#install-docker)\n  - [Install make](#install-make)\n  - [Run the app](#run-the-app)\n- [Run the app locally without docker``](#run-the-app-locally-without-docker)\n  - [Install PostgreSQL](#install-postgresql)\n  - [Create a Virtual Environment](#create-a-virtual-environment)\n  - [Activate the virtual environment](#activate-the-virtual-environment)\n  - [Install the dependencies](#install-the-dependencies)\n  - [Create a .env file](#create-a-env-file)\n  - [Run Database migrations](#run-database-migrations)\n  - [Run Application](#run-application)\n  - [Test the API](#test-the-api)\n  - [Checkout Application Api docs](#checkout-application-api-docs)\n\n## Project Setup\n\nFollow these steps to have a local running copy of the app.\n\n### Clone The Repo\n\n`git clone https://github.com/Mubangizi/flask-rest-api-template.git`\n\nIf `master` is not up to date, `git checkout develop`. However, note that code on develop could be having some minor issues to sort.\n\n## Run the app locally using docker\n\n### Install Docker\n\nHere's a great resource to check out:\n\n[How To Install and Use Docker on Ubuntu 18.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04)\n\n### Install make\n\n```bash\nsudo apt-get install make\n```\n\n### Run the app\n\nTo start the app, run\n\n```bash\nmake start\n```\n\nApplication should be running on port `5000`\n\n## Run the app locally without docker``\n\n### Install PostgreSQL\n\nHere's a great resource to check out:\n\n[How To Install and Use PostgreSQL](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04)\n\nCreate a development database and call it `mobile_shop_db`.\n\n### Create a Virtual Environment\n\ncreate virtual enviroment called `venv` in the root of the project.\n\nRun\n\n```bash\nvirtualenv venv\n```\n\n### Activate the virtual environment\n\nRun\n\n```bash\n. venv/bin/activate\n```\n\nMake sure you have `pip` installed on your machine.\n\n### Install the dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### Create a .env file\n\nCreate a `.env` file (which defines the environment variables used) at the root of the app.\n\nAdd the following details, customizing as needed.\n\n```bash\nexport FLASK_APP=server.py\nexport DATABASE_URI=postgresql:///flask_app_db\nexport FLASK_APP_SECRET=qY2i691SX2sEuZ7LUjY480RS48mw5qCeUiyV0i0vzmg\nexport FLASK_ENV=development\nexport FLASK_RUN_PORT=5000\n```\n\n### Run Database migrations\n\nRun migrations for the database. This will create the tables for the models in the database .\n\n```bash\npython manage.py db upgrade\n```\n\n#### Note\n\nIf you make changes to the models, you need to create migrations for the changes by running `python manage.py db migrate` and then `python manage.py db upgrade` to add the changes to the database.\n\n### Run Application\n\nRun the application with this command\n\n```bash\nflask run\n```\n\n### Test the API\n\nThrough your browser go to link `localhost:\u003cflask_port\u003e/`.\n\n### Checkout Application Api docs\n\nThrough your browser go to link `localhost:\u003cflask_port\u003e/apidocs`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmubangizi%2Fflask-rest-api-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmubangizi%2Fflask-rest-api-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmubangizi%2Fflask-rest-api-template/lists"}