{"id":934,"date":"2023-10-02T14:36:46","date_gmt":"2022-07-01T01:16:22","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/"},"modified":"2025-08-01T03:39:30","modified_gmt":"2025-07-31T18:39:30","slug":"python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/","title":{"rendered":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b"},"content":{"rendered":"<p>\u7686\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f\uff01\u524d\u56de\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python\u306eunittest\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066\u8a71\u3057\u307e\u3057\u305f\u3002\u4eca\u65e5\u306f\u3001Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4f8b\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002Python\u306e\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<h2>Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0<\/h2>\n<p>Python\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u7406\u89e3\u3059\u308b\u305f\u3081\u306b\u306f\u3001Socket Server\u3001Socket Client\u3001Socket\u3068\u3044\u30463\u3064\u306e\u8208\u5473\u6df1\u3044\u30c8\u30d4\u30c3\u30af\u306b\u3064\u3044\u3066\u77e5\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3067\u306f\u3001\u30b5\u30fc\u30d0\u306f\u4f55\u3067\u3057\u3087\u3046\u304b\uff1f\u30b5\u30fc\u30d0\u306f\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5f85\u3061\u3001\u305d\u308c\u306b\u5fdc\u3058\u3066\u51e6\u7406\u307e\u305f\u306f\u63d0\u4f9b\u3059\u308b\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u3059\u3002\u4e00\u65b9\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u8981\u6c42\u8005\u3067\u3059\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30b5\u30fc\u30d0\u306b\u30ea\u30bd\u30fc\u30b9\u3092\u8981\u6c42\u3057\u3001\u30b5\u30fc\u30d0\u306f\u305d\u306e\u8981\u6c42\u306b\u5fdc\u7b54\u3057\u307e\u3059\u3002Socket\u306f\u3001\u30b5\u30fc\u30d0\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u9593\u306e\u53cc\u65b9\u5411\u901a\u4fe1\u30c1\u30e3\u30cd\u30eb\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002Socket\u306f\u3001\u30d7\u30ed\u30bb\u30b9\u5185\u3001\u540c\u3058\u30de\u30b7\u30f3\u4e0a\u306e\u30d7\u30ed\u30bb\u30b9\u9593\u3001\u307e\u305f\u306f\u7570\u306a\u308b\u30de\u30b7\u30f3\u4e0a\u306e\u30d7\u30ed\u30bb\u30b9\u9593\u3067\u901a\u4fe1\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30ea\u30e2\u30fc\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u306e\u901a\u4fe1\u306b\u306f\u3001\u30bd\u30b1\u30c3\u30c8\u30dd\u30fc\u30c8\u3092\u4ecb\u3057\u3066\u63a5\u7d9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u4e3b\u306a\u76ee\u7684\u306f\u3001\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304c\u4e92\u3044\u306b\u901a\u4fe1\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u307e\u305f\u3001Python\u306e\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u66f8\u304d\u65b9\u3082\u5b66\u3073\u307e\u3059\u3002<\/p>\n<h3>Python\u306e\u30bd\u30b1\u30c3\u30c8\u306e\u4f8b<\/h3>\n<p>\u4ee5\u524d\u306b\u8ff0\u3079\u305f\u3088\u3046\u306b\u3001\u30bd\u30b1\u30c3\u30c8\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306f\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u306b\u5bfe\u3057\u3066\u30ea\u30bd\u30fc\u30b9\u306e\u8981\u6c42\u3092\u884c\u3044\u3001\u30b5\u30fc\u30d0\u30fc\u306f\u305d\u306e\u8981\u6c42\u306b\u5fdc\u7b54\u3059\u308b\u3068\u8ff0\u3079\u307e\u3057\u305f\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u79c1\u305f\u3061\u306f\u30b5\u30fc\u30d0\u30fc\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30e2\u30c7\u30eb\u3092\u8a2d\u8a08\u3057\u3001\u305d\u308c\u305e\u308c\u304c\u901a\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u8003\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u6700\u521d\u306bPython\u306e\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u5b9f\u884c\u3055\u308c\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5f85\u3061\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>Python\u306e\u30bd\u30b1\u30c3\u30c8\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u304c\u6700\u521d\u306b\u4f1a\u8a71\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u305d\u306e\u5f8c\u3001\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8981\u6c42\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u5fdc\u7b54\u3092\u8fd4\u3057\u307e\u3059\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u30e6\u30fc\u30b6\u30fc\u304c\u300c\u3055\u3088\u3046\u306a\u3089\u300d\u3068\u5165\u529b\u3057\u305f\u5834\u5408\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u7d42\u4e86\u3057\u307e\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u3082\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u7d42\u4e86\u6642\u306b\u7d42\u4e86\u3057\u307e\u3059\u304c\u3001\u3053\u308c\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3042\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7121\u671f\u9650\u306b\u5b9f\u884c\u3057\u305f\u308a\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8981\u6c42\u306b\u7279\u5b9a\u306e\u30b3\u30de\u30f3\u30c9\u3067\u7d42\u4e86\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/ol>\n<h3>Python\u306e\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc<\/h3>\n<p>Python\u306e\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u3092socket_server.py\u3068\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002Python\u306e\u30bd\u30b1\u30c3\u30c8\u63a5\u7d9a\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001socket\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u3057\u3066\u3001\u9806\u756a\u306b\u3044\u304f\u3064\u304b\u306e\u30bf\u30b9\u30af\u3092\u5b9f\u884c\u3057\u3066\u30b5\u30fc\u30d0\u30fc\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u9593\u306b\u63a5\u7d9a\u3092\u78ba\u7acb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002socket.gethostname()\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u30db\u30b9\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u30dd\u30fc\u30c8\u756a\u53f7\u306f\u30011024\u3088\u308a\u5927\u304d\u3044\u5024\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u306a\u305c\u306a\u3089\u30011024\u672a\u6e80\u306e\u30dd\u30fc\u30c8\u756a\u53f7\u306f\u6a19\u6e96\u306e\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30d7\u30ed\u30c8\u30b3\u30eb\u306e\u305f\u3081\u306b\u4e88\u7d04\u3055\u308c\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002\u4ee5\u4e0b\u306ePython\u306e\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u306e\u4f8b\u30b3\u30fc\u30c9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u30b3\u30e1\u30f3\u30c8\u304c\u30b3\u30fc\u30c9\u3092\u7406\u89e3\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>import socket\r\n\r\n\r\ndef server_program():\r\n    # get the hostname\r\n    host = socket.gethostname()\r\n    port = 5000  # initiate port no above 1024\r\n\r\n    server_socket = socket.socket()  # get instance\r\n    # look closely. The bind() function takes tuple as argument\r\n    server_socket.bind((host, port))  # bind host address and port together\r\n\r\n    # configure how many client the server can listen simultaneously\r\n    server_socket.listen(2)\r\n    conn, address = server_socket.accept()  # accept new connection\r\n    print(\"Connection from: \" + str(address))\r\n    while True:\r\n        # receive data stream. it won't accept data packet greater than 1024 bytes\r\n        data = conn.recv(1024).decode()\r\n        if not data:\r\n            # if data is not received break\r\n            break\r\n        print(\"from connected user: \" + str(data))\r\n        data = input(' -&gt; ')\r\n        conn.send(data.encode())  # send data to the client\r\n\r\n    conn.close()  # close the connection\r\n\r\n\r\nif __name__ == '__main__':\r\n    server_program()\r\n<\/code><\/pre>\n<p>\u79c1\u305f\u3061\u306ePython\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u306f\u30dd\u30fc\u30c85000\u3067\u5b9f\u884c\u3055\u308c\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8981\u6c42\u3092\u5f85\u3061\u307e\u3059\u3002\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u63a5\u7d9a\u304c\u9589\u3058\u3089\u308c\u305f\u3068\u304d\u306b\u30b5\u30fc\u30d0\u30fc\u304c\u7d42\u4e86\u3057\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001if\u6761\u4ef6\u3068break\u6587\u3092\u524a\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002Python\u306ewhile\u30eb\u30fc\u30d7\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u7121\u671f\u9650\u306b\u5b9f\u884c\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u8981\u6c42\u3092\u5f85\u3061\u7d9a\u3051\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<h3>Python\u306e\u30bd\u30b1\u30c3\u30c8\u30af\u30e9\u30a4\u30a2\u30f3\u30c8<\/h3>\n<p>\u79c1\u305f\u3061\u306fPython\u306e\u30bd\u30b1\u30c3\u30c8\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u3092socket_client.py\u3068\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3053\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u4f3c\u3066\u3044\u307e\u3059\u304c\u3001\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e3b\u306a\u9055\u3044\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u306f\u30db\u30b9\u30c8\u30a2\u30c9\u30ec\u30b9\u3068\u30dd\u30fc\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u7d50\u3073\u4ed8\u3051\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u3067\u3059\u3002\u4ee5\u4e0b\u306ePython\u30bd\u30b1\u30c3\u30c8\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u30b3\u30e1\u30f3\u30c8\u304c\u30b3\u30fc\u30c9\u306e\u7406\u89e3\u306b\u5f79\u7acb\u3064\u3067\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>import socket\r\n\r\n\r\ndef client_program():\r\n    host = socket.gethostname()  # as both code is running on same pc\r\n    port = 5000  # socket server port number\r\n\r\n    client_socket = socket.socket()  # instantiate\r\n    client_socket.connect((host, port))  # connect to the server\r\n\r\n    message = input(\" -&gt; \")  # take input\r\n\r\n    while message.lower().strip() != 'bye':\r\n        client_socket.send(message.encode())  # send message\r\n        data = client_socket.recv(1024).decode()  # receive response\r\n\r\n        print('Received from server: ' + data)  # show in terminal\r\n\r\n        message = input(\" -&gt; \")  # again take input\r\n\r\n    client_socket.close()  # close the connection\r\n\r\n\r\nif __name__ == '__main__':\r\n    client_program()\r\n<\/code><\/pre>\n<h3>Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u51fa\u529b<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/6564a33bdaa94e2bdf7c30b7\/14-0.gif\" alt=\"python socket programming, python socket server\" \/><\/div>\n<pre class=\"post-pre\"><code>scdev$ python3.6 socket_server.py \r\nConnection from: ('127.0.0.1', 57822)\r\nfrom connected user: Hi\r\n -&gt; Hello\r\nfrom connected user: How are you?\r\n -&gt; Good\r\nfrom connected user: Awesome!\r\n -&gt; Ok then, bye!\r\nscdev$\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code>scdev$ python3.6 socket_client.py \r\n -&gt; Hi\r\nReceived from server: Hello\r\n -&gt; How are you?\r\nReceived from server: Good\r\n -&gt; Awesome!\r\nReceived from server: Ok then, bye!\r\n -&gt; Bye\r\nscdev$\r\n<\/code><\/pre>\n<p>\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u306f\u30dd\u30fc\u30c85000\u3067\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3057\u304b\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3082\u30b5\u30fc\u30d0\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306b\u30bd\u30b1\u30c3\u30c8\u30dd\u30fc\u30c8\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u3002\u3053\u306e\u30dd\u30fc\u30c8\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u63a5\u7d9a\u547c\u3073\u51fa\u3057\u306b\u3088\u3063\u3066\u30e9\u30f3\u30c0\u30e0\u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u30dd\u30fc\u30c8\u756a\u53f7\u306f57822\u3067\u3059\u3002\u4ee5\u4e0a\u304cPython\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3001Python\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u3001\u30bd\u30b1\u30c3\u30c8\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u3064\u3044\u3066\u306e\u8aac\u660e\u3067\u3059\u3002\u53c2\u8003\uff1a\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7686\u3055\u3093\u3001\u3053\u3093\u306b\u3061\u306f\uff01\u524d\u56de\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u3001Python\u306eunittest\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u3064\u3044\u3066\u8a71\u3057\u307e\u3057\u305f\u3002\u4eca\u65e5\u306f\u3001Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u4f8b\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002Python\u306e\u30bd\u30b1\u30c3\u30c8\u30b5\u30fc\u30d0\u30fc\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u30a2\u30d7 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[31,26],"class_list":["post-934","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-python","tag-26"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\" \/>\n<meta property=\"og:description\" content=\"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-01T01:16:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T18:39:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/6564a33bdaa94e2bdf7c30b7\/14-0.gif\" \/>\n<meta name=\"author\" content=\"\u6d77\u6597, \u8475\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6d77\u6597, \u8475\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"10\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/\",\"name\":\"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2022-07-01T01:16:22+00:00\",\"dateModified\":\"2025-07-31T18:39:30+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\"},\"description\":\"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6\",\"name\":\"\u6d77\u6597, \u8475\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g\",\"caption\":\"\u6d77\u6597, \u8475\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b - Blog - Silicon Cloud","description":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\/","og_locale":"ja_JP","og_type":"article","og_title":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b","og_description":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2022-07-01T01:16:22+00:00","article_modified_time":"2025-07-31T18:39:30+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/6564a33bdaa94e2bdf7c30b7\/14-0.gif"}],"author":"\u6d77\u6597, \u8475","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u6d77\u6597, \u8475","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"10\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/","name":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2022-07-01T01:16:22+00:00","dateModified":"2025-07-31T18:39:30+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6"},"description":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Python\u306e\u30bd\u30b1\u30c3\u30c8\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0-\u30b5\u30fc\u30d0\u30fc\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\u4f8b"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/20cfc053626f4d45c0fa7a4e7964b5b6","name":"\u6d77\u6597, \u8475","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/25aec9a18954b6bfb7e4f7219c2923d62c6f0c9f4d5c0171228fe41751c0ab7a?s=96&d=mm&r=g","caption":"\u6d77\u6597, \u8475"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/kaitoaoi\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/python%e3%81%ae%e3%82%bd%e3%82%b1%e3%83%83%e3%83%88%e3%83%97%e3%83%ad%e3%82%b0%e3%83%a9%e3%83%9f%e3%83%b3%e3%82%b0-%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%80%81%e3%82%af%e3%83%a9%e3%82%a4%e3%82%a2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/934","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=934"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/934\/revisions"}],"predecessor-version":[{"id":46845,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/934\/revisions\/46845"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}