{"id":991,"date":"2021-05-04T12:05:00","date_gmt":"2021-05-04T03:05:00","guid":{"rendered":"https:\/\/conchan.akita.jp\/blog\/?p=991"},"modified":"2021-05-04T12:58:42","modified_gmt":"2021-05-04T03:58:42","slug":"python-yield","status":"publish","type":"post","link":"https:\/\/conchan.akita.jp\/blog\/python-yield\/","title":{"rendered":"redis-py\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u3093\u3060\u308ayield\u3092\u4f7f\u3063\u305f\u308a\u3057\u305f\u6642\u306e\u8a71"},"content":{"rendered":"\n<p class=\"has-black-color has-text-color\">\u3053\u3093\u306b\u3061\u306f\u3002<br>\u30b3\u30f3\u3061\u3083\u3093\u3053\u3068\u4f50\u3005\u6728\u3067\u3059\u3002<br>\u30ef\u30b1\u3042\u3063\u3066Redis\u304b\u3089\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u304d\u3066\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059python\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304d\u307e\u3057\u305f\u3002<br>\u304c\u3001\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u3066Redis\u3068\u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u5207\u308c\u308b\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u8fbc\u307f\u6642\u306e\u30e1\u30e2\u30ea\u30a8\u30e9\u30fc\u304c\u8d77\u304d\u307e\u3057\u305f\u3002<br>\u30c7\u30fc\u30bf\u3092\u5206\u5272\u3057\u3066\u53d6\u5f97\u3059\u308b\u3053\u3068\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u8fbc\u307f\u3082\u5206\u5272\u3057\u3066\u884c\u3046\u3053\u3068\u306b\u3088\u3063\u3066\u89e3\u6c7a\u3057\u307e\u3057\u305f\u306e\u3067\u3001\u8a73\u7d30\u3092\u66f8\u304d\u6b8b\u305d\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-black-color has-text-color\">\u307e\u305a\u3001\u3053\u3093\u306a\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u307e\u3057\u305f\u3002<\/p>\n\n\n\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 write_file():\n    \"\"\"\n    Redis\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059\n    \"\"\"\n    # Redis\u304b\u3089\u5024\u3092\u53d6\u5f97\n    data = get_data(REDIS_KEY)\n    # \u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\n    file_path = 'hoge\/fuga\/piyo.txt'\n    with open(file_path, 'W') as f:\n        f.write('\\n'.join(data))\n\ndef get_data(key):\n    \"\"\"\n    key\u3067\u6307\u5b9a\u3057\u305f\u30ad\u30fc\u306e\u8981\u7d20\u3092\u5168\u90e8Redis\u304b\u3089\u53d6\u5f97\u3059\u308b\n    \"\"\"\n    # \u5f53\u8a72key\u306e\u8981\u7d20\u6570\u3092\u53d6\u5f97\n    length = redis_session.llen(key)\n    # \u5148\u982d\u304b\u3089\u8981\u7d20\u6570\u5206\u306e\u5024\u3092\u53d6\u5f97\n    data = redis_session.lrange(key, 0, length - 1)\n    # \u5148\u982d\u304b\u3089\u8981\u7d20\u6570\u5206\u306e\u5024\u3092\u524a\u9664\n    redis_session.ltrim(key, length, -1)\n    return data<\/pre>\n\n\n\n<p class=\"has-black-color has-text-color\">\u3053\u308c\u3092\u3001\u8981\u7d20\u6570\u304c\u6570\u767e\u4e07\u306eRedis\u306b\u5bfe\u3057\u3066\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u4f8b\u5916\u304c\u51fa\u307e\u3057\u305f\u3002<\/p>\n\n\n\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=\"\">$ (\u5b9f\u884c\u30b3\u30de\u30f3\u30c9)\nTraceback (most recent call last):\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/connection.py\", line 185, in _read_from_socket\n    raise socket.error(SERVER_CLOSED_CONNECTION_ERROR)\nOSError: Connection closed by server.\nDuring handling of the above exception, another exception occurred:\nTraceback (most recent call last):\n(\u4e2d\u7565)\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/client.py\", line 1625, in lrange\n    return self.execute_command('LRANGE', name, start, end)\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/client.py\", line 775, in execute_command\n    return self.parse_response(connection, command_name, **options)\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/client.py\", line 789, in parse_response\n    response = connection.read_response()\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/connection.py\", line 637, in read_response\n    response = self._parser.read_response()\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/connection.py\", line 290, in read_response\n    response = self._buffer.readline()\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/connection.py\", line 224, in readline\n    self._read_from_socket()\n  File \"\/usr\/local\/lib\/python3.8\/site-packages\/redis-3.2.1-py3.8.egg\/redis\/connection.py\", line 198, in _read_from_socket\n    raise ConnectionError(\"Error while reading from socket: %s\" %\nredis.exceptions.ConnectionError: Error while reading from socket: ('Connection closed by server.',)<\/pre>\n\n\n\n<p class=\"has-black-color has-text-color\">\u63a5\u7d9a\u5207\u308c\u3061\u3083\u3063\u3066\u305d\u3046\u3002<br>\u306a\u305c\u63a5\u7d9a\u304c\u5207\u308c\u305f\u304b\u63a2\u308b\u305f\u3081\u3001redis-py\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u65c5\u306b\u51fa\u304b\u3051\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">\u3067\u3001<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/andymccurdy\/redis-py\/blob\/1a41cfd95a53a95b078084d8627be6b6fba3bb71\/redis\/connection.py#L197\" target=\"_blank\">\u30bd\u30b1\u30c3\u30c8\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u3080\u3068\u3053\u308d<\/a>\u3067\u30a8\u30e9\u30fc\u3068\u306a\u3063\u305f\u3088\u3046\u3067\u3059\u3002<br>\u4ed8\u8fd1\u306e\u30b3\u30fc\u30c9\u3092\u8aad\u3080\u306b\u3001\u5909\u6570&nbsp;<code>data<\/code>&nbsp;\u306b\u5024\u304c\u5165\u3089\u306a\u304b\u3063\u305f\u305f\u3081\u306b\u8d77\u304d\u3066\u3044\u3066\u3001&nbsp;<code>data<\/code>&nbsp;\u306f&nbsp;<code>data&nbsp;=&nbsp;self._sock.recv(socket_read_size)<\/code>&nbsp;\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<br><a rel=\"noreferrer noopener\" href=\"https:\/\/docs.python.org\/ja\/3\/library\/socket.html\" target=\"_blank\">python\u306erecv()\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u8aad\u3080\u3068\u3001\u5f15\u6570\u3067\u6307\u5b9a\u3057\u305f\u5206\u3092\u6700\u5927\u3068\u3057\u3066\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3059\u308b\u307f\u305f\u3044\u3067\u3001\u4eca\u56de\u306e\u5f15\u6570\u306e&nbsp;<code>socket_read_size<\/code>&nbsp;\u306f&nbsp;<code>socket_read_size=65536<\/code> \u3068\u306e\u8a18\u8ff0\u304c\u30b3\u30fc\u30c9\u4e2d\u306b\u898b\u3089\u308c\u307e\u3059\u3002<br>\u3067\u3001\u7d50\u8ad6\u3001\u4eca\u56de\u306f\u8aad\u307f\u8fbc\u3080\u30c7\u30fc\u30bf\u91cf\u304c\u304b\u306a\u308a\u5927\u304d\u3044\u306e\u3067&nbsp;<code>socket_read_size<\/code>&nbsp;\u3092\u30aa\u30fc\u30d0\u30fc\u3057\u3066\u3046\u307e\u304f\u8aad\u307f\u8fbc\u3081\u306a\u304b\u3063\u305f\u306e\u3067\u3057\u3087\u3046\u3002<br>\u3053\u308c\u4ee5\u4e0a\u306e\u6df1\u8ffd\u3044\u306f\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb\u306erecv\u306b\u307e\u3067\u5230\u9054\u3057\u305d\u3046\u306a\u306e\u3067\u3001\u76ee\u9014\u304c\u4ed8\u3044\u305f\u3053\u306e\u8fba\u3067\u30b9\u30c8\u30c3\u30d7\u3002<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">\u3055\u3066\u3001\u304a\u304a\u304b\u305f\u539f\u56e0\u4e88\u60f3\u304c\u3064\u3044\u305f\u3068\u3053\u308d\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b10000\u500b\u305a\u3064\u5206\u5272\u3057\u3066\u8aad\u307f\u8fbc\u3080\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\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 get_data(key):\n    \"\"\"\n    key\u3067\u6307\u5b9a\u3057\u305f\u30ad\u30fc\u306e\u8981\u7d20\u3092\u5168\u90e8Redis\u304b\u3089\u53d6\u5f97\u3059\u308b\n    \"\"\"\n    # \u51e6\u7406\u4e2d\u306b\u8ffd\u52a0\u30c7\u30fc\u30bf\u304cpop\u3055\u308c\u3066\u3082\u826f\u3044\u3088\u3046\u306b\u3001\u51e6\u7406\u958b\u59cb\u6642\u70b9\u306e\u9577\u3055\u3092\u53d6\u308a\u3001\u3053\u306e\u9577\u3055\u5206\u3060\u3051\u53d6\u5f97\u3059\u308b\n    remaining_length = redis_session.llen(key)\n    offset = 10000\n    values = list()\n\n    # offset\u5358\u4f4d\u3067\u5148\u982d\u304b\u3089\u9806\u756a\u306b\u53d6\u308a\u3060\u3059\n    while remaining_length > 0:\n        # \u53d6\u5f97\u3059\u308b\u8981\u7d20\u6570\u3092\u6c42\u3081\u308b\n        get_length = min(offset, remaining_length)\n        # \u5148\u982d\u304b\u3089\u8981\u7d20\u6570\u5206\u306e\u5024\u3092\u53d6\u5f97\n        value = redis_session.lrange(key, 0, get_length - 1)\n        # \u5024\u3092\u8fd4\u5374\u5024\u30ea\u30b9\u30c8\u306b\u5165\u308c\u308b\n        values.extend(value)\n        # \u5148\u982d\u304b\u3089\u8981\u7d20\u6570\u5206\u306e\u5024\u3092\u524a\u9664\n        redis_session.ltrim(key, get_length, -1)\n        # \u6b8b\u308a\u8981\u7d20\u6570\u3092\u66f4\u65b0\n        remaining_length -= get_length\n\n    return values<\/pre>\n\n\n\n<p class=\"has-black-color has-text-color\">\u3053\u308c\u3067\u5927\u4e08\u592b\u3067\u3057\u3087\u3046\uff01\u3068\u5b9f\u884c\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\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=\"\">Traceback (most recent call last):\n  (\u4e2d\u7565)\n    f.write('\\n'.join(data))\nMemoryError<\/pre>\n\n\n\n<p class=\"has-black-color has-text-color\">\uff3f\u4eba\u4eba\u4eba\u4eba\u4eba\u4eba\u4eba\u4eba\uff3f<br>\uff1e\u3000MemoryError\u3000\uff1c<br>\uffe3Y^Y^Y^Y^Y^Y\uffe3<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">\u4eca\u5ea6\u306f\u3001Redis\u304b\u3089\u306e\u8aad\u307f\u8fbc\u307f\u5f8c\u306e\u3001\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u8fbc\u307f\u90e8\u5206\u3002<br>\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3092\u76e3\u8996\u3057\u3064\u3064\u518d\u5b9f\u884c\u3059\u308b\u3068\u3001\u3069\u3093\u3069\u3093\u30e1\u30e2\u30ea\u3092\u98df\u3079\u3066\u3001\u6570GB\u307e\u3067\u4e0a\u304c\u3063\u3066\u3044\u304d\u307e\u3057\u305f\u3002<br>\u5bfe\u51e6\u65b9\u91dd\u3068\u3057\u3066\u306f\u3001Redis\u304b\u3089\u5168\u90e8\u53d6\u3063\u3066\u304d\u3066\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\u306e\u3067\u306f\u306a\u304f\u3001Redis\u304b\u3089\u53d6\u5f97\u6b21\u7b2c\u66f8\u304d\u8fbc\u3080\u3088\u3046\u306b\u3057\u305f\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">\u3053\u3053\u3067&nbsp;<code>yield<\/code>&nbsp;\u53e5\u304c\u5f79\u306b\u7acb\u3061\u307e\u3057\u305f\u3002<br><code>yield<\/code>&nbsp;\u3092\u7c21\u5358\u306b\u8a00\u3046\u3068\u3001\u300c\u30eb\u30fc\u30d7\u3067\u90fd\u5ea6return\u3057\u3066\u304f\u308c\u308b\u300d\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<br>Python\u306e\u307f\u306a\u3089\u305a\u3001C#\u7b49\u306b\u3082&nbsp;<code>yield&nbsp;return<\/code>&nbsp;\u304c\u3042\u308a\u307e\u3059\u3002<br>Python\u3067\u306f\u3001\u304a\u304a\u3088\u305d\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ol class=\"has-black-color has-text-color wp-block-list\"><li>\u4f55\u56de\u3082return\u3057\u305f\u3044\u30e1\u30bd\u30c3\u30c9\u306e&nbsp;<code>return<\/code>&nbsp;\u3092&nbsp;<code>yield<\/code>&nbsp;\u306b\u66f8\u304d\u63db\u3048\u308b<\/li><li>\u547c\u3073\u51fa\u3057\u5143\u30e1\u30bd\u30c3\u30c9\u3067\u3001\u30eb\u30fc\u30d7\u7b49\u3067\u4f55\u56de\u3082\u547c\u3073\u51fa\u3057\u3066\u3042\u3052\u308b<\/li><\/ol>\n\n\n\n<p class=\"has-black-color has-text-color\">\u30eb\u30fc\u30d7\u304c\u56de\u3063\u3066\u3044\u308b\u9014\u4e2d\u72b6\u614b\u3092\u88cf\u3067\u6301\u3063\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u30eb\u30fc\u30d7\u9014\u4e2dreturn\u7684\u306a\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br><code>yield<\/code>&nbsp;\u3092\u4f7f\u3046\u3088\u3046\u306b\u66f8\u304d\u63db\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\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 write_file():\n    \"\"\"\n    Redis\u304b\u3089\u53d6\u5f97\u3057\u305f\u30c7\u30fc\u30bf\u3092\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059\n    \"\"\"\n    file_path = 'hoge\/fuga\/piyo.txt'\n    with gzip.open(file_path, 'at') as f:\n        # Redis\u304b\u3089\u5024\u3092\u53d6\u5f97\u3057\u3064\u3064\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u8fbc\u3080\n        for data in get_data(REDISKEY):\n            f.write('\\n'.join(data))\n            f.write('\\n')\n\ndef get_data(key):\n    \"\"\"\n    key\u3067\u6307\u5b9a\u3057\u305f\u30ad\u30fc\u306e\u8981\u7d20\u3092\u5168\u90e8Redis\u304b\u3089\u53d6\u5f97\u3059\u308b\n    \"\"\"\n    # \u51e6\u7406\u4e2d\u306b\u8ffd\u52a0\u30c7\u30fc\u30bf\u304cpop\u3055\u308c\u3066\u3082\u826f\u3044\u3088\u3046\u306b\u3001\u51e6\u7406\u958b\u59cb\u6642\u70b9\u306e\u9577\u3055\u3092\u53d6\u308a\u3001\u3053\u306e\u9577\u3055\u5206\u3060\u3051\u53d6\u5f97\u3059\u308b\n    remaining_length = redis_session.llen(key)\n    offset = 10000\n\n    # offset\u5358\u4f4d\u3067\u5148\u982d\u304b\u3089\u9806\u756a\u306b\u53d6\u308a\u3060\u3059\n    while remaining_length > 0:\n        # \u53d6\u5f97\u3059\u308b\u8981\u7d20\u6570\u3092\u6c42\u3081\u308b\n        get_length = min(offset, remaining_length)\n        # \u5148\u982d\u304b\u3089\u8981\u7d20\u6570\u5206\u306e\u5024\u3092\u53d6\u5f97\n        value = redis_session.lrange(key, 0, get_length - 1)\n        # \u5148\u982d\u304b\u3089\u8981\u7d20\u6570\u5206\u306e\u5024\u3092\u524a\u9664\n        redis_session.ltrim(key, get_length, -1)\n        # \u6b8b\u308a\u8981\u7d20\u6570\u3092\u66f4\u65b0\n        remaining_length -= get_length\n        # \u5024\u3092\u8fd4\u3059\n        yield value<\/pre>\n\n\n\n<p class=\"has-black-color has-text-color\">for\u30eb\u30fc\u30d7\u3067&nbsp;<code>get_data()<\/code>&nbsp;\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br><code>get_data()<\/code>&nbsp;\u3067\u306f&nbsp;<code>yield<\/code>&nbsp;\u3092\u542b\u3080while\u30eb\u30fc\u30d7\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u547c\u3073\u51fa\u3055\u308c\u308b\u3054\u3068\u306b\u307e\u3063\u3055\u3089\u306a\u72b6\u614b\u304b\u3089\u30b9\u30bf\u30fc\u30c8\u3059\u308b\u308f\u3051\u3067\u306f\u306a\u304f\u3001\u524d\u56de\u306e\u30eb\u30fc\u30d7\u306e\u72b6\u614b\u3092\u751f\u304b\u3057\u3066\u304f\u308c\u307e\u3059\u3002<br>\u672c\u4f8b\u3067\u3059\u3068\u3001\u5909\u6570&nbsp;<code>remaining_length<\/code>&nbsp;\u306e\u5024\u304c\u30eb\u30fc\u30d7\u306e\u5ea6\u306b\u6e1b\u5c11\u3057\u307e\u3059\u304c\u3001\u3053\u306e\u5909\u6570\u306e\u5024\u3092\u8a18\u61b6\u3057\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">\u3053\u308c\u3067\u3001Redis\u304b\u3089\u53d6\u5f97\u6b21\u7b2c\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u8a18\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u306e\u3067\u3001\u30e1\u30e2\u30ea\u306b\u30b5\u30a4\u30ba\u306e\u5927\u304d\u3044\u4e00\u6642\u30c7\u30fc\u30bf\u3092\u5c55\u958b\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u3001\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u304c\u3050\u3093\u3068\u6291\u3048\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p class=\"has-black-color has-text-color\">\u4ee5\u4e0a\u3001\u6226\u3044\u306e\u8a18\u9332\u3067\u3057\u305f\u3002<br>\u5b9f\u969b\u306f\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u74b0\u5883\u3067\u306e\u78ba\u8a8d\u3084\u3001\u518d\u73fe\u7528\u306bRedis\u306b\u610f\u56f3\u7684\u306b\u6570\u767e\u4e07\u306e\u30c7\u30fc\u30bf\u3092\u5165\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u7528\u610f\u306a\u3069\u3001\u8af8\u3005\u3084\u3063\u3066\u3044\u307e\u3059\u304c\u7701\u7565\u3057\u307e\u3057\u305f\u3002<br>\u305d\u308c\u3067\u306f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30b3\u30f3\u3061\u3083\u3093\u3053\u3068\u4f50\u3005\u6728\u3067\u3059\u3002\u30ef\u30b1\u3042\u3063\u3066Redis\u304b\u3089\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u6301\u3063\u3066\u304d\u3066\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3059python\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u66f8\u304d\u307e\u3057\u305f\u3002\u304c\u3001\u30b5\u30a4\u30ba\u304c\u5927\u304d\u3059\u304e\u3066Redis\u3068\u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u5207\u308c\u308b\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3068\u3001\u30d5\u30a1\u30a4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8],"tags":[],"class_list":["post-991","post","type-post","status-publish","format-standard","hentry","category-6","category-8","entry"],"_links":{"self":[{"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/posts\/991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/comments?post=991"}],"version-history":[{"count":31,"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/posts\/991\/revisions"}],"predecessor-version":[{"id":1033,"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/posts\/991\/revisions\/1033"}],"wp:attachment":[{"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/media?parent=991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/categories?post=991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/conchan.akita.jp\/blog\/wp-json\/wp\/v2\/tags?post=991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}