{"id":18723090,"url":"https://github.com/axiaoxin/flask-skeleton","last_synced_at":"2025-04-12T14:53:23.086Z","repository":{"id":75390338,"uuid":"73059906","full_name":"axiaoxin/flask-skeleton","owner":"axiaoxin","description":"flask skeleton","archived":false,"fork":false,"pushed_at":"2019-11-21T03:19:55.000Z","size":129,"stargazers_count":8,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T09:22:33.857Z","etag":null,"topics":["flask","flask-skeleton","python","skeleton","webapi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axiaoxin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-07T08:58:27.000Z","updated_at":"2020-08-31T07:09:16.000Z","dependencies_parsed_at":"2023-05-05T03:03:45.826Z","dependency_job_id":null,"html_url":"https://github.com/axiaoxin/flask-skeleton","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiaoxin%2Fflask-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiaoxin%2Fflask-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiaoxin%2Fflask-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axiaoxin%2Fflask-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axiaoxin","download_url":"https://codeload.github.com/axiaoxin/flask-skeleton/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586225,"owners_count":21128995,"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-skeleton","python","skeleton","webapi"],"created_at":"2024-11-07T13:47:37.542Z","updated_at":"2025-04-12T14:53:23.079Z","avatar_url":"https://github.com/axiaoxin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"flask-skeleton\n--------------\n![proj-icon](https://raw.githubusercontent.com/axiaoxin/flask-skeleton/master/app/static/img/favicon.ico)\n\n[![Build Status](https://travis-ci.org/axiaoxin/flask-skeleton.svg?branch=master)](https://travis-ci.org/axiaoxin/flask-skeleton)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1021dd91bdf54db797485cb1ac6f2cb9)](https://app.codacy.com/app/axiaoxin/flask-skeleton?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=axiaoxin/flask-skeleton\u0026utm_campaign=Badge_Grade_Dashboard)\n![version-badge](https://img.shields.io/github/release/axiaoxin/flask-skeleton.svg)\n![downloads](https://img.shields.io/github/downloads/axiaoxin/flask-skeleton/total.svg)\n![license](https://img.shields.io/github/license/axiaoxin/flask-skeleton.svg)\n![issues](https://img.shields.io/github/issues/axiaoxin/flask-skeleton.svg)\n[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/axiaoxin)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/axiaoxin/flask-skeleton/pulls)\n\n\nThe goal is to do business logic development without paying attention to the organization of the flask project\nand integration of common tools, no need to write repeatedly.\n\n\n## Dependencies\n\n- python 2.7\n- flask\n- peewee\n- python-decouple\n- redis\n- celery\n- cerberus\n- requests\n- ujson\n- pyDes\n- redis-py-cluster\n- Flask-Mail\n- gunicorn\n- gevent\n- raven\n- supervisor\n- flasgger\n- Flask-FlatPages\n- flower\n- pytest\n\n\n# Feature\n\n- Clear code organization.\n- Validation of production environment.\n- Flexible and rich configuration, decoupled by `.env` file\n- Respond unified json structure with `code` `msg` `data` fields, and support custom json key's naming style\n- Detailed and leveled log, provide a logger easy to log in file by loglevel or in console, request log with requestid and peewee orm sql log, log function call detail info.\n- Support redis single client, sentinel client and cluster client.\n- Support request rate limit\n- Support sentry to collect error log\n- Support auto cached the request result\n- Provide redis lock\n- Integration of celery for async tasks and cron tasks\n- Support swagger to auto generate the api docs\n- Support flatpages\n- Support send email\n- Integration of requests for http client, cerberus for validator params, ujson for speed up json parsing.\n- Support auto reconnection mysql to support mysql's high availability\n- Provide some common tool like retrying or stringcase convert and others in `utils`\n- Provice a convenient deploy admin tool\n\n\n## Develop run\n\n    virtualenv venv\n    source venv/bin activate\n    pip install -r requirements.txt\n\n    python apiserver.py\n\n## Deploy\n\n    . ./deploy/init.sh\n\n## Docs\n\nRunning the server, you can visit the online docs\n\nStatic docs: \u003chttp://localhost:5000/docs\u003e\n\nAPI docs: \u003chttp://localhost:5000/apidocs\u003e\n\n# How to develop API with flask-skeleton\n\nFirst, clone the flask-skeleton and install requirements\n\n    git clone git@github.com:axiaoxin/flask-skeleton.git\n    cd flask-skeleton\n    . ./deploy/init.sh\n\nthe `init.sh` will deploy the service by gunicorn and supervisor on your server, it will auto running the server, the `deploy/admin.sh` can do `restart` `stop` `start`.\n\nSecond, regisger blueprint in `apiserver.py`, and write your blueprint in `apis` directory\n\n# Develop suggestions\n\n- write apis as blueprint\n- blueprint is made up of `routes.py` `views.py` `handlers.py`\n- write database orm model in `app/models`\n- add default settings in `app/settings.py` support `python-decouple`, change settings by `.env` file\n- add third party service in `app/services.py`\n- common tools save in `app/utils`\n- put your docs in `app/templates/docs`\n- write tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiaoxin%2Fflask-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxiaoxin%2Fflask-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxiaoxin%2Fflask-skeleton/lists"}