{"id":17142348,"url":"https://github.com/odiroot/mofanhu","last_synced_at":"2025-04-13T10:40:53.328Z","repository":{"id":38367993,"uuid":"197257268","full_name":"odiroot/mofanhu","owner":"odiroot","description":"A robust template for Flask applications","archived":false,"fork":false,"pushed_at":"2023-10-25T04:59:55.000Z","size":104,"stargazers_count":5,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-27T02:04:40.428Z","etag":null,"topics":["docker","flask","heroku","template"],"latest_commit_sha":null,"homepage":null,"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/odiroot.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":"2019-07-16T19:43:33.000Z","updated_at":"2023-05-31T09:15:02.000Z","dependencies_parsed_at":"2024-10-14T20:30:50.711Z","dependency_job_id":null,"html_url":"https://github.com/odiroot/mofanhu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odiroot%2Fmofanhu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odiroot%2Fmofanhu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odiroot%2Fmofanhu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/odiroot%2Fmofanhu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/odiroot","download_url":"https://codeload.github.com/odiroot/mofanhu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248701041,"owners_count":21147964,"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","heroku","template"],"created_at":"2024-10-14T20:30:41.358Z","updated_at":"2025-04-13T10:40:53.307Z","avatar_url":"https://github.com/odiroot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mofanhu\nA robust template for Flask applications.\n\n![https://www.flickr.com/photos/sophies/5393505900/](./project/static/flask.jpg)\n\n\u003e [..] Put water into a bottle it becomes the bottle.\n\n## Features\n\n- Python 3.8 as a base.\n- Clean and organised structure for a medium size or large web project.\n- Staying close to the _12 Factor App_ ideals.\n- Well configured Flask CLI tool for user friendliness.\n- Integrated _Konch_ and _DebugToolbar_ for easier debugging.\n- Project configuration based on _environs_ for automatic validation and\n  type conversion.\n- Development configuration using _direnv_, overridable by environment\n  variables.\n- Serving dynamically rendered HTML page and example static files with pure\n  Flask. Example template.\n- Example API endpoints in two flavours: _Flask-RESTful_ and _flask-smorest_.\n- Support for _PostgreSQL_ database and ORM models using _SQLAlchemy_.\n  Example model.\n- Support for migrations with _alembic_. Example migration.\n- Support for background tasks with _dramatiq_. Example task.\n- Configuration for running on _Heroku_ cloud.\n- Separate production, testing and development requirements.\n- Easy testing with _tox_ and _py.test_. Example tests.\n- Support for fast and efficient testing of database code using transactions and\n  parallel workers.\n- Basic code linting with _black_, _flake8_ and _isort_.\n- Github Actions testing with _Python application_ setup.\n- Easy entry vector for WSGI servers, demonstrated with _Gunicorn_.\n- _Dockerfile_ to build a minimal¸ production-ready Docker image.\n- Rudimentary definition for _Docker Compose_ to launch the complete project.\n- Practical CRUD UI using Flask-Admin.\n- _EditorConfig_ support.\n\n## Running\n\n### With Docker\n\n*Note*: Ensure you have a working system Docker installation.\n\nInstall Docker Compose:\n\n    $ pip install -U docker-compose\n\nStart the complete stack in a standard way:\n\n    $ docker-compose up --build --detach\n\nCheck the logs\n\n    $ docker-compose logs --follow\n\n### Manually\n\n*Note*: Ensure you have a working Python 3.8 installation.\n\nCreate a virtualenv:\n\n    $ virtualenv -p `which python3.8` .env\n\nInstall dependencies:\n\n    $ source .env/bin/activate\n    $ pip install -Ur requirements.txt\n\nPrepare the environment (_direnv_ has to be preinstalled):\n\n    $ cp envrc.example .envrc\n    $ direnv edit\n\nRun the development web server:\n\n    $ flask run\n\n### Tests\n\nInstall the tooling:\n\n    $ pip install -U tox\n\nRun the tests\n\n    $ tox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodiroot%2Fmofanhu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fodiroot%2Fmofanhu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fodiroot%2Fmofanhu/lists"}