{"id":23511522,"url":"https://github.com/imaginary-cloud/flask-boilerplate","last_synced_at":"2025-05-13T17:34:26.327Z","repository":{"id":85823407,"uuid":"565879227","full_name":"imaginary-cloud/flask-boilerplate","owner":"imaginary-cloud","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-14T15:20:50.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-16T20:34:56.873Z","etag":null,"topics":[],"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/imaginary-cloud.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":"2022-11-14T14:18:15.000Z","updated_at":"2022-11-14T15:21:01.000Z","dependencies_parsed_at":"2023-03-05T14:00:25.955Z","dependency_job_id":null,"html_url":"https://github.com/imaginary-cloud/flask-boilerplate","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/imaginary-cloud%2Fflask-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imaginary-cloud%2Fflask-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imaginary-cloud%2Fflask-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imaginary-cloud%2Fflask-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imaginary-cloud","download_url":"https://codeload.github.com/imaginary-cloud/flask-boilerplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253993356,"owners_count":21996294,"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":[],"created_at":"2024-12-25T12:15:02.737Z","updated_at":"2025-05-13T17:34:26.306Z","avatar_url":"https://github.com/imaginary-cloud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Boilerplate\n\nBoilerplate using Python's Flask web framework (https://flask.palletsprojects.com/en/2.2.x/) ready for bigger projects.\n\n## Features\n\n- Application factory pattern;\n- Flask Blueprints for different application contexts;\n- Poetry dependency manager;\n- Pre-commit hooks:\n    - end-of-file-fixer;\n    - trailing-whitespace;\n    - black;\n    - autoflake;\n    - flake8;\n    - isort;\n    - mypy.\n- OpenAPI documentation (AKA Swagger);\n- Testing with pytest;\n- PostgreSQL Database connection with Flask-SQLAlchemy;\n- Migrations with Flask-Migrate (Alembic);\n- Docker and docker compose for deployment;\n- HTTPS support with certbot (using Let's Encrypt);\n- Nginx reverse proxy server;\n- Bitbucket pipelines CICD.\n\n\n## Install locally\n\nRun `$ ./scripts/local-bootstrap.sh` to:\n\n- Install poetry;\n- Create virtual environment;\n- Install dependencies;\n- Set up git hook scripts.\n\nSet up the Postgres database with the configuration as in docker-compose.yml (easiest way is to spin up a container for that service running `$ docker compose up database -d`)\n\nRun `$ ./scripts/upgrade-db.sh` to run migrations.\n\n\n## Activate environment\n\n`$ source .venv/bin/activate`\n## Run local server\n\n`$ ./scripts/server.sh`\n\n## Run tests\n\n`$ poetry run pytest {pattern/options}`\n\nMake sure there is a database named flask_app_test in the same db server as the local db\n\n## Run lint\n\n`$ poetry run pre-commit run --all-files`\n\n## Swagger UI\n\nat /docs\n\n\n## Dockerfiles\n\n`pipeline.Dockerfile` used to build base image to be used on the pipeline.\n\n`nginx.Dockerfile` used to change nginx configuration.\n\n`Dockerfile` to build the application.\n\n## SSL configuration\n\nFollowed this tutorial: https://mindsers.blog/post/https-using-nginx-certbot-docker/\n\n## License\n\nCopyright © 2010-2022 [Imaginary Cloud](https://www.imaginarycloud.com/?utm_source=github). This library is licensed under the MIT license.\n\n## About Imaginary Cloud\n\n[![Imaginary Cloud](https://s3.eu-central-1.amazonaws.com/imaginary-images/Logo_IC_readme.svg)](https://www.imaginarycloud.com/?utm_source=github)\n\nAt Imaginary Cloud, we build world-class web \u0026 mobile apps. Our Front-end developers and UI/UX designers are ready to create or scale your digital product. Take a look at our [website](https://www.imaginarycloud.com/?utm_source=github) and [get in touch!](https://www.imaginarycloud.com/contacts/?utm_source=github) We'll take it from there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimaginary-cloud%2Fflask-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimaginary-cloud%2Fflask-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimaginary-cloud%2Fflask-boilerplate/lists"}