{"id":21385191,"url":"https://github.com/spoqa/flask-marshmallow-apispec-example-web-server","last_synced_at":"2025-10-05T03:11:19.075Z","repository":{"id":143715075,"uuid":"349920812","full_name":"spoqa/flask-marshmallow-apispec-example-web-server","owner":"spoqa","description":"Flask, marshmallow, apispec을 이용한 예제 웹 서버","archived":false,"fork":false,"pushed_at":"2021-03-23T04:00:41.000Z","size":320,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-22T23:42:01.970Z","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/spoqa.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":"2021-03-21T06:46:33.000Z","updated_at":"2023-07-02T09:27:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"0dfd8ead-d080-46bc-97a7-3c5535795858","html_url":"https://github.com/spoqa/flask-marshmallow-apispec-example-web-server","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/spoqa%2Fflask-marshmallow-apispec-example-web-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflask-marshmallow-apispec-example-web-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflask-marshmallow-apispec-example-web-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spoqa%2Fflask-marshmallow-apispec-example-web-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spoqa","download_url":"https://codeload.github.com/spoqa/flask-marshmallow-apispec-example-web-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243864626,"owners_count":20360355,"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-11-22T11:45:29.949Z","updated_at":"2025-10-05T03:11:14.025Z","avatar_url":"https://github.com/spoqa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flask-marshmallow-apispec-example-web-server\n\nFlask + marshmallow + apispec으로 OpenAPI 3.0 명세 문서화 자동화 예제 코드입니다.\n이 예제 코드에 대한 자세한 설명은\n[스포카 기술 블로그의 \"Flask, marshmallow, apispec으로 API 문서화 자동화하기\"](https://spoqa.github.io/2021/03/23/flask-marshmallow-apispec.html)\n포스트를 참고해주세요.\n\n## Usage\n\n### Web\n\n```sh\n$ python run.py --help\nusage: run.py [-h] [-H HOST] [-p PORT]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -H HOST, --host HOST  Address to bind (default: 0.0.0.0)\n  -p PORT, --port PORT  Port number to bind (default: 8080)\n$ python run.py\n * Serving Flask app \"example_web_server.wsgi\" (lazy loading)\n * Environment: production\n   WARNING: This is a development server. Do not use it in a production deployment.\n   Use a production WSGI server instead.\n * Debug mode: on\n * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)\n * Restarting with stat\n * Debugger is active!\n * Debugger PIN: 000-000-000\n```\n\n`run.py` 를 실행하면 기본값으로 `8080` 포트를 이용해 서빙됩니다.\n\n이 예제 코드는 3가지의 API를 가지고 있습니다.\n\n```sh\n$ http :8080/hello/\nHTTP/1.0 200 OK\nContent-Length: 13\nContent-Type: text/html; charset=utf-8\nServer: Werkzeug/1.0.1 Python/3.8.2\n\nHello, world!\n\n$ http :8080/secured/hello/ name==Rusty X-Some-Access-Token:secure-access-token\nHTTP/1.0 200 OK\nContent-Length: 20\nContent-Type: text/html; charset=utf-8\nServer: Werkzeug/1.0.1 Python/3.8.2\n\nHello, sneaky Rusty!\n\n$ http -j POST :8080/post/hello/ name=Thomas mood=5 X-Some-Access-Token:secure-access-token\nHTTP/1.0 200 OK\nContent-Length: 79\nContent-Type: application/json\nServer: Werkzeug/1.0.1 Python/3.8.2\n\n{\n    \"message\": \"I hope your mood 5 be better.\",\n    \"title\": \"Hello, Thomas!\"\n}\n```\n\n자세한 API 동작은 `example_web_server/api.py` 코드를 참고해주세요.\n\n### OpenAPI Documentation\n\n```sh\npython build_apispec.py \u003e spec.yaml\n```\n\n이렇게 생성된 YAML 문서 파일은 [Swagger Editor](https://editor.swagger.io) 등의\nOpenAPI 3.0 렌더러로 렌더링할 수 있습니다.\n\n[Redoc](https://github.com/Redocly/redoc)으로 렌더링한 결과물은\n[이 저장소의 깃헙 페이지](https://spoqa.github.io/flask-marshmallow-apispec-example-web-server/index.html)에서\n볼 수 있습니다.\n\n## License\n\n_flask-marshmallow-apispec-example-web-server_ is distributed under the terms of the MIT License.\n\nSee [LICENSE](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fflask-marshmallow-apispec-example-web-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspoqa%2Fflask-marshmallow-apispec-example-web-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspoqa%2Fflask-marshmallow-apispec-example-web-server/lists"}