{"id":20244642,"url":"https://github.com/billy0402/flask-tutorial","last_synced_at":"2026-05-14T20:31:13.986Z","repository":{"id":50159046,"uuid":"211435627","full_name":"billy0402/flask-tutorial","owner":"billy0402","description":"A learning project from the book 'Flask Web Development'.","archived":false,"fork":false,"pushed_at":"2021-06-02T04:18:32.000Z","size":79,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T13:37:33.510Z","etag":null,"topics":["course","flask","python","restful-api"],"latest_commit_sha":null,"homepage":"","language":"Python","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/billy0402.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}},"created_at":"2019-09-28T03:01:04.000Z","updated_at":"2024-04-13T15:35:52.000Z","dependencies_parsed_at":"2022-09-06T07:30:12.263Z","dependency_job_id":null,"html_url":"https://github.com/billy0402/flask-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/billy0402/flask-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy0402%2Fflask-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy0402%2Fflask-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy0402%2Fflask-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy0402%2Fflask-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/billy0402","download_url":"https://codeload.github.com/billy0402/flask-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/billy0402%2Fflask-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33042075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["course","flask","python","restful-api"],"created_at":"2024-11-14T09:16:33.875Z","updated_at":"2026-05-14T20:31:13.957Z","avatar_url":"https://github.com/billy0402.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [flask-tutorial](https://github.com/miguelgrinberg/flasky)\n\n## environment\n\n- [macOS 10.15.7](https://www.apple.com/tw/macos/catalina/)\n- [PyCharm 2020.3.3](https://www.jetbrains.com/pycharm/)\n- [Python 3.8.7](https://www.python.org/)\n- [Flask 1.1.2](https://flask.palletsprojects.com/en/1.1.x/)\n\n## environment variable\n\n```shell\n$ export FLASK_APP=main.py\n$ export FLASK_CONFIG=development\n$ export MAIL_USERNAME=\u003cyour email address\u003e\n$ export MAIL_PASSWORD=\u003cyour email password\u003e\n$ export FLASKY_ADMIN=\u003cyour email address\u003e\n```\n\n## command\n\n```shell\n# run server\n$ flask run\n\n# open shell\n$ flask shell\n\n# run unit test\n$ flask test\n```\n\n## database migration\n\n```shell\n# init\n$ flask db init\n\n# make migration\n$ flask db migrate -m \"initial migration\"\n\n# migrate\n$ flask db upgrade\n$ flask db downgrade\n$ flask db stamp\n```\n\n## load data\n\n```python\nfrom app.models import Role\n\nRole.insert.roles\n```\n\n## fake data\n\n```python\nfrom app import fake\n\nfake.users()\nfake.posts()\n```\n\n## heroku\n\n```shell\n# local test\n$ heroku local:run flask deploy\n$ heroku local\n$ heroku local web=3\n\n# production deploy\n$ heroku maintenance:on\n$ git push heroku master\n$ heroku run flask deploy\n$ heroku restart\n$ heroku maintenance:off\n```\n\n## docker\n\n```shell\n$ docker build -t flasky:latest .\n$ docker run --name postgres -d \\\n    -e POSTGRES_PASSWORD=postgres \\\n    -e POSTGRES_DB=\"flasky\" \\\n    postgres:latest\n$ docker run --name flasky -d -p 8000:5000 \\\n    --link postgres:dbserver \\\n    -e MAIL_USERNAME=${your_email_address} \\\n    -e MAIL_PASSWORD=${your_email_password} \\\n    -e FLASKY_ADMIN=${your_email_address} \\\n    -e DATABASE_URL=\"postgresql://postgres:postgres@dbserver/flasky\" \\\n    flasky:latest\n\n$ docker-compose up -d --build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilly0402%2Fflask-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilly0402%2Fflask-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilly0402%2Fflask-tutorial/lists"}