{"id":357875,"date":"2023-05-26T09:41:49","date_gmt":"2023-05-26T08:41:49","guid":{"rendered":"https:\/\/blog.jetbrains.com\/pycharm\/2023\/05\/create-passphrase-generator-in-pycharm\/"},"modified":"2023-06-02T03:01:50","modified_gmt":"2023-06-02T02:01:50","slug":"create-passphrase-generator-in-pycharm","status":"publish","type":"pycharm","link":"https:\/\/blog.jetbrains.com\/ja\/pycharm\/2023\/05\/create-passphrase-generator-in-pycharm\/","title":{"rendered":"PyCharm \u3067 \u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001PyCharm \u3067\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u307e\u305f\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3082\u5b66\u7fd2\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/www.jetbrains.com\/ja-jp\/pycharm\/download\/\" target=\"_blank\" rel=\"noopener\">PyCharm Community\uff08\u307e\u305f\u306f Professional<\/a><a href=\"https:\/\/www.jetbrains.com\/ja-jp\/pycharm\/download\/\" target=\"_blank\" rel=\"noopener\">\uff09 Edition<\/a>\u00a0\u3067\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/li>\n<li>Python \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30a4\u30f3\u30dd\u30fc\u30c8<\/li>\n<li><a href=\"https:\/\/typer.tiangolo.com\/\" target=\"_blank\" rel=\"noopener\">Typer \u30e9\u30a4\u30d6\u30e9\u30ea<\/a>\u3092\u4f7f\u3063\u305f Python \u306b\u3088\u308b\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u306e\u4f5c\u6210<\/li>\n<li>PyCharm \u3067\u306e\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u3068\u30c7\u30d0\u30c3\u30b0<\/li>\n<li>\u5b9f\u884c\u69cb\u6210\u306e\u4f5c\u6210\u3068\u7de8\u96c6<\/li>\n<\/ul>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\u3001\u7121\u6599\u306e PyCharm Community Edition \u3092\u4f7f\u3063\u3066\u65e5\u5e38\u7684\u306a\u30bf\u30b9\u30af\u3092\u81ea\u52d5\u5316\u3059\u308b\u30b7\u30f3\u30d7\u30eb\u306a CLI \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u65b9\u6cd5\u3092\u8aac\u660e\u3059\u308b\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u6700\u5f8c\u306b\u306f\u5b9f\u969b\u306b\u52d5\u4f5c\u3059\u308b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u304c\u5b8c\u6210\u3057\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u3042\u304f\u307e\u3067\u3082\u5b66\u7fd2\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u304c\u751f\u6210\u3059\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u3092\u4fdd\u8b77\u3059\u308b\u76ee\u7684\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u306f\u7d76\u5bfe\u306b\u304a\u3084\u3081\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u5b8c\u5168\u306a\u30b3\u30fc\u30c9\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f\u3001<a href=\"https:\/\/github.com\/denis-mashutin\/cli-tool-tutorial\" target=\"_blank\" rel=\"noreferrer noopener\">\u30ea\u30dd\u30b8\u30c8\u30ea<\/a>\u3092\u30af\u30ed\u30fc\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u30af\u30ed\u30fc\u30f3\u64cd\u4f5c\u306b\u3064\u3044\u3066\u306e\u8a73\u7d30\u306f\u3001<a href=\"https:\/\/pleiades.io\/help\/pycharm\/cloning-repository.html\" target=\"_blank\" rel=\"noopener\">PyCharm \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306b\u3064\u3044\u3066<\/h2>\n<h3 class=\"wp-block-heading\">\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3068\u306f\uff1f<\/h3>\n<p>\u591a\u304f\u306e\u4eba\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u65e5\u5e38\u7684\u306b\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u30b5\u30fc\u30d3\u30b9\u3084\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306b\u767b\u9332\u3059\u308b\u969b\u306b\u306f\u3001\u6570\u5b57\u3001\u7279\u6b8a\u6587\u5b57\u3001\u5927\u6587\u5b57\u306a\u3069\u3092\u4f7f\u3063\u305f\u9577\u3044\u4e00\u610f\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u4f5c\u6210\u304c\u6c42\u3081\u3089\u308c\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u8981\u4ef6\u306f\u3059\u3079\u3066\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u30d6\u30eb\u30fc\u30c8\u30d5\u30a9\u30fc\u30b9\u653b\u6483\u3078\u306e\u8010\u6027\u3092\u6301\u305f\u305b\u308b\u305f\u3081\u306b\u3042\u308a\u307e\u3059\u3002 \u30d6\u30eb\u30fc\u30c8\u30d5\u30a9\u30fc\u30b9\u653b\u6483\u3068\u306f\u3001\u57fa\u672c\u7684\u306b\u306f\u6b63\u3057\u3044\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u5206\u304b\u308b\u307e\u3067\u4f55\u5ea6\u3082\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u63a8\u6e2c\u3057\u3066\u8a66\u884c\u3059\u308b\u3053\u3068\u3067\u3059\u3002 \u5fc5\u8981\u3068\u306a\u308b\u8a66\u884c\u56de\u6570\u3084\u8a66\u884c\u6642\u9593\u306f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u9577\u3055\u3084\u8907\u96d1\u3055\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002<\/p>\n<p>\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306f\u8907\u6570\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u5358\u8a9e\u3067\u69cb\u6210\u3055\u308c\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u3059\u3002 \u610f\u5473\u3092\u6301\u305f\u305b\u305f\u308a\u3001\u6587\u6cd5\u7684\u306b\u6b63\u3057\u304f\u3057\u305f\u308a\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306b\u306f\u901a\u5e38 4\uff5e5 \u5358\u8a9e\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u5358\u8a9e\u6570\u304c\u5897\u3048\u308b\u307b\u3069\u826f\u3044\u3068\u3055\u308c\u307e\u3059\u3002 \u305f\u3068\u3048\u3070\u3001\u300c<em>PhysicianBuiltHotPotatoRegularly<\/em>\u300d\u306f\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3067\u3059\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u304c\u512a\u308c\u3066\u3044\u308b\u7406\u7531<\/h3>\n<p>\u300c<em>A^1rL#2k2oPiA9H <\/em>\u300d\u306f\u9069\u5207\u304b\u3064\u5f37\u529b\u306a\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u3059\u3002 \u5c0f\u6587\u5b57\u3001\u5927\u6587\u5b57\u3001\u6570\u5b57\u3001\u7279\u6b8a\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u300115 \u6587\u5b57\u306e\u9577\u3055\u3067\u3059\u3002 \u3068\u306f\u3044\u3048\u3001\u8a18\u61b6\u3059\u308b\u306a\u3089\u300c<em>A^1rL#2k2oPiA9H<\/em>\u300d\u3068\u300c<em>PhysicianBuiltHotPotatoRegularly<\/em>\u300d\u306e\u3069\u3061\u3089\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u304b\uff1f \u3061\u306a\u307f\u306b\u3001\u5f8c\u8005\u306f 32 \u6587\u5b57\u3067\u3059\u3002<\/p>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a18\u61b6\u3059\u308b\u3053\u3068\u306e\u6613\u3057\u3055\u3084\u96e3\u3057\u3055\u3060\u3051\u3067\u306a\u304f\u3001\u89e3\u8aad\u3059\u308b\u3053\u3068\u306e\u6613\u3057\u3055\u3084\u96e3\u3057\u3055\u306b\u3082\u6ce8\u76ee\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u8868\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<figure class=\"wp-block-table aligncenter is-style-regular\">\n<table>\n<thead>\n<tr>\n<th>\u00a0<\/th>\n<th><em>A^1rL#2k2oPiA9H<\/em><\/th>\n<th><em>PhysicianBuiltHotPotatoRegularly<\/em><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>\u6587\u5b57\u306e\u7a2e\u985e\u306e\u6570<\/strong><\/td>\n<td>95<\/td>\n<td>52<\/td>\n<\/tr>\n<tr>\n<td><strong>\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u9577\u3055<\/strong><\/td>\n<td>15<\/td>\n<td>32<\/td>\n<\/tr>\n<tr>\n<td><strong>\u89e3\u8aad\u306b\u5fc5\u8981\u306a\u8a66\u884c\u56de\u6570\uff08<a href=\"https:\/\/en.wikipedia.org\/wiki\/Password_strength#Entropy_as_a_measure_of_password_strength\" target=\"_blank\" rel=\"noreferrer noopener\">?<\/a>\uff09<\/strong><\/td>\n<td>2<sup>98<\/sup><\/td>\n<td>2<sup>182<\/sup><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u3044\u305a\u308c\u3082\u5f37\u529b\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306e\u65b9\u304c\u5f37\u529b\u3067\u3042\u308a\u3001\u306f\u308b\u304b\u306b\u8a18\u61b6\u3057\u3084\u3059\u3044\u3068\u8a00\u3048\u307e\u3059\u3002 \u3057\u304b\u3082\u3001\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306b\u6570\u5b57\u3068\u7279\u6b8a\u6587\u5b57\u3092\u6570\u500b\u8ffd\u52a0\u3059\u308c\u3070\u3001\u5fc5\u8981\u306a\u5e73\u5747\u63a8\u6e2c\u8a66\u884c\u56de\u6570\u304c 2<sup>210<\/sup> \u306b\u5897\u3048\u3001\u5b9f\u8cea\u7684\u306b\u89e3\u8aad\u4e0d\u53ef\u80fd\u3068\u306a\u308a\u307e\u3059\uff01<\/p>\n<p>\u307e\u3068\u3081:<\/p>\n<ul>\n<li>\u30e9\u30f3\u30c0\u30e0\u306a\u5358\u8a9e\u3067\u69cb\u6210\u3055\u308c\u308b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306f\u3001\u30e9\u30f3\u30c0\u30e0\u306a\u6587\u5b57\u3067\u69cb\u6210\u3055\u308c\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u3088\u308a\u3082\u8a18\u61b6\u3057\u3084\u3059\u3044\u3002<\/li>\n<li>\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306f\u6982\u3057\u3066\u307b\u3068\u3093\u3069\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3088\u308a\u3082\u9577\u3044\u305f\u3081\u3001\u30d6\u30eb\u30fc\u30c8\u30d5\u30a9\u30fc\u30b9\u653b\u6483\u3078\u306e\u8010\u6027\u304c\u3088\u308a\u9ad8\u304f\u3001\u7d50\u679c\u7684\u306b\u3088\u308a\u5b89\u5168\u3067\u3042\u308b\u3002<\/li>\n<li>\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306f\u8907\u96d1\u3055\u8981\u4ef6\u306b\u5408\u308f\u305b\u3066\u5909\u66f4\u53ef\u80fd\u3067\u3042\u308b\u3002 \u305f\u3068\u3048\u3070\u3001\u5404\u5358\u8a9e\u306e\u5148\u982d\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u3057\u3066\u5927\u6587\u5b57\u3092\u542b\u3081\u305f\u308a\u3001\u7279\u6b8a\u6587\u5b57\u3084\u6570\u5b57\u3092\u5358\u8a9e\u306e\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u8ffd\u52a0\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3042\u308b\u3002<\/li>\n<\/ul>\n<h3 class=\"wp-block-heading\">\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u3068\u306f<\/h3>\n<p>\u4e00\u822c\u306b\u3001\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u306f\u30e9\u30f3\u30c0\u30e0\u306a\u5358\u8a9e\u3092\u7591\u4f3c\u6587\u306b\u7d44\u307f\u5408\u308f\u305b\u3066\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u6210\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002 \u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001<a href=\"https:\/\/www.jetbrains.com\/pycharm\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">PyCharm<\/a> \u3068 <a href=\"https:\/\/typer.tiangolo.com\/\" target=\"_blank\" rel=\"noopener\">Typer<\/a> \u3092\u4f7f\u7528\u3057\u3066\u4ee5\u4e0b\u3092\u884c\u3046\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>\u30e9\u30f3\u30c0\u30e0\u306a 4\uff5e5 \u5358\u8a9e\u3067\u69cb\u6210\u3055\u308c\u308b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u751f\u6210\u3059\u308b\u3002<\/li>\n<li>\u5bfe\u5fdc\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30aa\u30f3\u306b\u3057\u305f\u3068\u304d\u306b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306e\u5404\u5358\u8a9e\u306e\u5148\u982d\u3092\u5927\u6587\u5b57\u306b\u3059\u308b\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u5358\u8a9e\u306e\u5148\u982d\u6587\u5b57\u306f\u5927\u6587\u5b57\u306b\u306a\u308a\u307e\u305b\u3093\u3002<\/li>\n<li>\u5358\u8a9e\u306e\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u8a18\u53f7\u3092\u4f7f\u7528\u3059\u308b\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u533a\u5207\u308a\u6587\u5b57\u306f\u4f7f\u7528\u3055\u308c\u307e\u305b\u3093\u3002<\/li>\n<li>5 \u756a\u76ee\u306e\u5358\u8a9e\u3092\u8ffd\u52a0\u3057\u3066\u3001\u3088\u308a\u9577\u3044\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u4f5c\u6210\u3059\u308b\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u9577\u3055\u306f 4 \u5358\u8a9e\u3067\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u306e\u30c4\u30fc\u30eb\u306f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u5b58\u3057\u307e\u305b\u3093\u3002<\/p>\n<h2 class=\"wp-block-heading\">\u524d\u63d0\u6761\u4ef6<\/h2>\n<ul>\n<li>Python \u306e\u4f7f\u7528\u7d4c\u9a13<\/li>\n<li><a href=\"https:\/\/www.jetbrains.com\/ja-jp\/pycharm\/download\/\" target=\"_blank\" rel=\"noopener\">PyCharm Community\uff08\u307e\u305f\u306f Professional\uff09 Edition<\/a> 2023.1 \u4ee5\u964d<\/li>\n<li>Python\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u4f5c\u6210\u4e2d\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u53ef\u80fd\uff09<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\">\u6700\u521d\u306e\u30b9\u30c6\u30c3\u30d7<\/h2>\n<h3 class=\"wp-block-heading\">Typer \u3067\u300cHello World\u300d\u3092\u66f8\u304f<\/h3>\n<p>PyCharm \u3092\u521d\u3081\u3066\u8d77\u52d5\u3059\u308b\u3068\u300c\u3088\u3046\u3053\u305d\u300d\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002 <strong>New Project<\/strong>\uff08\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352434\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/welcome_screen-1.png\" alt=\"PyCharm \u306e\u3088\u3046\u3053\u305d\u753b\u9762\" width=\"1600\" height=\"1300\" \/><\/figure>\n<\/div>\n<p>PyCharm \u304c\u3059\u3067\u306b\u8d77\u52d5\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc\u304b\u3089 <strong>File| New Project<\/strong>\uff08\u30d5\u30a1\u30a4\u30eb | \u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p><strong>New Project<\/strong>\uff08\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u958b\u3044\u305f\u3089\u3001\u4e0a\u90e8\u306b\u3042\u308b <strong>Location<\/strong>\uff08\u5834\u6240\uff09\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002 \u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u3068\u3057\u3066\u3082\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-351981\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/new_project.png\" alt=\"\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\" width=\"1600\" height=\"1300\" \/><\/figure>\n<\/div>\n<p>PyCharm \u304c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u4eee\u60f3\u74b0\u5883\u306e\u30bf\u30a4\u30d7\u3082\u9078\u629e\u3067\u304d\u307e\u3059\u3002 \u307e\u305f\u3001\u74b0\u5883\u304c\u4f5c\u6210\u3055\u308c\u308b\u5834\u6240\u3068\u30d9\u30fc\u30b9 Python \u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u3082\u9078\u629e\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u597d\u307f\u306e\u74b0\u5883\u30bf\u30a4\u30d7\u3092\u9078\u629e\u3057\u3066\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\uff08\u307e\u305f\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3092\u7dad\u6301\uff09\u3057\u305f\u3089\u3001<strong>Create<\/strong>\uff08\u4f5c\u6210\uff09\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>PyCharm \u304c\u4eee\u60f3\u74b0\u5883\uff08\u3053\u306e\u4f8b\u3067\u306f <strong>venv<\/strong>\uff09\u3092\u542b\u3080\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u524d\u306e\u624b\u9806\u3067 <strong>Create a main.py welcome script<\/strong>\uff08main.py \u30a6\u30a7\u30eb\u30ab\u30e0\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4f5c\u6210\uff09\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u3092\u30aa\u30d5\u306b\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u5834\u5408\u3001PyCharm \u306f <strong>main.py<\/strong> \u3082\u4f5c\u6210\u3057\u3066\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u958b\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-351993\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/project_created.png\" alt=\"PyCharm \u3067\u65b0\u898f\u306b\u4f5c\u6210\u3055\u308c\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\" width=\"2540\" height=\"1696\" \/><\/figure>\n<\/div>\n<p>\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u306f\u57fa\u672c\u7684\u306a\u8aac\u660e\u304c\u8a18\u8f09\u3055\u308c\u305f\u300cHello World\u300d\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 \u6b21\u306e\u30b3\u30fc\u30c9\u3092\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main():\n    print(\"Hello World\")\n\n\nif __name__ == \"__main__\":\n    typer.run(main)<\/pre>\n<p>\u6b21\u306f PyCharm \u306b\u79fb\u52d5\u3057\u3001<strong>\u2318A<\/strong> \/ <strong>Ctrl+A<\/strong> \u3068 <strong>\u2318V<\/strong> \/ <strong>Ctrl+V<\/strong> \u3092\u7d9a\u3051\u3066\u62bc\u3057\u3066 <strong>main.py<\/strong> \u306e\u5185\u5bb9\u3092\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352006\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/typer_hello_world.png\" alt=\"Typer \u306e\u300cHello World\u300d\" width=\"385\" height=\"244\" \/><\/figure>\n<\/div>\n<p><code>typer<\/code> \u306b\u8d64\u3044\u6ce2\u7dda\u304c\u4ed8\u3044\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u3053\u308c\u306f\u3001Python \u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u304c Typer \u304c\u4f55\u3067\u3042\u308b\u304b\u3092\u8a8d\u8b58\u3057\u3066\u3044\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002 \u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d77\u52d5\u3059\u308b\u306b\u306f\u3001\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066 <strong>main.py<\/strong> \u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u3066\u3044\u308b\u30b7\u30f3\u30dc\u30eb\u306b\u5408\u308f\u305b\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306b\u3042\u308b <strong>Install and import package \u2018typer\u2019<\/strong>\uff08\u30d1\u30c3\u30b1\u30fc\u30b8 \u2018typer\u2019 \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352017\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/install_typer_quickfix.png\" alt=\"Typer \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\" width=\"640\" height=\"300\" \/><\/figure>\n<\/div>\n<p>PyCharm \u304c Typer \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u74b0\u5883\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066 <strong>main.py<\/strong> \u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u30ac\u30bf\u30fc\u306e\u5b9f\u884c\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001<strong>Run \u2018main\u2019<\/strong>\uff08\u2018main\u2019 \u306e\u5b9f\u884c\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352028\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/run_from_gutter.png\" alt=\"\u30ac\u30bf\u30fc\u30a2\u30a4\u30b3\u30f3\u3092\u4f7f\u7528\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\" width=\"402\" height=\"332\" \/><\/figure>\n<\/div>\n<p>\u300cHello World\u300d\u304c\u8868\u793a\u3055\u308c\u305f <strong>Run<\/strong>\uff08\u5b9f\u884c\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u4e0b\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352039\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/hello_world_success.png\" alt=\"\u5b9f\u884c\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\" width=\"1866\" height=\"1220\" \/><\/figure>\n<h3 class=\"wp-block-heading\">\u6700\u521d\u306e\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u751f\u6210\u3059\u308b<\/h3>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u300cHello World\u300d\u306e\u4ee3\u308f\u308a\u306b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u304c\u51fa\u529b\u3055\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002 \u30e9\u30f3\u30c0\u30e0\u306a\u5358\u8a9e\u3092\u9078\u3093\u3067\u30d5\u30ec\u30fc\u30ba\u3092\u4f5c\u6210\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u5358\u8a9e\u3092\u9078\u3073\u51fa\u3059\u305f\u3081\u306e\u5358\u8a9e\u30ea\u30b9\u30c8\u304c\u6700\u4f4e 1 \u3064\u306f\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u3088\u3046\u306a\u30ea\u30b9\u30c8\u306f\u624b\u52d5\u3067\u6e96\u5099\u3059\u308b\u3053\u3068\u3082\u3001\u5165\u624b\u53ef\u80fd\u306a\u3044\u305a\u308c\u304b\u306e<a href=\"https:\/\/en.wikipedia.org\/wiki\/Large_language_model#List_of_large_language_models\" target=\"_blank\" rel=\"noopener\">\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb<\/a>\u3092\u4f7f\u7528\u3057\u3066\u751f\u6210\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u5358\u8a9e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3059\u308b\u969b\u306f\u3001\u5fc5\u305a\u5b89\u5168\u306b\u4fdd\u7ba1\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u60aa\u610f\u306e\u3042\u308b\u4eba\u7269\u304c\u5358\u8a9e\u30ea\u30b9\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u5834\u5408\u3001\u308f\u305a\u304b\u6570\u79d2\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u89e3\u8aad\u3055\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-table\">\n<table>\n<tbody>\n<tr>\n<td><mark class=\"has-inline-color has-vivid-red-color\" style=\"background-color: rgba(0, 0, 0, 0);\">\u3053\u3061\u3089\u306e<a href=\"https:\/\/github.com\/denis-mashutin\/cli-tool-tutorial\" target=\"_blank\" rel=\"noreferrer noopener\">\u30ea\u30dd\u30b8\u30c8\u30ea<\/a>\u306b\u306f\u3001\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u63b2\u8f09\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30b3\u30fc\u30c9\u3068\u8907\u6570\u306e\u5358\u8a9e\u30ea\u30b9\u30c8\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002 \u3053\u308c\u3089\u306f\u81ea\u5df1\u8cac\u4efb\u3067\u5b66\u7fd2\u306e\u307f\u3092\u76ee\u7684\u3068\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u5358\u8a9e\u30ea\u30b9\u30c8\u306b\u57fa\u3065\u3044\u3066\u5b9f\u969b\u306e\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u751f\u6210\u3057\u306a\u3044\u3053\u3068\u3092\u5f37\u304f\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/mark><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>\u3053\u306e\u6bb5\u968e\u3067\u306f\u4ee5\u4e0b\u306e 4 \u3064\u306e\u5358\u8a9e\u30ea\u30b9\u30c8\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<ul>\n<li><strong>obj_nouns.txt<\/strong>: \u751f\u6210\u3055\u308c\u305f\u7591\u4f3c\u6587\u3067\u76ee\u7684\u8a9e\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u540d\u8a5e\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/li>\n<li><strong>sub_nouns.txt<\/strong>: \u4e3b\u8a9e\u3068\u3057\u3066\u6a5f\u80fd\u3059\u308b\u540d\u8a5e\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/li>\n<li><strong>verbs.txt<\/strong>: \u52d5\u8a5e\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/li>\n<li><strong>adjectives.txt<\/strong>: \u5f62\u5bb9\u8a5e\u304c\u542b\u307e\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u5404\u30ea\u30b9\u30c8\u306e\u5358\u8a9e\u6570\u304c\u591a\u3044\u307b\u3069\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u751f\u6210\u3067\u304d\u308b\u7d44\u307f\u5408\u308f\u305b\u6570\u3082\u591a\u304f\u306a\u308a\u307e\u3059\u3002 \u5404\u5358\u8a9e\u306f\u6539\u884c\u3092\u5165\u308c\u3066\u8ffd\u52a0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u751f\u6210\u3055\u308c\u305f\u3001\u307e\u305f\u306f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u5358\u8a9e\u30ea\u30b9\u30c8\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002 \u5fc5\u8981\u306a\u5834\u5408\u306f PyCharm \u3067\u5358\u8a9e\u30ea\u30b9\u30c8\u3092\u624b\u52d5\u3067\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/create_word_list.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<ol>\n<li><strong>Project<\/strong>\uff08\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001<strong>\u2318N<\/strong> \/ <strong>Ctrl+N<\/strong> \u3092\u62bc\u3057\u307e\u3059\u3002<\/li>\n<li><strong>File<\/strong>\uff08\u30d5\u30a1\u30a4\u30eb\uff09\u3092\u9078\u629e\u3057\u3001<kbd>obj_nouns.txt<\/kbd> \u306a\u3069\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>PyCharm \u304c\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3001\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u958b\u304d\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u69cb\u9020\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352063\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/project_structure.png\" alt=\"\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u69cb\u9020\" width=\"411\" height=\"280\" \/><\/figure>\n<\/div>\n<p>\u307e\u305a\u3001\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u5358\u8a9e\u3092\u8aad\u307f\u53d6\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <code>print(\"Hello World\")<\/code> \u3092\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306b\u7f6e\u304d\u63db\u3048\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sub_nouns = read_words('sub_nouns.txt')<\/pre>\n<p>\u3053\u3053\u3067\u3082 <code>read_words<\/code> \u306b\u8d64\u3044\u6ce2\u7dda\u304c\u4ed8\u3044\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u95a2\u6570\u3092\u4f5c\u6210\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002 \u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092 <code>read_words<\/code> \u306b\u5408\u308f\u305b\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306b\u8a18\u8f09\u3055\u308c\u305f <strong>Create function \u2018read_words\u2019<\/strong>\uff08\u95a2\u6570 \u2018read_words\u2019 \u306e\u4f5c\u6210\uff09\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352114\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/create_function_quickfix.png\" alt=\"read_words \u95a2\u6570\u306e\u4f5c\u6210\" width=\"851\" height=\"274\" \/><\/figure>\n<\/div>\n<p>PyCharm \u304c\u95a2\u6570\u30b9\u30bf\u30d6\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 \u95a2\u6570\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b <code>file_name<\/code> \u3092\u6307\u5b9a\u3057\u3001<strong>Tab<\/strong> \u3092\u62bc\u3057\u3066\u95a2\u6570\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u59cb\u3081\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352136\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/read_words_stub.gif\" alt=\"\u95a2\u6570\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u6307\u5b9a\" width=\"516\" height=\"269\" \/><\/figure>\n<\/div>\n<p>\u30cf\u30a4\u30e9\u30a4\u30c8\u3055\u308c\u305f\u30b3\u30fc\u30c9\u3092\u95a2\u6570\u306e\u672c\u4f53\u306b\u30b3\u30d4\u30fc\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"2-4\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def read_words(file_name):\n    with open(file_name, 'r') as f:\n        words = f.readlines()\n    return words<\/pre>\n<p>\u3053\u306e\u95a2\u6570\u306f\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u3057\u3066\u6307\u5b9a\u3055\u308c\u305f\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304d\u307e\u3059\u3002 \u6b21\u306b\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u884c\u3092\u8981\u7d20\u3068\u3057\u3066\u542b\u3080 Python \u306e\u30ea\u30b9\u30c8\u3092\u8fd4\u3059 <code>readlines()<\/code> \u30e1\u30bd\u30c3\u30c9\u3092\u9069\u7528\u3057\u307e\u3059\u3002 \u3053\u306e\u30ea\u30b9\u30c8\u306f <code>words<\/code> \u5909\u6570\u306b\u683c\u7d0d\u3055\u308c\u3001\u95a2\u6570\u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><code>main()<\/code> \u95a2\u6570\u306b\u623b\u308a\u3001\u65b0\u305f\u306b\u4f5c\u6210\u3057\u305f <code>read_words<\/code> \u95a2\u6570\u3092\u4f7f\u3063\u3066\u4ed6\u306e 3 \u3064\u306e\u5358\u8a9e\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u53d6\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"3-5\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main():\n    sub_nouns = read_words('sub_nouns.txt')\n    verbs = read_words('verbs.txt')\n    adjectives = read_words('adjectives.txt')\n    obj_nouns = read_words('obj_nouns.txt')<\/pre>\n<p>\u6b21\u306b\u3001\u5358\u8a9e\u30ea\u30b9\u30c8\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3066 <code>word_bank<\/code> \u3068\u540d\u4ed8\u3051\u307e\u3059\u3002 \u3053\u306e\u30ea\u30b9\u30c8\u306f\u3001\u5f8c\u3067\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306b\u4f7f\u3046\u30e9\u30f3\u30c0\u30e0\u306a\u5358\u8a9e\u3092\u53d6\u5f97\u3059\u308b\u969b\u306b\u53cd\u5fa9\u51e6\u7406\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    word_bank = [sub_nouns, verbs, adjectives, obj_nouns]<\/pre>\n<p>\u9078\u3073\u51fa\u3055\u308c\u305f\u30e9\u30f3\u30c0\u30e0\u306a\u5358\u8a9e\u3092\u3055\u3089\u306b\u5225\u306e\u30ea\u30b9\u30c8\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002 \u3053\u306e\u30ea\u30b9\u30c8\u3092 <code>phrase_words<\/code> \u3068\u540d\u4ed8\u3051\u3066\u521d\u671f\u5316\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    phrase_words = []<\/pre>\n<p>\u6b21\u306e <code>for<\/code> \u30b5\u30a4\u30af\u30eb\u3067\u3001<code>word_bank<\/code> \u306e\u9805\u76ee\u3092\u53cd\u5fa9\u51e6\u7406\u3057\u307e\u3059\u3002 <code>word_bank<\/code> \u306e\u5404\u9805\u76ee\u306f\u5358\u8a9e\u3092\u542b\u3080\u30ea\u30b9\u30c8\u3067\u3059\u3002 \u7d44\u307f\u8fbc\u307f\u306e <code>random<\/code> \u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u3089 <code>SystemRandom()<\/code> \u30af\u30e9\u30b9\u306e <code>choice()<\/code> \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3001\u305d\u306e\u30ea\u30b9\u30c8\u304b\u3089\u30e9\u30f3\u30c0\u30e0\u306a\u5358\u8a9e\u3092 1 \u3064\u9078\u3073\u51fa\u3057\u307e\u3059\u3002 \u6b21\u306b\u3001\u305d\u306e\u5358\u8a9e\u3092 <code>phrase_words<\/code> \u306b\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    for word_list in word_bank:\n        random_word = random.SystemRandom().choice(word_list)\n        phrase_words.append(random_word)<\/pre>\n<p><code>random<\/code> \u306f\u7d44\u307f\u8fbc\u307f\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u3067\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u306b\u95a2\u3057\u3066\u306f\u3001\u3053\u308c\u307e\u3067\u3068\u540c\u69d8\u306b\u30a8\u30c7\u30a3\u30bf\u30fc\u5185\u306b\u8868\u793a\u3055\u308c\u308b\u8d64\u3044\u6ce2\u7dda\u3067\u5224\u65ad\u3067\u304d\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002 \u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u5408\u308f\u305b\u3001<strong>Import this name<\/strong>\uff08\u3053\u306e\u540d\u524d\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001<code>join<\/code> \u3092\u4f7f\u7528\u3057\u3066\u30e9\u30f3\u30c0\u30e0\u306b\u9078\u3073\u51fa\u3055\u308c\u305f\u5358\u8a9e\u306e\u30ea\u30b9\u30c8\u3092\u30d5\u30ec\u30fc\u30ba\u306b\u5909\u63db\u3057\u3001\u305d\u306e\u7d50\u679c\u3092\u51fa\u529b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    passphrase = ''.join(phrase_words)\n    print(passphrase)<\/pre>\n<p>\u3053\u306e\u6bb5\u968e\u3067\u306f\u3001<code>main()<\/code> \u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main():\n    sub_nouns = read_words('sub_nouns.txt')\n    verbs = read_words('verbs.txt')\n    adjectives = read_words('adjectives.txt')\n    obj_nouns = read_words('obj_nouns.txt')\n    word_bank = [sub_nouns, verbs, adjectives, obj_nouns]\n    phrase_words = []\n    for word_list in word_bank:\n        random_word = random.SystemRandom().choice(word_list)\n        phrase_words.append(random_word)\n    passphrase = ''.join(phrase_words)\n    print(passphrase)<\/pre>\n<p>\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3001\u6b63\u3057\u304f\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002 \u30ac\u30bf\u30fc\u306e <strong>Run<\/strong>\uff08\u5b9f\u884c\uff09\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001<strong>Run \u2018main\u2019<\/strong>\uff08\u2018main\u2019 \u306e\u5b9f\u884c\uff09\u3092\u9078\u629e\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352153\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/first_run_no_success.png\" alt=\"\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u521d\u56de\u5b9f\u884c\" width=\"541\" height=\"245\" \/><\/figure>\n<\/div>\n<p>4 \u3064\u306e\u5358\u8a9e\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u660e\u3089\u304b\u306b\u30d5\u30ec\u30fc\u30ba\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 \u30b3\u30fc\u30c9\u304c\u5927\u307e\u304b\u306b\u52d5\u3044\u3066\u3044\u308b\u306e\u306b\u4e88\u671f\u3057\u306a\u3044\u7d50\u679c\u306b\u306a\u308b\u306a\u3089\u3001\u30c7\u30d0\u30c3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u73fe\u5728\u306e\u51fa\u529b\u304b\u3089\u308f\u304b\u308b\u3088\u3046\u306b\u3001\u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u5358\u8a9e\u30ea\u30b9\u30c8\u304b\u3089\u30e9\u30f3\u30c0\u30e0\u306b\u5358\u8a9e\u3092\u9078\u3073\u51fa\u305b\u3066\u3044\u307e\u3059\u3002 \u3046\u307e\u304f\u3044\u3063\u3066\u3044\u306a\u3044\u306e\u306f\u3001\u5358\u8a9e\u3092 1 \u3064\u306e\u30d5\u30ec\u30fc\u30ba\u306b\u7d44\u307f\u5408\u308f\u305b\u308b\u90e8\u5206\u3067\u3059\u3002 <code>main()<\/code> \u306e\u4e0b\u304b\u3089 2 \u884c\u76ee\u304c\u602a\u3057\u305d\u3046\u3067\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"3\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main():\n    ...\n    passphrase = ''.join(phrase_words)\n    print(passphrase)<\/pre>\n<p>\u30b3\u30fc\u30c9\u306e\u7279\u5b9a\u306e\u884c\u304c\u751f\u6210\u3059\u308b\u7d50\u679c\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u3001\u305d\u306e\u884c\u306b\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u7f6e\u304d\u307e\u3057\u3087\u3046\u3002 \u30c7\u30d0\u30c3\u30ac\u30fc\u306f\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u306e\u3042\u308b\u884c\u3092\u5b9f\u884c\u3059\u308b\u76f4\u524d\u306b\u505c\u6b62\u3057\u307e\u3059\u3002 \u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u3001\u78ba\u8a8d\u3057\u305f\u3044\u884c\u306e\u6a2a\u306e\u30ac\u30bf\u30fc\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352459\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/set_breakpoint-2.gif\" alt=\"\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u306e\u8a2d\u5b9a\" width=\"637\" height=\"249\" \/><\/figure>\n<\/div>\n<p>\u30c7\u30d0\u30c3\u30b0\u30d7\u30ed\u30bb\u30b9\u3092\u958b\u59cb\u3059\u308b\u306b\u306f\u3001\u524d\u306b\u884c\u3063\u305f\u3088\u3046\u306b\u30ac\u30bf\u30fc\u306e <strong>Run<\/strong>\uff08\u5b9f\u884c\uff09\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306e <strong>Debug \u2018main\u2019<\/strong>\uff08\u2018main\u2019 \u306e\u30c7\u30d0\u30c3\u30b0\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u30c7\u30d0\u30c3\u30ac\u30fc\u304c\u8d77\u52d5\u3057\u3066\u30d6\u30ec\u30fc\u30af\u30dd\u30a4\u30f3\u30c8\u3067\u5b9f\u884c\u304c\u505c\u6b62\u3059\u308b\u3068\u3001<strong>Debug<\/strong>\uff08\u30c7\u30d0\u30c3\u30b0\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u4e0b\u306b\u958b\u304d\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352186\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/breakpoint_hit.png\" alt=\"\u30c7\u30d0\u30c3\u30ac\u30fc\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\" width=\"1866\" height=\"1220\" \/><\/figure>\n<\/div>\n<p><strong>Debug<\/strong>\uff08\u30c7\u30d0\u30c3\u30b0\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u53f3\u5074\u306e\u30da\u30a4\u30f3\u3067\u306f\u3001\u305d\u306e\u6642\u70b9\u307e\u3067\u306b\u4ee3\u5165\u3055\u308c\u305f\u5909\u6570\u3092\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002 <strong>phrase_words<\/strong> \u3092\u5c55\u958b\u3057\u3066\u4e2d\u8eab\u3092\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352208\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/phrase_words.png\" alt=\"phrase_words \u5909\u6570\u306e\u8abf\u67fb\" width=\"562\" height=\"128\" \/><\/figure>\n<\/div>\n<p>\u30ea\u30b9\u30c8\u306b\u306f <code>str<\/code> \u578b\u306e\u9805\u76ee\u304c 4 \u500b\u3042\u308a\u307e\u3059\u3002 \u5404\u6587\u5b57\u5217\u306f\u6539\u884c\uff08\u2018\\n\u2019\uff09\u3067\u7d42\u4e86\u3057\u3066\u3044\u307e\u3059\u3002 \u5f8c\u3067\u3053\u308c\u3089\u306e\u6587\u5b57\u5217\u3092\u7d50\u5408\u3057\u3066\u51fa\u529b\u3059\u308b\u969b\u3001\u5404\u5358\u8a9e\u304c\u500b\u5225\u306e\u884c\u306b\u51fa\u529b\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u306f\u3053\u308c\u304c\u539f\u56e0\u3067\u3059\u3002<\/p>\n<p><strong>adjectives<\/strong> \u306a\u3069\u306e\u4ed6\u306e\u30ea\u30b9\u30c8\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u305d\u3053\u3067\u3082\u3059\u3079\u3066\u306e\u9805\u76ee\u304c \u2018\\n\u2019 \u3067\u7d42\u4e86\u3057\u3066\u3044\u308b\u306e\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u3053\u308c\u3089\u306e\u30ea\u30b9\u30c8\u306f <code>read_words<\/code> \u95a2\u6570\u304b\u3089\u53d6\u5f97\u3057\u3066\u3044\u307e\u3059\u3002 \u305d\u306e\u305f\u3081\u3001\u672b\u5c3e\u306e \u2018\\n\u2019 \u3092\u4ed8\u3051\u305a\u306b\u5358\u8a9e\u306e\u30ea\u30b9\u30c8\u3092\u8fd4\u3059\u3088\u3046\u306b\u305d\u306e\u95a2\u6570\u3092\u4fee\u6b63\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><code>strip()<\/code> \u3068\u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ea\u30b9\u30c8\u306e\u5404\u9805\u76ee\u3092\u8fd4\u3059\u524d\u306b \u2018\\n\u2019 \u3092\u53d6\u308a\u9664\u304f\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"4\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def read_words(file_name):\n    with open(file_name, 'r') as f:\n        words = f.readlines()\n        words = [word.strip() for word in words]\n    return words<\/pre>\n<p><code>main()<\/code> \u306b\u623b\u308a\u3001\u7d50\u679c\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352219\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/fixed_newlines.png\" alt=\"\u4fee\u6b63\u5f8c\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\" width=\"544\" height=\"187\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">\u3088\u308a\u512a\u308c\u305f\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u4f5c\u6210\u3059\u308b<\/h2>\n<h3 class=\"wp-block-heading\">\u8a18\u61b6\u3057\u3084\u3059\u304f\u3059\u308b<\/h3>\n<p>\u304a\u6c17\u3065\u304d\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u524d\u306e\u30b9\u30c6\u30c3\u30d7\u3067\u751f\u6210\u3055\u308c\u305f\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306b\u306f\u82e5\u5e72\u306e\u8aad\u307f\u306b\u304f\u3055\u304c\u3042\u308a\u307e\u3059\u3002 \u5404\u5358\u8a9e\u306e\u5148\u982d\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u3057\u3066\u3001\u53ef\u8aad\u6027\u3092\u6539\u5584\u3057\u3066\u307f\u3066\u306f\u3069\u3046\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u3053\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u5358\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u53d6\u5f97\u3057\u305f\u304f\u306a\u3044\u305f\u3081\u3001Typer \u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002 \u3053\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u3055\u307e\u3056\u307e\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6e21\u3057\u3066\u751f\u6210\u3055\u308c\u308b\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5236\u5fa1\u3067\u304d\u308b\u3088\u3046\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u306e\u3088\u3046\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u306e 1 \u3064\u304c\u5358\u8a9e\u306e\u5148\u982d\u6587\u5b57\u306e\u5927\u6587\u5b57\u5316\u3067\u3059\u3002<\/p>\n<p><strong>main.py<\/strong> \u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u6b21\u306e\u884c\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"3\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">...\nif __name__ == \"__main__\":\n    typer.run(main)<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<code>typer<\/code> \u3092\u4f7f\u7528\u3057\u3066 <code>main<\/code> \u95a2\u6570\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002 \u3053\u306e\u3088\u3046\u306b\u3057\u3066\u3044\u308b\u306e\u306f\u3001Typer \u304c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u5f15\u6570\u3092\u53d7\u3051\u5165\u308c\u3001\u305d\u308c\u3092\u95a2\u6570\u306b\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3068\u3057\u3066\u6e21\u305b\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p><code>main()<\/code> \u95a2\u6570\u306b <code>capitalize<\/code> \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u5c0e\u5165\u3057\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067 <code>False<\/code> \u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"1\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(capitalize = False):\n    sub_nouns = read_words('sub_nouns.txt')\n    ...\n    passphrase = ''.join(phrase_words)\n    print(passphrase)<\/pre>\n<p>Python \u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u3088\u308b\u3068\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u578b\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 <code>capitalize<\/code> \u306b\u30ad\u30e3\u30ec\u30c3\u30c8\u3092\u7f6e\u304d\u3001<strong>\u2325Enter<\/strong>\/ <strong>Alt+Enter<\/strong> \u3092\u62bc\u3057\u307e\u3059\u3002 \u305d\u3057\u3066\u3001<strong>Specify type for the reference using annotation<\/strong>\uff08\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u53c2\u7167\u3059\u308b\u578b\u3092\u6307\u5b9a\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002 <code>capitalize<\/code> \u306b\u306f\u30d6\u30fc\u30eb\u5024\u304c\u5fc5\u8981\u3067\u3042\u308b\u305f\u3081\u3001<kbd>bool<\/kbd> \u3068\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/specify_parameter_type-1.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p>\u3067\u306f\u3001<code>capitalize<\/code> \u304c <code>True<\/code> \u306e\u5834\u5408\u306b\u3001\u5358\u8a9e\u3092\u7d50\u5408\u3059\u308b\u524d\u306b\u5148\u982d\u6587\u5b57\u3092\u5927\u6587\u5b57\u306b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002 <code>if capitalize:<\/code> \u3092\u4f7f\u7528\u3059\u308b if \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u304b\u3089\u59cb\u3081\u307e\u3059\u3002 <code>read_words<\/code> \u95a2\u6570\u3092\u4fee\u6b63\u3057\u305f\u6642\u3068\u540c\u3058\u3088\u3046\u306a\u65b9\u6cd5\u3067\u884c\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18\u3092\u624b\u52d5\u3067\u66f8\u304b\u305a\u306b\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 <code><kbd>compl<\/kbd><\/code> \u3068\u5165\u529b\u3057\u3066 <strong>Enter<\/strong> \u3092\u62bc\u3057\u307e\u3059\u3002 \u6b21\u306b\u3001\u30ea\u30b9\u30c8\u5185\u5305\u8868\u8a18\u306e\u3059\u3079\u3066\u306e\u8981\u7d20\u3092\u6307\u5b9a\u3057\u3001<strong>Tab<\/strong> \u3092\u62bc\u3057\u3066\u6b21\u306e\u8981\u7d20\u306b\u79fb\u52d5\u3057\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/use_compl-1.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"1,11,12\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(capitalize: bool = False):\n    sub_nouns = read_words('sub_nouns.txt')\n    verbs = read_words('verbs.txt')\n    adjectives = read_words('adjectives.txt')\n    obj_nouns = read_words('obj_nouns.txt')\n    word_bank = [sub_nouns, verbs, adjectives, obj_nouns]\n    phrase_words = []\n    for word_list in word_bank:\n        random_word = random.SystemRandom().choice(word_list)\n        phrase_words.append(random_word)\n    if capitalize:\n        phrase_words = [phrase_word.capitalize() for phrase_word in phrase_words]\n    passphrase = ''.join(phrase_words)\n    print(passphrase)<\/pre>\n<p>\u5148\u982d\u6587\u5b57\u306e\u5927\u6587\u5b57\u5316\u3092\u6b63\u3057\u304f\u52d5\u4f5c\u3055\u305b\u308b\u305f\u3081\u3001<strong>main.py<\/strong> \u3092\u5b9f\u884c\u3059\u308b\u969b\u306b <code>capitalize<\/code> \u3092\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 \u3053\u308c\u3092\u884c\u3046\u305f\u3081\u3001\u5b9f\u884c\u69cb\u6210\u3092\u7de8\u96c6\u3057\u307e\u3057\u3087\u3046\u3002 IDE \u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4e0a\u90e8\u306b\u3042\u308b <strong>Run<\/strong>\uff08\u5b9f\u884c\uff09\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u898b\u3064\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352275\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/run_widget.png\" alt=\"PyCharm \u306e\u5b9f\u884c\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\" width=\"1866\" height=\"1220\" \/><\/figure>\n<\/div>\n<p>\u3053\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306f\u3001\u5e0c\u671b\u3059\u308b\u5b9f\u884c\u69cb\u6210\u306e\u9078\u629e\u3068\u3001\u5b9f\u884c\u307e\u305f\u306f\u30c7\u30d0\u30c3\u30b0\u30e2\u30fc\u30c9\u3067\u306e\u8d77\u52d5\u3092\u9078\u629e\u3059\u308b\u306e\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002 PyCharm \u3067\u306f\u30ac\u30bf\u30fc\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8d77\u52d5\u3057\u305f\u6642\u70b9\u3067\u3059\u3067\u306b <strong>main<\/strong> \u69cb\u6210\u304c\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u305d\u306e\u69cb\u6210\u306e\u540d\u524d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30e1\u30cb\u30e5\u30fc\u3092\u958b\u304d\u3001<strong>Edit configurations<\/strong>\uff08\u69cb\u6210\u306e\u7de8\u96c6\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352286\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/edit_configs.png\" alt=\"\u5b9f\u884c\/\u30c7\u30d0\u30c3\u30b0\u69cb\u6210\u306e\u7de8\u96c6\" width=\"291\" height=\"207\" \/><\/figure>\n<\/div>\n<p>\u958b\u3044\u305f\u30c0\u30a4\u30a2\u30ed\u30b0\u3067\u3001<strong>Parameters<\/strong>\uff08\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\uff09\u30d5\u30a3\u30fc\u30eb\u30c9\u306b <kbd>--capitalize<\/kbd> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352297\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/add_parameter_to_config.png\" alt=\"\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u69cb\u6210\u306b\u8ffd\u52a0\" width=\"2080\" height=\"1352\" \/><\/figure>\n<\/div>\n<p><strong>OK<\/strong> \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u66f4\u65b0\u3055\u308c\u305f\u69cb\u6210\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002 \u6b21\u306b\u3001\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u5b9f\u884c\u30a2\u30a4\u30b3\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/p>\n<p>\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352308\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/capitalize_success.png\" alt=\"\u2018capitalize\u2019 \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3080\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\" width=\"544\" height=\"234\" \/><\/figure>\n<\/div>\n<p>\u53ef\u8aad\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u3001\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306e\u5358\u8a9e\u3092\u533a\u5207\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u7279\u6b8a\u6587\u5b57\u3092\u533a\u5207\u308a\u6587\u5b57\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3068\u3001\u7279\u5b9a\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8907\u96d1\u3055\u8981\u4ef6\u306b\u5408\u3063\u305f\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u751f\u6210\u3067\u304d\u308b\u305f\u3081\u30012 \u3064\u306e\u76ee\u7684\u3092\u9054\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><code>main()<\/code> \u95a2\u6570\u306e\u4e0b\u304b\u3089 2 \u884c\u76ee\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"3\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(capitalize: bool = False):\n    ...\n    passphrase = separator.join(phrase_words)<\/pre>\n<p>\u3053\u306e\u95a2\u6570\u306b\u306f <code>separator<\/code> \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u307e\u3060\u5b58\u5728\u3057\u306a\u3044\u305f\u3081\u3001PyCharm \u306f\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u8d64\u3044\u6ce2\u7dda\u3067\u30cf\u30a4\u30e9\u30a4\u30c8\u3057\u307e\u3059\u3002 \u305d\u306e\u6ce2\u7dda\u306b\u30de\u30a6\u30b9\u30dd\u30a4\u30f3\u30bf\u30fc\u3092\u5408\u308f\u305b\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u306e <strong>Create parameter \u2018separator\u2019<\/strong>\uff08\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc \u2018separator\u2019 \u306e\u4f5c\u6210\uff09\u3092\u9078\u629e\u3057\u307e\u3059\u3002 \u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u533a\u5207\u308a\u6587\u5b57\u3092\u8ffd\u52a0\u3057\u306a\u3044\u305f\u3081\u3001<kbd>\u2018\u2019<\/kbd> \u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/separator_parameter-1.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p>\u307e\u305f\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u578b\u306b <code>str<\/code> \u3092\u6307\u5b9a\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"1,3\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(capitalize: bool = False, separator: str = ''):\n    ...\n    passphrase = separator.join(phrase_words)\n    print(passphrase)<\/pre>\n<p>\u3055\u3042\u3001\u7d50\u679c\u3092\u78ba\u8a8d\u3057\u305f\u304f\u306a\u3063\u305f\u306f\u305a\u3067\u3059\u3002 \u305d\u306e\u524d\u306b\u5b9f\u884c\u69cb\u6210\u3092\u66f4\u65b0\u3059\u308b\u3053\u3068\u3092\u5fd8\u308c\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002 Run\uff08\u5b9f\u884c\uff09\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001<strong>Edit configurations<\/strong>\uff08\u69cb\u6210\u306e\u7de8\u96c6\uff09\u3092\u9078\u629e\u3057\u3066\u3001<strong>Parameters<\/strong>\uff08\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\uff09\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u65b0\u3057\u3044\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352341\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/separator_in_config.png\" alt=\"\u5225\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u5b9f\u884c\u69cb\u6210\u306b\u8ffd\u52a0\" width=\"2080\" height=\"1352\" \/><\/figure>\n<\/div>\n<p>\u69cb\u6210\u3092\u5b9f\u884c\u3057\u3066\u7d50\u679c\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352352\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/separator_result.png\" alt=\"\u2018separator\u2019 \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3080\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\" width=\"543\" height=\"186\" \/><\/figure>\n<\/div>\n<p>\u7279\u6b8a\u6587\u5b57\u3068\u6570\u5b57\u3067\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306e\u5358\u8a9e\u304c\u533a\u5207\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u3055\u3089\u306b\u3001\u201c#4\u201d \u3084 \u201c%7\u201d \u306a\u3069\u306e\u8907\u6570\u306e\u8a18\u53f7\u3092\u4f7f\u7528\u3057\u3001\u3055\u307e\u3056\u307e\u306a\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u304c\u6307\u5b9a\u3059\u308b\u30d1\u30b9\u30ef\u30fc\u30c9\u8981\u4ef6\u3082\u6e80\u305f\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3 class=\"wp-block-heading\">\u3055\u3089\u306b\u89e3\u8aad\u3057\u306b\u304f\u304f\u3059\u308b<\/h3>\n<p>\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u304c\u9577\u3044\u307b\u3069\u3001\u30d6\u30eb\u30fc\u30c8\u30d5\u30a9\u30fc\u30b9\u653b\u6483\u3092\u6210\u529f\u3055\u305b\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u8a66\u884c\u56de\u6570\u3082\u5897\u3048\u307e\u3059\u3002 \u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306b\u5358\u8a9e\u3092\u3082\u3046 1 \u3064\u542b\u3081\u3089\u308c\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u306f\u526f\u8a5e\u3092\u542b\u3080 5 \u756a\u76ee\u306e\u5358\u8a9e\u30ea\u30b9\u30c8\u3092\u6e96\u5099\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3057\u307e\u3059\u3002 <code>main()<\/code> \u95a2\u6570\u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306b\u30d6\u30fc\u30eb\u578b\u306e <code>long<\/code> \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\u304b\u3064\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f <code>False<\/code>\uff09\u306b\u5fdc\u3058\u3066 <code>word_bank<\/code> \u306b\u5358\u8a9e\u30ea\u30b9\u30c8\u304c\u3082\u3046 1 \u3064\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"1,4-6\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(capitalize: bool = False, separator: str = '', long: bool = False):\n    ...\n    word_bank = [sub_nouns, verbs, adjectives, obj_nouns]\n    if long:\n        adverbs = read_words('adverbs.txt')\n        word_bank.append(adverbs)\n\t...<\/pre>\n<p>\u4eca\u56de\u306f\u7d44\u307f\u8fbc\u307f\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u4f7f\u3063\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002 <strong>\u2325F12<\/strong>\/<strong> Alt+F12<\/strong> \u3092\u62bc\u3057\u3066\u958b\u3044\u305f <strong>Terminal<\/strong>\uff08\u30bf\u30fc\u30df\u30ca\u30eb\uff09\u30c4\u30fc\u30eb\u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python main.py --capitalize --separator \"1_\" --long<\/pre>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352363\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/long_result.png\" alt=\"\u2018long\u2019 \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u542b\u3080\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\" width=\"1778\" height=\"346\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\">\u3088\u308a\u5b9f\u7528\u7684\u306a\u30c4\u30fc\u30eb\u306b\u3059\u308b\u305f\u3081\u306e\u5909\u66f4<\/h2>\n<h3 class=\"wp-block-heading\">\u77ed\u3044\u30aa\u30d7\u30b7\u30e7\u30f3\u540d\u3092\u5b9a\u7fa9\u3059\u308b<\/h3>\n<p>CLI \u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u305f\u7d4c\u9a13\u306e\u3042\u308b\u65b9\u306f\u3001\u901a\u5e38\u306f 1 \u6587\u5b57\u3060\u3051\u3067\u5f15\u6570\u3092\u6307\u5b9a\u3067\u304d\u308b\u3053\u3068\u3092\u3054\u5b58\u77e5\u3067\u3057\u3087\u3046\u3002 \u3053\u306e\u30c4\u30fc\u30eb\u306b\u3082\u305d\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u307e\u3057\u3087\u3046\u3002 \u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u3092\u9ad8\u3081\u308b\u305f\u3081\u3001\u95a2\u6570\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u3092\u6574\u5f62\u3057\u3066\u5404\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u5225\u3005\u306e\u884c\u306b\u5206\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(\n    capitalize: bool = False,\n    separator: str = '',\n    long: bool = False\n):\n...<\/pre>\n<p>\u6b21\u306b\u3001\u5404\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u5024\u3092 <code>typer.Option(, , )<\/code> \u306b\u7f6e\u304d\u63db\u3048\u307e\u3059\u3002<\/p>\n<figure class=\"wp-block-video aligncenter\"><video src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/typer_option-1.mp4\" controls=\"controls\" width=\"300\" height=\"150\"><\/video><\/figure>\n<p><code>main()<\/code> \u306e\u30b7\u30b0\u30cd\u30c1\u30e3\u30fc\u306f\u6700\u7d42\u7684\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(\n    capitalize: bool = typer.Option(False, '--caps', '-c'),\n    separator: str = typer.Option('', '--separator', '-s'),\n    long: bool = typer.Option(False, '--long', '-l')\n):\n...<\/pre>\n<p>\u3059\u3079\u3066\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u307e\u3068\u3081\u3066\u6307\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002 \u533a\u5207\u308a\u6587\u5b57\uff08\u2018-s\u2019\uff09\u306f\u5f8c\u306b\u6587\u5b57\u5217\u3092\u66f8\u304f\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u6700\u5f8c\u306b\u914d\u7f6e\u3059\u3079\u304d\u3067\u3059\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352396\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/short_options.png\" alt=\"\u3059\u3079\u3066\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3080\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\" width=\"1330\" height=\"334\" \/><\/figure>\n<\/div>\n<h3 class=\"wp-block-heading\">\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u66f8\u304f<\/h3>\n<p>Typer \u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067 <kbd>--help<\/kbd> \u30aa\u30d7\u30b7\u30e7\u30f3\u3082\u8ffd\u52a0\u3057\u307e\u3059\u3002 \u73fe\u6642\u70b9\u3067\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352407\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/help_option.png\" alt=\"\u2018--help\u2019 \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u542b\u3080\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\" width=\"1296\" height=\"486\" \/><\/figure>\n<\/div>\n<p>\u3069\u3093\u306a\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u304c\u5b58\u5728\u3057\u3001\u305d\u306e\u6b63\u5f0f\u306a\u540d\u524d\u3068\u77ed\u3044\u5f62\u5f0f\u306e\u540d\u524d\u304c\u4f55\u3067\u3042\u308b\u304b\u304c\u308f\u304b\u308a\u307e\u3059\u3002 \u5b9f\u969b\u306e\u52d5\u4f5c\u3092\u8aac\u660e\u3059\u308b\u30b3\u30e1\u30f3\u30c8\u3092\u8ffd\u52a0\u3057\u3066\u306f\u3069\u3046\u3067\u3057\u3087\u3046\u304b\uff1f \u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001<code>main()<\/code> \u306e\u5404\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b <code>help<\/code> \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def main(\n    capitalize: bool = typer.Option(False, '--caps', '-c', help='Capitalize each word.'),\n    separator: str = typer.Option('', '--separator', '-s', help='Separate words with the given symbol.'),\n    long: bool = typer.Option(False, '--long', '-l', help='Make the passphrase longer by including an adverb.')\n):\n...<\/pre>\n<p><kbd>--help<\/kbd> \u304c\u3088\u308a\u6709\u7528\u306a\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-352419\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2023\/05\/more_help.png\" alt=\"\u30b9\u30af\u30ea\u30d7\u30c8\u306e help \u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u8868\u793a\" width=\"1390\" height=\"484\" \/><\/figure>\n<\/div>\n<p>PyCharm \u3092\u4f7f\u308f\u305a\u306b\u30b7\u30b9\u30c6\u30e0\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u306a\u3069\u3067\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u30b8\u30a7\u30cd\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 \u305d\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u30a4\u30f3\u30bf\u30fc\u30d7\u30ea\u30bf\u30fc\u306b Typer \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">python3 -m pip install --user typer<\/pre>\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n<p>\u3053\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u4ee5\u4e0b\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li>PyCharm Community Edition \u3067\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/li>\n<li>Python \u3068 Typer \u306b\u3088\u308b\u4f7f\u3044\u3084\u3059\u3044 CLI \u30c4\u30fc\u30eb\u306e\u4f5c\u6210<\/li>\n<li>\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3057\u306a\u304c\u3089\u3088\u308a\u8fc5\u901f\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u305f\u3081\u306e\u30af\u30a4\u30c3\u30af\u30d5\u30a3\u30c3\u30af\u30b9\u3068\u30e9\u30a4\u30d6\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u4f7f\u7528<\/li>\n<li>\u30b3\u30fc\u30c9\u306e\u30c7\u30d0\u30c3\u30b0<\/li>\n<li>\u5b9f\u884c\u69cb\u6210\u3068\u30bf\u30fc\u30df\u30ca\u30eb\u3092\u4f7f\u7528\u3057\u305f PyCharm \u3067\u306e\u30b3\u30fc\u30c9\u306e\u5b9f\u884c<\/li>\n<\/ul>\n<p><strong>\u30aa\u30ea\u30b8\u30ca\u30eb\uff08\u82f1\u8a9e\uff09\u30d6\u30ed\u30b0\u6295\u7a3f\u8a18\u4e8b\u306e\u4f5c\u8005\uff1a<\/strong><\/p>\n\n    <div class=\"about-author \">\n        <div class=\"about-author__box\">\n            <div class=\"row\">\n                <div class=\"about-author__box-img\">\n                    <img decoding=\"async\" src=\"https:\/\/secure.gravatar.com\/avatar\/?s=200&#038;r=g\" width=\"200\" height=\"200\" alt=\"\" loading=\"lazy\"  class=\"avatar avatar-200 wp-user-avatar wp-user-avatar-200 photo avatar-default\">\n                <\/div>\n                <div class=\"about-author__box-text\">\n                                                        <\/div>\n            <\/div>\n        <\/div>\n    <\/div>\n","protected":false},"author":1394,"featured_media":357890,"comment_status":"closed","ping_status":"closed","template":"","categories":[2347],"tags":[632,294,3422,792],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm\/357875"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/types\/pycharm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/users\/1394"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/comments?post=357875"}],"version-history":[{"count":7,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm\/357875\/revisions"}],"predecessor-version":[{"id":359400,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/pycharm\/357875\/revisions\/359400"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media\/357890"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/media?parent=357875"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/categories?post=357875"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/tags?post=357875"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/ja\/wp-json\/wp\/v2\/cross-post-tag?post=357875"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}