{"id":24317198,"url":"https://github.com/ot-nemoto/flask-tutorial","last_synced_at":"2026-04-21T00:01:45.288Z","repository":{"id":230122702,"uuid":"778279948","full_name":"ot-nemoto/flask-tutorial","owner":"ot-nemoto","description":"Flask チュートリアル","archived":false,"fork":false,"pushed_at":"2024-04-03T10:17:56.000Z","size":40,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T16:43:35.557Z","etag":null,"topics":["flask","tutorial"],"latest_commit_sha":null,"homepage":"https://msiz07-flask-docs-ja.readthedocs.io/ja/latest/","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/ot-nemoto.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-27T12:30:28.000Z","updated_at":"2024-03-27T12:41:56.000Z","dependencies_parsed_at":"2025-01-17T13:32:58.085Z","dependency_job_id":"43087fa1-04ee-483d-88ed-dafdb3358846","html_url":"https://github.com/ot-nemoto/flask-tutorial","commit_stats":null,"previous_names":["ot-nemoto/flask-tutorial"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ot-nemoto/flask-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ot-nemoto%2Fflask-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ot-nemoto%2Fflask-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ot-nemoto%2Fflask-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ot-nemoto%2Fflask-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ot-nemoto","download_url":"https://codeload.github.com/ot-nemoto/flask-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ot-nemoto%2Fflask-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32071013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","tutorial"],"created_at":"2025-01-17T13:32:50.332Z","updated_at":"2026-04-21T00:01:45.243Z","avatar_url":"https://github.com/ot-nemoto.png","language":"Python","readme":"# flask-tutorial\n\n## Commands\n\n### データベースファイルの初期化\n\n```sh\nflask --app flaskr init-db\n```\n\n### アプリケーションの実行\n\n```sh\nflask --app flaskr --debug run\n```\n\n*http://127.0.0.1:5000/*\n\n### テストの実行\n\n```sh\npip install -e .\n\npytest -v\n```\n\nカバレッジ（網羅率）を測定\n\n```sh\ncoverage run -m pytest\n```\n\nカバレッジリポート\n\n```sh\ncoverage report\n  # Name                 Stmts   Miss Branch BrPart  Cover\n  # ------------------------------------------------------\n  # flaskr/__init__.py      23      0      4      0   100%\n  # flaskr/auth.py          60      0     30      0   100%\n  # flaskr/blog.py          58      0     36      0   100%\n  # flaskr/db.py            23      0      8      0   100%\n  # ------------------------------------------------------\n  # TOTAL                  164      0     78      0   100%\n```\n\nHTMLでカバレッジリポートを出力\n\n```sh\ncoverage html\n```\n\n### ビルド\n\n```sh\npython setup.py bdist_wheel\n```\n\n### アプリケーションのルート一覧\n\n```sh\nflask --app flaskr routes\n  # Endpoint       Methods    Rule\n  # -------------  ---------  -----------------------\n  # auth.login     GET, POST  /auth/login\n  # auth.logout    GET        /auth/logout\n  # auth.register  GET, POST  /auth/register\n  # blog.create    GET, POST  /create\n  # blog.delete    POST       /\u003cint:id\u003e/delete\n  # blog.detail    GET        /\u003cint:id\u003e\n  # blog.index     GET        /\n  # blog.update    GET, POST  /\u003cint:id\u003e/update\n  # hello          GET        /hello\n  # index          GET        /\n  # static         GET        /static/\u003cpath:filename\u003e\n```\n\n## 本番環境への展開\n\nインストール\n\n```sh\npip install flaskr-${version}-py3-none-any.whl\n```\n\nデータベースを作成\n\n```sh\nflask --app flaskr init-db\n```\n\n秘密鍵の設定\n\n```sh\ncat \u003c\u003c EOT | tee /home/vscode/.local/var/flaskr-instance/config.py\nSECRET_KEY = '$(python -c 'import secrets; print(secrets.token_hex())')'\nEOT\n```\n\n実行\n\n```sh\npip install waitress\n```\n\n```sh\nwaitress-serve --call 'flaskr:create_app'\n```\n\n*http://0.0.0.0:8080*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fot-nemoto%2Fflask-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fot-nemoto%2Fflask-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fot-nemoto%2Fflask-tutorial/lists"}