{"id":15897744,"url":"https://github.com/pppw/flask-web-app-template","last_synced_at":"2026-04-25T08:38:45.491Z","repository":{"id":93596722,"uuid":"127188693","full_name":"PPPW/Flask-Web-App-Template","owner":"PPPW","description":null,"archived":false,"fork":false,"pushed_at":"2018-08-28T20:02:19.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T15:50:46.042Z","etag":null,"topics":["flask","python","template-project"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/PPPW.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":"2018-03-28T19:32:28.000Z","updated_at":"2022-11-25T04:49:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"60f90b2b-0741-45cf-8498-61a60df4eb8b","html_url":"https://github.com/PPPW/Flask-Web-App-Template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PPPW/Flask-Web-App-Template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFlask-Web-App-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFlask-Web-App-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFlask-Web-App-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFlask-Web-App-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PPPW","download_url":"https://codeload.github.com/PPPW/Flask-Web-App-Template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PPPW%2FFlask-Web-App-Template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32256085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T04:23:17.126Z","status":"ssl_error","status_checked_at":"2026-04-25T04:21:53.360Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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","python","template-project"],"created_at":"2024-10-06T10:00:47.299Z","updated_at":"2026-04-25T08:38:45.476Z","avatar_url":"https://github.com/PPPW.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Web App Template\n\n## Overview\nFlask is a light-weight backend framework. Unlike Django, Flask haven't defined a standard app structure. This empty Flask web app template follows the structures recommended in the official documentation:   \n[Patterns for Flask](http://flask.pocoo.org/docs/0.12/patterns/)\n\nThe app structure is: \n\n```\n.\n+-- myapp/\n|   +-- static/\n|   |   +-- style.css\n|   +-- templates/\n|   |   +-- general/\n|   |   |   +-- index.html\n|   |   +-- 404.html\n|   |   +-- layout.html\n|   +-- views/\n|   |   +-- __init__.py\n|   |   +-- general.py\n|   +-- __init__.py\n|   +-- config.py\n+-- migrations/\n+-- tests/\n+-- manage.py\n+-- setup.py\n```\n\nTo run this app, install dependencies (actually, only need to install Flask):\n\n```\npip install -r requirements.txt\n```\n\nThen:\n\n```\npython manage.py runserver\n```\n\nThen visit \"http://127.0.0.1:5000/\" to see the website: \n\n![](/images/hello.png)\n\nTo run unit tests:\n\n```\npython manage.py test\n```\n\n## The Structure\n\n* manage.py:\n\nUse command line commands. By default, we have this command to run the app:\n```\npython manage.py runserver\n```\n\nYou can apply the \"@manager.command\" decorator to your own functions to add commands. In this example, I have defined the \"create_db\" command to create database, and the \"test\" to run unit test. \n\n* \"myapp\" folder:    \n\nconfig.py: set configurations for the app. For example, you may want to use a different configuration for testing. Two configurations, \"development\" and \"testing\" are defined in this file, you can add more customized configurations.\n\n\\_\\_init\\_\\_.py: create and initialize the app. Blueprints are also registered in here. \n\n* \"myapp/static\" folder:   \n\nThis folder contains static files, such as \"css\", \"js\", etc. If you use a front-end framework, such as React, Angular, Vue, etc., you can place the app files in this folder. \n\n* \"myapp/templates\" folder:   \nThis folder contains the view templates. \n\n   * layout.html: the master layout for the whole website. All other views will be inserted to the \"body\" block. \n\n   * 404.html: the 404 error page. \n\n* \"myapp/views\" folder:   \n\nThis folder contains the view controllers. In here, each view controller has a Blueprint, which can be used for routing in the same way as the Flask application class. You can define multiple view controllers, just register the Blueprint in the \"create_app\" function, and put the corresponding templates under \"templates/your_view_controller/\". By using Blueprint, you can break down the app into smaller components. \n\ngeneral.py: an example of a view controller. \n\n* \"migrations\" folder:\n\nThis is the default folder for migrations. \n\n* \"tests\" folder:\n\nThis folder contains test files. The test runner will look for all files in this folder. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpppw%2Fflask-web-app-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpppw%2Fflask-web-app-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpppw%2Fflask-web-app-template/lists"}