{"id":31320672,"url":"https://github.com/penghanyuan/flask-rest-engine","last_synced_at":"2026-05-15T08:05:57.984Z","repository":{"id":48462815,"uuid":"516802739","full_name":"penghanyuan/flask-rest-engine","owner":"penghanyuan","description":"A flask-restful API project template generator","archived":false,"fork":false,"pushed_at":"2022-08-01T22:58:53.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-02T00:12:52.738Z","etag":null,"topics":["flask","flask-restful","python","template-engine"],"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/penghanyuan.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":"2022-07-22T15:37:15.000Z","updated_at":"2022-08-01T22:59:58.000Z","dependencies_parsed_at":"2022-09-03T19:00:58.253Z","dependency_job_id":null,"html_url":"https://github.com/penghanyuan/flask-rest-engine","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/penghanyuan/flask-rest-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penghanyuan%2Fflask-rest-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penghanyuan%2Fflask-rest-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penghanyuan%2Fflask-rest-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penghanyuan%2Fflask-rest-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/penghanyuan","download_url":"https://codeload.github.com/penghanyuan/flask-rest-engine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/penghanyuan%2Fflask-rest-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276913452,"owners_count":25727127,"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","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-restful","python","template-engine"],"created_at":"2025-09-25T16:55:21.769Z","updated_at":"2025-09-25T16:55:25.796Z","avatar_url":"https://github.com/penghanyuan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask-rest-engine\n\n\u003c!-- [![CircleCI](https://circleci.com/gh/TTWShell/Flask-rest-engine.svg?style=svg)](https://circleci.com/gh/TTWShell/Flask-rest-engine)\n[![Documentation Status](https://readthedocs.org/projects/Flask-rest-engine/badge/?version=latest)](https://Flask-rest-engine.readthedocs.io/zh/latest/?badge=latest)\n[![PyPi-Version](https://img.shields.io/pypi/v/Flask-rest-engine.svg)](https://img.shields.io/pypi/v/Flask-rest-engine.svg)\n[![Python-version](https://img.shields.io/pypi/pyversions/Flask-rest-engine.svg)](https://img.shields.io/pypi/pyversions/Flask-rest-engine.svg)\n[![codecov](https://codecov.io/gh/TTWShell/Flask-rest-engine/branch/master/graph/badge.svg)](https://codecov.io/gh/TTWShell/Flask-rest-engine)\n[![License](https://img.shields.io/:license-mit-blue.svg?style=flat-square)](https://Flask-rest-engine.mit-license.org) --\u003e\n\nA flask-restful API project template generator. Based on Flask-restful + SQLAlchemy + marshmallow + webargs.\n\nThis project was inspired by [Hobbit-core](https://github.com/TTWShell/hobbit-core), thanks to [@TTWShell](https://github.com/TTWShell)\n\n## Installation\n\nInstall and update using pip:\n\n    pip install flask-rest-engine  # install cmd\n\n## Init project\n\n    flask_rest_engine --echo new -n demo -d /tmp/demo -p 5000\n    cd /tmp/demo\n    pipenv install -r requirements.txt\n    pipenv shell\n\n## Run server\n\n    (demo) ➜  demo FLASK_APP=app/run.py flask run\n     * Serving Flask app \"app/run.py\"\n     * Environment: production\n     WARNING: This is a development server. Do not use it in a production deployment.\n     Use a production WSGI server instead.\n     * Debug mode: off\n     * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n\n## Project structure\n\n    .\n    ├── Dockerfile\n    ├── app\n    │   ├── __init__.py\n    │   ├── configs\n    │   │   ├── __init__.py\n    │   │   ├── default.py\n    │   │   ├── development.py\n    │   │   ├── logger_config.py\n    │   │   ├── production.py\n    │   │   └── testing.py\n    │   ├── core\n    │   │   └── __init__.py\n    │   ├── exts.py\n    │   ├── models\n    │   │   └── __init__.py\n    │   ├── run.py\n    │   ├── schemas\n    │   │   └── __init__.py\n    │   ├── tasks\n    │   │   └── __init__.py\n    │   ├── utils\n    │   │   └── __init__.py\n    │   └── endpoints\n    │       ├── __init__.py\n    │       └── ping.py\n    ├── configs\n    │   └── gunicorn-logging.ini\n    ├── deploy.sh\n    ├── docker-compose.yml\n    ├── docs\n    │   └── index.apib\n    ├── pytest.ini\n    ├── requirements.txt\n    └── tests\n        ├── __init__.py\n        ├── conftest.py\n        └── test_tools.py\n\n### app\n\nApp dir saved all business layer codes. You must ensure dir name is app based on *convention over configuration*.\n\napp.exts.py\n\nTo avoid circular imports in Flask and flask extention, exts.py used. [Why use exts.py to instance extension](https://stackoverflow.com/questions/42909816/can-i-avoid-circular-imports-in-flask-and-sqlalchemy/51739367#51739367)\n\napp.run.py\n\n#### app.configs\n\nIn a flask app, we auto load config by FLASK_ENV. If FLASK_ENV=production, used ``configs/production.py`` file.\n\n#### app.core\n\nAll complicated function, base class etc.\n\n#### app.models\n\nCreate your models here.\n\n#### app.schemas\n\nCreate your marshmallow scheams here.\n\n#### app.tasks\n\nCelery tasks here.\n\n#### app.utils\n\nAll common utils here.\n\n#### app.endpoints\n\nCreate your endpoints here.\n\n### deploy.sh\n\nA script for deploy.\n\n### docker-compose.yml\n\nBase docker compose file. Run app\n\n    docker-compose up\n\n### docs\n\nAPI doc etc.\n\n### logs\n\nAll logs for app, nginx etc.\n\n### tests\n\nCreate your tests here. Recommended use [pytest](https://docs.pytest.org/en/latest/)\n\n## Dockerfile\n\nBuild image for run web server. For more information about dockerfile, please visit : [Dockerfile reference](https://docs.docker.com/engine/reference/builder/#usage)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenghanyuan%2Fflask-rest-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpenghanyuan%2Fflask-rest-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpenghanyuan%2Fflask-rest-engine/lists"}