IPFS 服务的Python API参考

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

IPFS支持Python接口访问,这里是其API参考手册。

  • 相关连接:
    • IPFS 服务的Python访问
    • 通过Helm在Kubernetes集群上安装IPFS
    • IPFS在Kubernetes部署的服务开放
    • Run IPFS in a Docker container
    • IPFS—快速运行容器服务
    • IPFS 命令大全

所有的Python方法接受下列的参数:

  • opts (dict) – 自定义参数的 dictonary 结构,被发送到HTTP request中。

连接

  • ipfsapi.connect(host='localhost', port=5001, base='api/v0', chunk_size=4096, **defaults)[source]

Create a new Client instance and connect to the daemon to validate that its version is supported.

Raises:
  • VersionMismatch
  • ErrorResponse
  • ConnectionError
  • ProtocolError
  • StatusError
  • TimeoutError

All parameters are identical to those passed to the constructor of the Client class.

Returns: ~ipfsapi.Client

版本检查

  • ipfsapi.assert_version(version, minimum='0.4.3', maximum='0.5.0')[source]

Make sure that the given daemon version is supported by this client version.

Raises:

VersionMismatch

Parameters:
  • version (str) -- The version of an IPFS daemon.
  • minimum (str) -- The minimal IPFS version to allow.
  • maximum (str) -- The maximum IPFS version to allow.

Client类

  • class ipfsapi.Client(host='localhost', port=5001, base='api/v0', chunk_size=4096, **defaults)[source]

Bases: object

A TCP client for interacting with an IPFS daemon.

A Client instance will not actually establish a connection to the daemon until at least one of it's methods is called.

Parameters:
  • host (str) -- Hostname or IP address of the computer running the ipfs daemon node (defaults to the local system)
  • port (int) -- The API port of the IPFS deamon (usually 5001)
  • base (str) -- Path of the deamon's API (currently always api/v0)
  • chunk_size (int) -- The size of the chunks to break uploaded files and text content into

添加文件

  • add(files, recursive=False, pattern='**', *args, **kwargs)[source]

Add a file, or directory of files to IPFS.

>>> with io.open('nurseryrhyme.txt', 'w', encoding='utf-8') as f:
...     numbytes = f.write('Mary had a little lamb')
>>> c.add('nurseryrhyme.txt')
{'Hash': 'QmZfF6C9j4VtoCsTp4KSrhYH47QMd3DNXVZBKaxJdhaPab',
 'Name': 'nurseryrhyme.txt'}
Parameters:
  • files (str) -- A filepath to either a file or directory
  • recursive (bool) -- Controls if files in subdirectories are added or not
  • pattern (str | list) -- Single *glob* pattern or list of glob patterns and compiled regular expressions to match the names of the filepaths to keep
  • trickle (bool) -- Use trickle-dag format (optimized for streaming) when generating the dag; see the FAQ for more information (Default: False)
  • only_hash (bool) -- Only chunk and hash, but do not write to disk (Default: False)
  • wrap_with_directory (bool) -- Wrap files with a directory object to preserve their filename (Default: False)
  • chunker (str) -- The chunking algorithm to use
  • pin (bool) -- Pin this object when adding (Default: True)
Returns:

dict (File name and hash of the added file node)

下载文件

  • get(multihash, **kwargs)[source]

Downloads a file, or directory of files from IPFS.

Files are placed in the current working directory.

Parameters: multihash (str) -- The path to the IPFS object(s) to be outputted

查看内容

  • cat(multihash, **kwargs)[source]

Retrieves the contents of a file identified by hash.

>>> c.cat('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
Traceback (most recent call last):
  ...
ipfsapi.exceptions.Error: this dag node is a directory
>>> c.cat('QmeKozNssnkJ4NcyRidYgDY2jfRZqVEoRGfipkgath71bX')
b'\n\n\n\nipfs example viewer</…'</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- The path to the IPFS object(s) to be retrieved</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>str</strong> (<em>File contents</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_7"></span> 
   <h2>连接对象列表</h2> 
   <ul> 
    <li><code>ls</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns a list of objects linked to by the given hash.</p> 
   <pre>>>> c.ls('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
{'Objects': [
  {'Hash': 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D',
   'Links': [
    {'Hash': 'Qmd2xkBfEwEs9oMTk77A6jrsgurpF3ugXSg7dtPNFkcNMV',
     'Name': 'Makefile',          'Size': 174, 'Type': 2},
     …
    {'Hash': 'QmSY8RfVntt3VdxWppv9w5hWgNrE31uctgTiYwKir8eXJY',
     'Name': 'published-version', 'Size': 55,  'Type': 2}
    ]}
  ]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- The path to the IPFS object(s) to list links from</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Directory information and contents</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_8"></span> 
   <h2>引用对象列表</h2> 
   <ul> 
    <li><code>refs</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns a list of hashes of objects referenced by the given hash.</p> 
   <pre>>>> c.refs('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
[{'Ref': 'Qmd2xkBfEwEs9oMTk77A6jrsgurpF3ugXSg7 … cNMV', 'Err': ''},
 …
 {'Ref': 'QmSY8RfVntt3VdxWppv9w5hWgNrE31uctgTi … eXJY', 'Err': ''}]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- Path to the object(s) to list refs from</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><em>list</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_9"></span> 
   <h2>所有本地对象</h2> 
   <ul> 
    <li><code>refs_local</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Displays the hashes of all local objects.</p> 
   <pre>>>> c.refs_local()
[{'Ref': 'Qmd2xkBfEwEs9oMTk77A6jrsgurpF3ugXSg7 … cNMV', 'Err': ''},
 …
 {'Ref': 'QmSY8RfVntt3VdxWppv9w5hWgNrE31uctgTi … eXJY', 'Err': ''}]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><em>list</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_10"></span> 
   <h2>块统计</h2> 
   <ul> 
    <li><code>block_stat</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns a dict with the size of the block with the given hash.</p> 
   <pre>>>> c.block_stat('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
{'Key':  'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D',
 'Size': 258}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- The base58 multihash of an existing block to stat</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Information about the requested block</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_11"></span> 
   <h2>块内容获取</h2> 
   <ul> 
    <li><code>block_get</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns the raw contents of a block.</p> 
   <pre>>>> c.block_get('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
b'\x121\n"\x12 \xdaW>\x14\xe5\xc1\xf6\xe4\x92\xd1 … \n\x02\x08\x01'</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- The base58 multihash of an existing block to get</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>str</strong> (<em>Value of the requested block</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_12"></span> 
   <h2>块内容存储</h2> 
   <ul> 
    <li><code>block_put</code>(<em>file</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Stores the contents of the given file object as an IPFS block.</p> 
   <pre>>>> c.block_put(io.BytesIO(b'Mary had a little lamb'))
    {'Key':  'QmeV6C6XVt1wf7V7as7Yak3mxPma8jzpqyhtRtCvpKcfBb',
     'Size': 22}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>file</strong> (<em>io.RawIOBase</em>) -- The data to be stored as an IPFS block</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Information about the new block</em>) -- See <code>block_stat()</code></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_13"></span> 
   <h2>BitSwap的WantList</h2> 
   <ul> 
    <li><code>bitswap_wantlist</code>(<em>peer=None</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns blocks currently on the bitswap wantlist.</p> 
   <pre>>>> c.bitswap_wantlist()
{'Keys': [
    'QmeV6C6XVt1wf7V7as7Yak3mxPma8jzpqyhtRtCvpKcfBb',
    'QmdCWFLDXqgdWQY9kVubbEHBbkieKd3uo7MtCm7nTZZE9K',
    'QmVQ1XvYGF19X4eJqz1s7FJYJqAxFC4oqh3vWJJEXn66cp'
]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>peer</strong> (<em>str</em>) -- Peer to show wantlist for.</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of wanted blocks</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_14"></span> 
   <h2>BitSwap统计</h2> 
   <ul> 
    <li><code>bitswap_stat</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns some diagnostic information from the bitswap agent.</p> 
   <pre>>>> c.bitswap_stat()
{'BlocksReceived': 96,
 'DupBlksReceived': 73,
 'DupDataReceived': 2560601,
 'ProviderBufLen': 0,
 'Peers': [
    'QmNZFQRxt9RMNm2VVtuV2Qx7q69bcMWRVXmr5CEkJEgJJP',
    'QmNfCubGpwYZAQxX8LQDsYgB48C4GbfZHuYdexpX9mbNyT',
    'QmNfnZ8SCs3jAtNPc8kf3WJqJqSoX7wsX7VqkLdEYMao4u',
    …
 ],
 'Wantlist': [
    'QmeV6C6XVt1wf7V7as7Yak3mxPma8jzpqyhtRtCvpKcfBb',
    'QmdCWFLDXqgdWQY9kVubbEHBbkieKd3uo7MtCm7nTZZE9K',
    'QmVQ1XvYGF19X4eJqz1s7FJYJqAxFC4oqh3vWJJEXn66cp'
 ]
}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Statistics, peers and wanted blocks</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_15"></span> 
   <h2>移除wantlist中的块</h2> 
   <ul> 
    <li><code>bitswap_unwant</code>(<em>key</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Remove a given block from wantlist.</p> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>key</strong> (<em>str</em>) -- Key to remove from wantlist.</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_16"></span> 
   <h2>对象数据</h2> 
   <p><code>object_data</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</p> 
   <p>Returns the raw bytes in an IPFS object.</p> 
   <pre>>>> c.object_data('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
b'\x08\x01'</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- Key of the object to retrieve, in base58-encoded multihash format</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>str</strong> (<em>Raw object data</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_17"></span> 
   <h2>创建新的对象</h2> 
   <ul> 
    <li><code>object_new</code>(<em>template=None</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Creates a new object from an IPFS template.</p> 
   <p>By default this creates and returns a new empty merkledag node, but you may pass an optional template argument to create a preformatted node.</p> 
   <pre>>>> c.object_new()
{'Hash': 'QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>template</strong> (<em>str</em>) -- <p>Blueprints from which to construct the new object. Possible values:</p> 
       <blockquote> 
        <ul> 
         <li><code>"unixfs-dir"</code></li> 
         <li><code>None</code></li> 
        </ul> 
       </blockquote> </td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Object hash</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_18"></span> 
   <h2>返回给定对象的连接</h2> 
   <ul> 
    <li><code>object_links</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns the links pointed to by the specified object.</p> 
   <pre>>>> c.object_links('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDx … ca7D')
{'Hash': 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D',
 'Links': [
    {'Hash': 'Qmd2xkBfEwEs9oMTk77A6jrsgurpF3ugXSg7dtPNFkcNMV',
     'Name': 'Makefile',          'Size': 174},
    {'Hash': 'QmeKozNssnkJ4NcyRidYgDY2jfRZqVEoRGfipkgath71bX',
     'Name': 'example',           'Size': 1474},
    {'Hash': 'QmZAL3oHMQYqsV61tGvoAVtQLs1WzRe1zkkamv9qxqnDuK',
     'Name': 'home',              'Size': 3947},
    {'Hash': 'QmZNPyKVriMsZwJSNXeQtVQSNU4v4KEKGUQaMT61LPahso',
     'Name': 'lib',               'Size': 268261},
    {'Hash': 'QmSY8RfVntt3VdxWppv9w5hWgNrE31uctgTiYwKir8eXJY',
     'Name': 'published-version', 'Size': 55}]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- Key of the object to retrieve, in base58-encoded multihash format</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Object hash and merkedag links</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_19"></span> 
   <h2>获取对象</h2> 
   <ul> 
    <li><code>object_get</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Get and serialize the DAG node named by multihash.</p> 
   <pre>>>> c.object_get('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
{'Data': '',
 'Links': [
    {'Hash': 'Qmd2xkBfEwEs9oMTk77A6jrsgurpF3ugXSg7dtPNFkcNMV',
     'Name': 'Makefile',          'Size': 174},
    {'Hash': 'QmeKozNssnkJ4NcyRidYgDY2jfRZqVEoRGfipkgath71bX',
     'Name': 'example',           'Size': 1474},
    {'Hash': 'QmZAL3oHMQYqsV61tGvoAVtQLs1WzRe1zkkamv9qxqnDuK',
     'Name': 'home',              'Size': 3947},
    {'Hash': 'QmZNPyKVriMsZwJSNXeQtVQSNU4v4KEKGUQaMT61LPahso',
     'Name': 'lib',               'Size': 268261},
    {'Hash': 'QmSY8RfVntt3VdxWppv9w5hWgNrE31uctgTiYwKir8eXJY',
     'Name': 'published-version', 'Size': 55}]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- Key of the object to retrieve, in base58-encoded multihash format</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Object data and links</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_20"></span> 
   <h2>对象存入</h2> 
   <ul> 
    <li><code>object_put</code>(<em>file</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Stores input as a DAG object and returns its key.</p> 
   <pre>>>> c.object_put(io.BytesIO(b'''
...       {
...           "Data": "another",
...           "Links": [ {
...               "Name": "some link",
...               "Hash": "QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCV … R39V",
...               "Size": 8
...           } ]
...       }'''))
{'Hash': 'QmZZmY4KCu9r3e7M2Pcn46Fc5qbn6NpzaAGaYb22kbfTqm',
 'Links': [
    {'Hash': 'QmXg9Pp2ytZ14xgmQjYEiHjVjMFXzCVVEcRTWJBmLgR39V',
     'Size': 8, 'Name': 'some link'}
 ]
}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>file</strong> (<em>io.RawIOBase</em>) -- (JSON) object from which the DAG object will be created</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Hash and links of the created DAG object</em>) -- See <code>object_links()</code></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_21"></span> 
   <h2>对象统计</h2> 
   <ul> 
    <li><code>object_stat</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Get stats for the DAG node named by multihash.</p> 
   <pre>>>> c.object_stat('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
{'LinksSize': 256, 'NumLinks': 5,
 'Hash': 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D',
 'BlockSize': 258, 'CumulativeSize': 274169, 'DataSize': 2}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- Key of the object to retrieve, in base58-encoded multihash format</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><em>dict</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_22"></span> 
   <h2>追加数据</h2> 
   <ul> 
    <li><code>object_patch_append_data</code>(<em>multihash</em>, <em>new_data</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Creates a new merkledag object based on an existing one.</p> 
   <p>The new object will have the provided data appended to it, and will thus have a new Hash.</p> 
   <pre>>>> c.object_patch_append_data("QmZZmY … fTqm", io.BytesIO(b"bla"))
{'Hash': 'QmR79zQQj2aDfnrNgczUhvf2qWapEfQ82YQRt3QjrbhSb2'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>multihash</strong> (<em>str</em>) -- The hash of an ipfs object to modify</li> 
        <li><strong>new_data</strong> (<em>io.RawIOBase</em>) -- The data to append to the object's data section</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Hash of new object</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_23"></span> 
   <h2>追加链接</h2> 
   <ul> 
    <li><code>object_patch_add_link</code>(<em>root</em>, <em>name</em>, <em>ref</em>, <em>create=False</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Creates a new merkledag object based on an existing one.</p> 
   <p>The new object will have a link to the provided object.</p> 
   <pre>>>> c.object_patch_add_link(
...     'QmR79zQQj2aDfnrNgczUhvf2qWapEfQ82YQRt3QjrbhSb2',
...     'Johnny',
...     'QmR79zQQj2aDfnrNgczUhvf2qWapEfQ82YQRt3QjrbhSb2'
... )
{'Hash': 'QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>root</strong> (<em>str</em>) -- IPFS hash for the object being modified</li> 
        <li><strong>name</strong> (<em>str</em>) -- name for the new link</li> 
        <li><strong>ref</strong> (<em>str</em>) -- IPFS hash for the object being linked to</li> 
        <li><strong>create</strong> (<em>bool</em>) -- Create intermediary nodes</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Hash of new object</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_24"></span> 
   <h2>移除链接</h2> 
   <ul> 
    <li><code>object_patch_rm_link</code>(<em>root</em>, <em>link</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Creates a new merkledag object based on an existing one.</p> 
   <p>The new object will lack a link to the specified object.</p> 
   <pre>>>> c.object_patch_rm_link(
...     'QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k',
...     'Johnny'
... )
{'Hash': 'QmR79zQQj2aDfnrNgczUhvf2qWapEfQ82YQRt3QjrbhSb2'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>root</strong> (<em>str</em>) -- IPFS hash of the object to modify</li> 
        <li><strong>link</strong> (<em>str</em>) -- name of the link to remove</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Hash of new object</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_25"></span> 
   <h2>设置对象数据</h2> 
   <ul> 
    <li><code>object_patch_set_data</code>(<em>root</em>, <em>data</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Creates a new merkledag object based on an existing one.</p> 
   <p>The new object will have the same links as the old object but with the provided data instead of the old object's data contents.</p> 
   <pre>>>> c.object_patch_set_data(
...     'QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k',
...     io.BytesIO(b'bla')
... )
{'Hash': 'QmSw3k2qkv4ZPsbu9DVEJaTMszAQWNgM1FTFYpfZeNQWrd'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>root</strong> (<em>str</em>) -- IPFS hash of the object to modify</li> 
        <li><strong>data</strong> (<em>io.RawIOBase</em>) -- The new data to store in root</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Hash of new object</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_26"></span> 
   <h2>文件列表</h2> 
   <ul> 
    <li><code>file_ls</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Lists directory contents for Unix filesystem objects.</p> 
   <p>The result contains size information. For files, the child size is the total size of the file contents. For directories, the child size is the IPFS link size.</p> 
   <p>The path can be a prefixless reference; in this case, it is assumed that it is an <code>/ipfs/</code> reference and not <code>/ipns/</code>.</p> 
   <pre>>>> c.file_ls('QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D')
{'Arguments': {'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D':
               'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D'},
 'Objects': {
   'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D': {
     'Hash': 'QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D',
     'Size': 0, 'Type': 'Directory',
     'Links': [
       {'Hash': 'Qmd2xkBfEwEs9oMTk77A6jrsgurpF3ugXSg7dtPNFkcNMV',
        'Name': 'Makefile', 'Size': 163,    'Type': 'File'},
       {'Hash': 'QmeKozNssnkJ4NcyRidYgDY2jfRZqVEoRGfipkgath71bX',
        'Name': 'example',  'Size': 1463,   'Type': 'File'},
       {'Hash': 'QmZAL3oHMQYqsV61tGvoAVtQLs1WzRe1zkkamv9qxqnDuK',
        'Name': 'home',     'Size': 3947,   'Type': 'Directory'},
       {'Hash': 'QmZNPyKVriMsZwJSNXeQtVQSNU4v4KEKGUQaMT61LPahso',
        'Name': 'lib',      'Size': 268261, 'Type': 'Directory'},
       {'Hash': 'QmSY8RfVntt3VdxWppv9w5hWgNrE31uctgTiYwKir8eXJY',
        'Name': 'published-version',
        'Size': 47, 'Type': 'File'}
       ]
   }
}}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- The path to the object(s) to list links from</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><em>dict</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_27"></span> 
   <h2>名称解析</h2> 
   <ul> 
    <li><code>resolve</code>(<em>name</em>, <em>recursive=False</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Accepts an identifier and resolves it to the referenced item.</p> 
   <p>There are a number of mutable name protocols that can link among themselves and into IPNS. For example IPNS references can (currently) point at an IPFS object, and DNS links can point at other DNS links, IPNS entries, or IPFS objects. This command accepts any of these identifiers.</p> 
   <pre>>>> c.resolve("/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdw … ca7D/Makefile")
{'Path': '/ipfs/Qmd2xkBfEwEs9oMTk77A6jrsgurpF3ugXSg7dtPNFkcNMV'}
>>> c.resolve("/ipns/ipfs.io")
{'Path': '/ipfs/QmTzQ1JRkWErjk39mryYw2WVaphAZNAREyMchXzYQ7c15n'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>name</strong> (<em>str</em>) -- The name to resolve</li> 
        <li><strong>recursive</strong> (<em>bool</em>) -- Resolve until the result is an IPFS name</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>IPFS path of resource</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_28"></span> 
   <h2>键值列表</h2> 
   <ul> 
    <li><code>key_list</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns a list of generated public keys that can be used with name_publish</p> 
   <pre>>>> c.key_list()
[{'Name': 'self',
  'Id': 'QmQf22bZar3WKmojipms22PkXH1MZGmvsqzQtuSvQE3uhm'},
 {'Name': 'example_key_name',
  'Id': 'QmQLaT5ZrCfSkXTH6rUKtVidcxj8jrW3X2h75Lug1AV7g8'}
]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>list</strong> (<em>List of dictionaries with Names and Ids of public keys.</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_29"></span> 
   <h2>键值生成</h2> 
   <ul> 
    <li><code>key_gen</code>(<em>key_name</em>, <em>type</em>, <em>size=2048</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Adds a new public key that can be used for name_publish.</p> 
   <pre>>>> c.key_gen('example_key_name')
{'Name': 'example_key_name',
 'Id': 'QmQLaT5ZrCfSkXTH6rUKtVidcxj8jrW3X2h75Lug1AV7g8'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>key_name</strong> (<em>str</em>) -- Name of the new Key to be generated. Used to reference the Keys.</li> 
        <li><strong>type</strong> (<em>str</em>) -- <p>Type of key to generate. The current possible keys types are:</p> 
         <blockquote> 
          <ul> 
           <li><code>"rsa"</code></li> 
           <li><code>"ed25519"</code></li> 
          </ul> 
         </blockquote> </li> 
        <li><strong>size</strong> (<em>int</em>) -- Bitsize of key to generate</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Key name and Key Id</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_30"></span> 
   <h2>键值移除</h2> 
   <ul> 
    <li><code>key_rm</code>(<em>key_name</em>, <em>*key_names</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Remove a keypair</p> 
   <pre>>>> c.key_rm("bla")
{"Keys": [
    {"Name": "bla",
     "Id": "QmfJpR6paB6h891y7SYXGe6gapyNgepBeAYMbyejWA4FWA"}
]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>key_name</strong> (<em>str</em>) -- Name of the key(s) to remove.</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of key names and IDs that have been removed</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_31"></span> 
   <h2>键值改名</h2> 
   <ul> 
    <li><code>key_rename</code>(<em>key_name</em>, <em>new_key_name</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Rename a keypair</p> 
   <pre>>>> c.key_rename("bla", "personal")
{"Was": "bla",
 "Now": "personal",
 "Id": "QmeyrRNxXaasZaoDXcCZgryoBCga9shaHQ4suHAYXbNZF3",
 "Overwrite": False}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>key_name</strong> (<em>str</em>) -- Current name of the key to rename</li> 
        <li><strong>new_key_name</strong> (<em>str</em>) -- New name of the key</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>List of key names and IDs that have been removed</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_32"></span> 
   <h2>名称发布</h2> 
   <ul> 
    <li><code>name_publish</code>(<em>ipfs_path</em>, <em>resolve=True</em>, <em>lifetime='24h'</em>, <em>ttl=None</em>, <em>key=None</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Publishes an object to IPNS.</p> 
   <p>IPNS is a PKI namespace, where names are the hashes of public keys, and the private key enables publishing new (signed) values. In publish, the default value of <em>name</em> is your own identity public key.</p> 
   <pre>>>> c.name_publish('/ipfs/QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZK … GZ5d')
{'Value': '/ipfs/QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d',
 'Name': 'QmVgNoP89mzpgEAAqK8owYoDEyB97MkcGvoWZir8otE9Uc'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>ipfs_path</strong> (<em>str</em>) -- IPFS path of the object to be published</li> 
        <li><strong>resolve</strong> (<em>bool</em>) -- Resolve given path before publishing</li> 
        <li><strong>lifetime</strong> (<em>str</em>) -- <p>Time duration that the record will be valid for</p> <p>Accepts durations such as <code>"300s"</code>, <code>"1.5h"</code> or <code>"2h45m"</code>. Valid units are:</p> 
         <blockquote> 
          <ul> 
           <li><code>"ns"</code></li> 
           <li><code>"us"</code> (or <code>"µs"</code>)</li> 
           <li><code>"ms"</code></li> 
           <li><code>"s"</code></li> 
           <li><code>"m"</code></li> 
           <li><code>"h"</code></li> 
          </ul> 
         </blockquote> </li> 
        <li><strong>ttl</strong> (<em>int</em>) -- Time duration this record should be cached for</li> 
        <li><strong>key</strong> (<em>string</em>) -- Name of the key to be used, as listed by 'ipfs key list'.</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>IPNS hash and the IPFS path it points at</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_33"></span> 
   <h2>名称解析</h2> 
   <ul> 
    <li><code>name_resolve</code>(<em>name=None</em>, <em>recursive=False</em>, <em>nocache=False</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Gets the value currently published at an IPNS name.</p> 
   <p>IPNS is a PKI namespace, where names are the hashes of public keys, and the private key enables publishing new (signed) values. In resolve, the default value of <code>name</code> is your own identity public key.</p> 
   <pre>>>> c.name_resolve()
{'Path': '/ipfs/QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>name</strong> (<em>str</em>) -- The IPNS name to resolve (defaults to the connected node)</li> 
        <li><strong>recursive</strong> (<em>bool</em>) -- Resolve until the result is not an IPFS name (default: false)</li> 
        <li><strong>nocache</strong> (<em>bool</em>) -- Do not use cached entries (default: false)</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>The IPFS path the IPNS hash points at</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_34"></span> 
   <h2>域名解析</h2> 
   <ul> 
    <li><code>dns</code>(<em>domain_name</em>, <em>recursive=False</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Resolves DNS links to the referenced object.</p> 
   <p>Multihashes are hard to remember, but domain names are usually easy to remember. To create memorable aliases for multihashes, DNS TXT records can point to other DNS links, IPFS objects, IPNS keys, etc. This command resolves those links to the referenced object.</p> 
   <p>For example, with this DNS TXT record:</p> 
   <pre>>>> import dns.resolver
>>> a = dns.resolver.query("ipfs.io", "TXT")
>>> a.response.answer[0].items[0].to_text()
'"dnslink=/ipfs/QmTzQ1JRkWErjk39mryYw2WVaphAZNAREyMchXzYQ7c15n"'</pre> 
   <p>The resolver will give:</p> 
   <pre>>>> c.dns("ipfs.io")
{'Path': '/ipfs/QmTzQ1JRkWErjk39mryYw2WVaphAZNAREyMchXzYQ7c15n'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>domain_name</strong> (<em>str</em>) -- The domain-name name to resolve</li> 
        <li><strong>recursive</strong> (<em>bool</em>) -- Resolve until the name is not a DNS link</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Resource were a DNS entry points to</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_35"></span> 
   <h2>钉住对象到本地存储</h2> 
   <ul> 
    <li><code>pin_add</code>(<em>path</em>, <em>*paths</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Pins objects to local storage.</p> 
   <p>Stores an IPFS object(s) from a given path locally to disk.</p> 
   <pre>>>> c.pin_add("QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d")
{'Pins': ['QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>path</strong> (<em>str</em>) -- Path to object(s) to be pinned</li> 
        <li><strong>recursive</strong> (<em>bool</em>) -- Recursively unpin the object linked to by the specified object(s)</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>List of IPFS objects that have been pinned</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_36"></span> 
   <h2>移除钉住对象</h2> 
   <ul> 
    <li><code>pin_rm</code>(<em>path</em>, <em>*paths</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Removes a pinned object from local storage.</p> 
   <p>Removes the pin from the given object allowing it to be garbage collected if needed.</p> 
   <pre>>>> c.pin_rm('QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d')
{'Pins': ['QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>path</strong> (<em>str</em>) -- Path to object(s) to be unpinned</li> 
        <li><strong>recursive</strong> (<em>bool</em>) -- Recursively unpin the object linked to by the specified object(s)</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>List of IPFS objects that have been unpinned</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_37"></span> 
   <h2>钉住对象列表</h2> 
   <ul> 
    <li><code>pin_ls</code>(<em>type='all'</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Lists objects pinned to local storage.</p> 
   <p>By default, all pinned objects are returned, but the <code>type</code> flag or arguments can restrict that to a specific pin type or to some specific objects respectively.</p> 
   <pre>>>> c.pin_ls()
{'Keys': {
    'QmNNPMA1eGUbKxeph6yqV8ZmRkdVat … YMuz': {'Type': 'recursive'},
    'QmNPZUCeSN5458Uwny8mXSWubjjr6J … kP5e': {'Type': 'recursive'},
    'QmNg5zWpRMxzRAVg7FTQ3tUxVbKj8E … gHPz': {'Type': 'indirect'},
    …
    'QmNiuVapnYCrLjxyweHeuk6Xdqfvts … wCCe': {'Type': 'indirect'}}}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>type</strong> (<em>"str"</em>) -- <p>The type of pinned keys to list. Can be:</p> 
       <blockquote> 
        <ul> 
         <li><code>"direct"</code></li> 
         <li><code>"indirect"</code></li> 
         <li><code>"recursive"</code></li> 
         <li><code>"all"</code></li> 
        </ul> 
       </blockquote> </td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Hashes of pinned IPFS objects and why they are pinned</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_38"></span> 
   <h2>钉住对象更新</h2> 
   <ul> 
    <li><code>pin_update</code>(<em>from_path</em>, <em>to_path</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Replaces one pin with another.</p> 
   <p>Updates one pin to another, making sure that all objects in the new pin are local. Then removes the old pin. This is an optimized version of using first using <code>pin_add()</code> to add a new pin for an object and then using <code>pin_rm()</code> to remove the pin for the old object.</p> 
   <pre>>>> c.pin_update("QmXMqez83NU77ifmcPs5CkNRTMQksBLkyfBf4H5g1NZ52P",
...              "QmUykHAi1aSjMzHw3KmBoJjqRUQYNkFXm8K1y7ZsJxpfPH")
{"Pins": ["/ipfs/QmXMqez83NU77ifmcPs5CkNRTMQksBLkyfBf4H5g1NZ52P",
          "/ipfs/QmUykHAi1aSjMzHw3KmBoJjqRUQYNkFXm8K1y7ZsJxpfPH"]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>from_path</strong> (<em>str</em>) -- Path to the old object</li> 
        <li><strong>to_path</strong> (<em>str</em>) -- Path to the new object to be pinned</li> 
        <li><strong>unpin</strong> (<em>bool</em>) -- Should the pin of the old object be removed? (Default: <code>True</code>)</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>List of IPFS objects affected by the pinning operation</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_39"></span> 
   <h2>钉住对象校验</h2> 
   <ul> 
    <li><code>pin_verify</code>(<em>path</em>, <em>*paths</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Verify that recursive pins are complete.</p> 
   <p>Scan the repo for pinned object graphs and check their integrity. Issues will be reported back with a helpful human-readable error message to aid in error recovery. This is useful to help recover from datastore corruptions (such as when accidentally deleting files added using the filestore backend).</p> 
   <pre>>>> for item in c.pin_verify("QmNuvmuFeeWWpx…wTTZ", verbose=True):
...     print(item)
...
{"Cid":"QmVkNdzCBukBRdpyFiKPyL2R15qPExMr9rV9RFV2kf9eeV","Ok":True}
{"Cid":"QmbPzQruAEFjUU3gQfupns6b8USr8VrD9H71GrqGDXQSxm","Ok":True}
{"Cid":"Qmcns1nUvbeWiecdGDPw8JxWeUfxCV8JKhTfgzs3F8JM4P","Ok":True}
…</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>path</strong> (<em>str</em>) -- Path to object(s) to be checked</li> 
        <li><strong>verbose</strong> (<em>bool</em>) -- Also report status of items that were OK? (Default: <code>False</code>)</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><em>iterable</em></p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_40"></span> 
   <h2>移除未钉住的本地对象</h2> 
   <ul> 
    <li><code>repo_gc</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Removes stored objects that are not pinned from the repo.</p> 
   <pre>>>> c.repo_gc()
[{'Key': 'QmNPXDC6wTXVmZ9Uoc8X1oqxRRJr4f1sDuyQuwaHG2mpW2'},
 {'Key': 'QmNtXbF3AjAk59gQKRgEdVabHcSsiPUnJwHnZKyj2x8Z3k'},
 {'Key': 'QmRVBnxUCsD57ic5FksKYadtyUbMsyo9KYQKKELajqAp4q'},
 …
 {'Key': 'QmYp4TeCurXrhsxnzt5wqLqqUz8ZRg5zsc7GuUrUSDtwzP'}]</pre> 
   <p>Performs a garbage collection sweep of the local set of stored objects and remove ones that are not pinned in order to reclaim hard disk space. Returns the hashes of all collected objects.</p> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of IPFS objects that have been removed</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_41"></span> 
   <h2>本地Repo统计</h2> 
   <ul> 
    <li><code>repo_stat</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Displays the repo's status.</p> 
   <p>Returns the number of objects in the repo and the repo's size, version, and path.</p> 
   <pre>>>> c.repo_stat()
{'NumObjects': 354,
 'RepoPath': '…/.local/share/ipfs',
 'Version': 'fs-repo@4',
 'RepoSize': 13789310}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>General information about the IPFS file repository</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <table border="1"> 
    <tbody> 
     <tr> 
      <td>NumObjects</td> 
      <td>Number of objects in the local repo.</td> 
     </tr> 
     <tr> 
      <td>RepoPath</td> 
      <td>The path to the repo being currently used.</td> 
     </tr> 
     <tr> 
      <td>RepoSize</td> 
      <td>Size in bytes that the repo is currently using.</td> 
     </tr> 
     <tr> 
      <td>Version</td> 
      <td>The repo version.</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_42"></span> 
   <h2>显示节点ID</h2> 
   <ul> 
    <li><code>id</code>(<em>peer=None</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Shows IPFS Node ID info.</p> 
   <p>Returns the PublicKey, ProtocolVersion, ID, AgentVersion and Addresses of the connected daemon or some other node.</p> 
   <pre>>>> c.id()
{'ID': 'QmVgNoP89mzpgEAAqK8owYoDEyB97MkcGvoWZir8otE9Uc',
'PublicKey': 'CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggE … BAAE=',
'AgentVersion': 'go-libp2p/3.3.4',
'ProtocolVersion': 'ipfs/0.1.0',
'Addresses': [
    '/ip4/127.0.0.1/tcp/4001/ipfs/QmVgNoP89mzpgEAAqK8owYo … E9Uc',
    '/ip4/10.1.0.172/tcp/4001/ipfs/QmVgNoP89mzpgEAAqK8owY … E9Uc',
    '/ip4/172.18.0.1/tcp/4001/ipfs/QmVgNoP89mzpgEAAqK8owY … E9Uc',
    '/ip6/::1/tcp/4001/ipfs/QmVgNoP89mzpgEAAqK8owYoDEyB97 … E9Uc',
    '/ip6/fccc:7904:b05b:a579:957b:deef:f066:cad9/tcp/400 … E9Uc',
    '/ip6/fd56:1966:efd8::212/tcp/4001/ipfs/QmVgNoP89mzpg … E9Uc',
    '/ip6/fd56:1966:efd8:0:def1:34d0:773:48f/tcp/4001/ipf … E9Uc',
    '/ip6/2001:db8:1::1/tcp/4001/ipfs/QmVgNoP89mzpgEAAqK8 … E9Uc',
    '/ip4/77.116.233.54/tcp/4001/ipfs/QmVgNoP89mzpgEAAqK8 … E9Uc',
    '/ip4/77.116.233.54/tcp/10842/ipfs/QmVgNoP89mzpgEAAqK … E9Uc']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>peer</strong> (<em>str</em>) -- Peer.ID of the node to look up (local node if <code>None</code>)</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Information about the IPFS node</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_43"></span> 
   <h2>初始节点列表</h2> 
   <ul> 
    <li><code>bootstrap</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Compatiblity alias for <code>bootstrap_list()</code>.</p> 
   <ul> 
    <li><code>bootstrap_list</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns the addresses of peers used during initial discovery of the IPFS network.</p> 
   <p>Peers are output in the format <code><multiaddr>/<peerID></code>.</p> 
   <pre>>>> c.bootstrap_list()
{'Peers': [
    '/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYER … uvuJ',
    '/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRa … ca9z',
    '/ip4/104.236.179.241/tcp/4001/ipfs/QmSoLPppuBtQSGwKD … KrGM',
    …
    '/ip4/178.62.61.185/tcp/4001/ipfs/QmSoLMeWqB7YGVLJN3p … QBU3']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of known bootstrap peers</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_44"></span> 
   <h2>初始节点添加</h2> 
   <ul> 
    <li><code>bootstrap_add</code>(<em>peer</em>, <em>*peers</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Adds peers to the bootstrap list.</p> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>peer</strong> (<em>str</em>) -- IPFS MultiAddr of a peer to add to the list</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><em>dict</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_45"></span> 
   <h2>初始节点移除</h2> 
   <p><code>bootstrap_rm</code>(<em>peer</em>, <em>*peers</em>, <em>**kwargs</em>)[source]</p> 
   <p>Removes peers from the bootstrap list.</p> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>peer</strong> (<em>str</em>) -- IPFS MultiAddr of a peer to remove from the list</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><em>dict</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_46"></span> 
   <h2>连接的节点列表</h2> 
   <ul> 
    <li><code>swarm_peers</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns the addresses & IDs of currently connected peers.</p> 
   <pre>>>> c.swarm_peers()
{'Strings': [
    '/ip4/101.201.40.124/tcp/40001/ipfs/QmZDYAhmMDtnoC6XZ … kPZc',
    '/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYER … uvuJ',
    '/ip4/104.223.59.174/tcp/4001/ipfs/QmeWdgoZezpdHz1PX8 … 1jB6',
    …
    '/ip6/fce3: … :f140/tcp/43901/ipfs/QmSoLnSGccFuZQJzRa … ca9z']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of multiaddrs of currently connected peers</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_47"></span> 
   <h2>连接的节点地址</h2> 
   <ul> 
    <li><code>swarm_addrs</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns the addresses of currently connected peers by peer id.</p> 
   <pre>>>> pprint(c.swarm_addrs())
{'Addrs': {
    'QmNMVHJTSZHTWMWBbmBrQgkA1hZPWYuVJx2DpSGESWW6Kn': [
        '/ip4/10.1.0.1/tcp/4001',
        '/ip4/127.0.0.1/tcp/4001',
        '/ip4/51.254.25.16/tcp/4001',
        '/ip6/2001:41d0:b:587:3cae:6eff:fe40:94d8/tcp/4001',
        '/ip6/2001:470:7812:1045::1/tcp/4001',
        '/ip6/::1/tcp/4001',
        '/ip6/fc02:2735:e595:bb70:8ffc:5293:8af8:c4b7/tcp/4001',
        '/ip6/fd00:7374:6172:100::1/tcp/4001',
        '/ip6/fd20:f8be:a41:0:c495:aff:fe7e:44ee/tcp/4001',
        '/ip6/fd20:f8be:a41::953/tcp/4001'],
    'QmNQsK1Tnhe2Uh2t9s49MJjrz7wgPHj4VyrZzjRe8dj7KQ': [
        '/ip4/10.16.0.5/tcp/4001',
        '/ip4/127.0.0.1/tcp/4001',
        '/ip4/172.17.0.1/tcp/4001',
        '/ip4/178.62.107.36/tcp/4001',
        '/ip6/::1/tcp/4001'],
    …
}}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Multiaddrs of peers by peer id</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_48"></span> 
   <h2>打开到给定地址的连接</h2> 
   <ul> 
    <li><code>swarm_connect</code>(<em>address</em>, <em>*addresses</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Opens a connection to a given address.</p> 
   <p>This will open a new direct connection to a peer address. The address format is an IPFS multiaddr:</p> 
   <pre>/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ</pre> 
   <pre>>>> c.swarm_connect("/ip4/104.131.131.82/tcp/4001/ipfs/Qma … uvuJ")
{'Strings': ['connect QmaCpDMGvV2BGHeYERUEnRQAwe3 … uvuJ success']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>address</strong> (<em>str</em>) -- Address of peer to connect to</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Textual connection status report</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_49"></span> 
   <h2>断开到给定地址的连接</h2> 
   <ul> 
    <li><code>swarm_disconnect</code>(<em>address</em>, <em>*addresses</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Closes the connection to a given address.</p> 
   <p>This will close a connection to a peer address. The address format is an IPFS multiaddr:</p> 
   <pre>/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ</pre> 
   <p>The disconnect is not permanent; if IPFS needs to talk to that address later, it will reconnect.</p> 
   <pre>>>> c.swarm_disconnect("/ip4/104.131.131.82/tcp/4001/ipfs/Qm … uJ")
{'Strings': ['disconnect QmaCpDMGvV2BGHeYERUEnRQA … uvuJ success']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>address</strong> (<em>str</em>) -- Address of peer to disconnect from</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Textual connection status report</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_50"></span> 
   <h2>添加过滤器到列表</h2> 
   <ul> 
    <li><code>swarm_filters_add</code>(<em>address</em>, <em>*addresses</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Adds a given multiaddr filter to the filter list.</p> 
   <p>This will add an address filter to the daemons swarm. Filters applied this way will not persist daemon reboots, to achieve that, add your filters to the configuration file.</p> 
   <pre>>>> c.swarm_filters_add("/ip4/192.168.0.0/ipcidr/16")
{'Strings': ['/ip4/192.168.0.0/ipcidr/16']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>address</strong> (<em>str</em>) -- Multiaddr to filter</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of swarm filters added</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_51"></span> 
   <h2>移除过滤器列表</h2> 
   <ul> 
    <li><code>swarm_filters_rm</code>(<em>address</em>, <em>*addresses</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Removes a given multiaddr filter from the filter list.</p> 
   <p>This will remove an address filter from the daemons swarm. Filters removed this way will not persist daemon reboots, to achieve that, remove your filters from the configuration file.</p> 
   <pre>>>> c.swarm_filters_rm("/ip4/192.168.0.0/ipcidr/16")
{'Strings': ['/ip4/192.168.0.0/ipcidr/16']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>address</strong> (<em>str</em>) -- Multiaddr filter to remove</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of swarm filters removed</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_52"></span> 
   <h2>通过查询DHT获得到给定对端ID的最近ID</h2> 
   <ul> 
    <li><code>dht_query</code>(<em>peer_id</em>, <em>*peer_ids</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Finds the closest Peer IDs to a given Peer ID by querying the DHT.</p> 
   <pre>>>> c.dht_query("/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDM … uvuJ")
[{'ID': 'QmPkFbxAQ7DeKD5VGSh9HQrdS574pyNzDmxJeGrRJxoucF',
  'Extra': '', 'Type': 2, 'Responses': None},
 {'ID': 'QmR1MhHVLJSLt9ZthsNNhudb1ny1WdhY4FPW21ZYFWec4f',
  'Extra': '', 'Type': 2, 'Responses': None},
 {'ID': 'Qmcwx1K5aVme45ab6NYWb52K2TFBeABgCLccC7ntUeDsAs',
  'Extra': '', 'Type': 2, 'Responses': None},
 …
 {'ID': 'QmYYy8L3YD1nsF4xtt4xmsc14yqvAAnKksjo3F3iZs5jPv',
  'Extra': '', 'Type': 1, 'Responses': []}]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>peer_id</strong> (<em>str</em>) -- The peerID to run the query against</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of peers IDs</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_53"></span> 
   <h2>在DHT中查找对端中的值</h2> 
   <ul> 
    <li><code>dht_findprovs</code>(<em>multihash</em>, <em>*multihashes</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Finds peers in the DHT that can provide a specific value.</p> 
   <pre>>>> c.dht_findprovs("QmNPXDC6wTXVmZ9Uoc8X1oqxRRJr4f1sDuyQu … mpW2")
[{'ID': 'QmaxqKpiYNr62uSFBhxJAMmEMkT6dvc3oHkrZNpH2VMTLZ',
  'Extra': '', 'Type': 6, 'Responses': None},
 {'ID': 'QmaK6Aj5WXkfnWGoWq7V8pGUYzcHPZp4jKQ5JtmRvSzQGk',
  'Extra': '', 'Type': 6, 'Responses': None},
 {'ID': 'QmdUdLu8dNvr4MVW1iWXxKoQrbG6y1vAVWPdkeGK4xppds',
  'Extra': '', 'Type': 6, 'Responses': None},
 …
 {'ID': '', 'Extra': '', 'Type': 4, 'Responses': [
    {'ID': 'QmVgNoP89mzpgEAAqK8owYoDEyB97Mk … E9Uc', 'Addrs': None}
  ]},
 {'ID': 'QmaxqKpiYNr62uSFBhxJAMmEMkT6dvc3oHkrZNpH2VMTLZ',
  'Extra': '', 'Type': 1, 'Responses': [
    {'ID': 'QmSHXfsmN3ZduwFDjeqBn1C8b1tcLkxK6yd … waXw', 'Addrs': [
        '/ip4/127.0.0.1/tcp/4001',
        '/ip4/172.17.0.8/tcp/4001',
        '/ip6/::1/tcp/4001',
        '/ip4/52.32.109.74/tcp/1028'
      ]}
  ]}]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- The DHT key to find providers for</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of provider Peer IDs</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_54"></span> 
   <h2>查找DHT找到关联的地址</h2> 
   <ul> 
    <li><code>dht_findpeer</code>(<em>peer_id</em>, <em>*peer_ids</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Queries the DHT for all of the associated multiaddresses.</p> 
   <pre>>>> c.dht_findpeer("QmaxqKpiYNr62uSFBhxJAMmEMkT6dvc3oHkrZN … MTLZ")
[{'ID': 'QmfVGMFrwW6AV6fTWmD6eocaTybffqAvkVLXQEFrYdk6yc',
  'Extra': '', 'Type': 6, 'Responses': None},
 {'ID': 'QmTKiUdjbRjeN9yPhNhG1X38YNuBdjeiV9JXYWzCAJ4mj5',
  'Extra': '', 'Type': 6, 'Responses': None},
 {'ID': 'QmTGkgHSsULk8p3AKTAqKixxidZQXFyF7mCURcutPqrwjQ',
  'Extra': '', 'Type': 6, 'Responses': None},
 …
 {'ID': '', 'Extra': '', 'Type': 2,
  'Responses': [
    {'ID': 'QmaxqKpiYNr62uSFBhxJAMmEMkT6dvc3oHkrZNpH2VMTLZ',
     'Addrs': [
        '/ip4/10.9.8.1/tcp/4001',
        '/ip6/::1/tcp/4001',
        '/ip4/164.132.197.107/tcp/4001',
        '/ip4/127.0.0.1/tcp/4001']}
  ]}]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>peer_id</strong> (<em>str</em>) -- The ID of the peer to search for</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of multiaddrs</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_55"></span> 
   <h2>查找DHT获得给定key的最佳值</h2> 
   <ul> 
    <li><code>dht_get</code>(<em>key</em>, <em>*keys</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Queries the DHT for its best value related to given key.</p> 
   <p>There may be several different values for a given key stored in the DHT; in this context <em>best</em> means the record that is most desirable. There is no one metric for <em>best</em>: it depends entirely on the key type. For IPNS, <em>best</em> is the record that is both valid and has the highest sequence number (freshest). Different key types may specify other rules for they consider to be the <em>best</em>.</p> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>key</strong> (<em>str</em>) -- One or more keys whose values should be looked up</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><em>str</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_56"></span> 
   <h2>向DHT中写入键值对</h2> 
   <ul> 
    <li><code>dht_put</code>(<em>key</em>, <em>value</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Writes a key/value pair to the DHT.</p> 
   <p>Given a key of the form <code>/foo/bar</code> and a value of any form, this will write that value to the DHT with that key.</p> 
   <p>Keys have two parts: a keytype (foo) and the key name (bar). IPNS uses the <code>/ipns/</code> keytype, and expects the key name to be a Peer ID. IPNS entries are formatted with a special strucutre.</p> 
   <p>You may only use keytypes that are supported in your <code>ipfs</code> binary: <code>go-ipfs</code> currently only supports the <code>/ipns/</code> keytype. Unless you have a relatively deep understanding of the key's internal structure, you likely want to be using the <code>name_publish()</code> instead.</p> 
   <p>Value is arbitrary text.</p> 
   <pre>>>> c.dht_put("QmVgNoP89mzpgEAAqK8owYoDEyB97Mkc … E9Uc", "test123")
[{'ID': 'QmfLy2aqbhU1RqZnGQyqHSovV8tDufLUaPfN1LNtg5CvDZ',
  'Extra': '', 'Type': 5, 'Responses': None},
 {'ID': 'QmZ5qTkNvvZ5eFq9T4dcCEK7kX8L7iysYEpvQmij9vokGE',
  'Extra': '', 'Type': 5, 'Responses': None},
 {'ID': 'QmYqa6QHCbe6eKiiW6YoThU5yBy8c3eQzpiuW22SgVWSB8',
  'Extra': '', 'Type': 6, 'Responses': None},
 …
 {'ID': 'QmP6TAKVDCziLmx9NV8QGekwtf7ZMuJnmbeHMjcfoZbRMd',
  'Extra': '', 'Type': 1, 'Responses': []}]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>key</strong> (<em>str</em>) -- A unique identifier</li> 
        <li><strong>value</strong> (<em>str</em>) -- Abitrary text to associate with the input (2048 bytes or less)</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><em>list</em></p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_57"></span> 
   <h2>测试对端的路由</h2> 
   <ul> 
    <li><code>ping</code>(<em>peer</em>, <em>*peers</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Provides round-trip latency information for the routing system.</p> 
   <p>Finds nodes via the routing system, sends pings, waits for pongs, and prints out round-trip latency information.</p> 
   <pre>>>> c.ping("QmTzQ1JRkWErjk39mryYw2WVaphAZNAREyMchXzYQ7c15n")
[{'Success': True,  'Time': 0,
  'Text': 'Looking up peer QmTzQ1JRkWErjk39mryYw2WVaphAZN … c15n'},
 {'Success': False, 'Time': 0,
  'Text': 'Peer lookup error: routing: not found'}]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>peer</strong> (<em>str</em>) -- ID of peer to be pinged</li> 
        <li><strong>count</strong> (<em>int</em>) -- Number of ping messages to send (Default: <code>10</code>)</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>list</strong> (<em>Progress reports from the ping</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_58"></span> 
   <h2>配置变量</h2> 
   <ul> 
    <li><code>config</code>(<em>key</em>, <em>value=None</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Controls configuration variables.</p> 
   <pre>>>> c.config("Addresses.Gateway")
{'Key': 'Addresses.Gateway', 'Value': '/ip4/127.0.0.1/tcp/8080'}
>>> c.config("Addresses.Gateway", "/ip4/127.0.0.1/tcp/8081")
{'Key': 'Addresses.Gateway', 'Value': '/ip4/127.0.0.1/tcp/8081'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>key</strong> (<em>str</em>) -- The key of the configuration entry (e.g. "Addresses.API")</li> 
        <li><strong>value</strong> (<em>dict</em>) -- The value to set the configuration entry to</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Requested/updated key and its (new) value</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_59"></span> 
   <h2>显示配置信息</h2> 
   <ul> 
    <li><code>config_show</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns a dict containing the server's configuration.</p> 
   <p>Warning</p> 
   <p>The configuration file contains private key data that must be handled with care.</p> 
   <pre>>>> config = c.config_show()
>>> config['Addresses']
{'API': '/ip4/127.0.0.1/tcp/5001',
 'Gateway': '/ip4/127.0.0.1/tcp/8080',
 'Swarm': ['/ip4/0.0.0.0/tcp/4001', '/ip6/::/tcp/4001']},
>>> config['Discovery']
{'MDNS': {'Enabled': True, 'Interval': 10}}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>The entire IPFS daemon configuration</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_60"></span> 
   <h2>配置替换</h2> 
   <ul> 
    <li><code>config_replace</code>(<em>*args</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Replaces the existing config with a user-defined config.</p> 
   <p>Make sure to back up the config file first if neccessary, as this operation can't be undone.</p> 
   <span id="OSC_h2_61"></span> 
   <h2>日志级别</h2> 
   <ul> 
    <li><code>log_level</code>(<em>subsystem</em>, <em>level</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Changes the logging output of a running daemon.</p> 
   <pre>>>> c.log_level("path", "info")
{'Message': "Changed log level of 'path' to 'info'\n"}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>subsystem</strong> (<em>str</em>) -- The subsystem logging identifier (Use <code>"all"</code> for all subsystems)</li> 
        <li><strong>level</strong> (<em>str</em>) -- <p>The desired logging level. Must be one of:</p> 
         <blockquote> 
          <ul> 
           <li><code>"debug"</code></li> 
           <li><code>"info"</code></li> 
           <li><code>"warning"</code></li> 
           <li><code>"error"</code></li> 
           <li><code>"fatal"</code></li> 
           <li><code>"panic"</code></li> 
          </ul> 
         </blockquote> </li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>dict</strong> (<em>Status message</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_62"></span> 
   <h2>日志子系统列表</h2> 
   <ul> 
    <li><code>log_ls</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Lists the logging subsystems of a running daemon.</p> 
   <pre>>>> c.log_ls()
{'Strings': [
    'github.com/ipfs/go-libp2p/p2p/host', 'net/identify',
    'merkledag', 'providers', 'routing/record', 'chunk', 'mfs',
    'ipns-repub', 'flatfs', 'ping', 'mockrouter', 'dagio',
    'cmds/files', 'blockset', 'engine', 'mocknet', 'config',
    'commands/http', 'cmd/ipfs', 'command', 'conn', 'gc',
    'peerstore', 'core', 'coreunix', 'fsrepo', 'core/server',
    'boguskey', 'github.com/ipfs/go-libp2p/p2p/host/routed',
    'diagnostics', 'namesys', 'fuse/ipfs', 'node', 'secio',
    'core/commands', 'supernode', 'mdns', 'path', 'table',
    'swarm2', 'peerqueue', 'mount', 'fuse/ipns', 'blockstore',
    'github.com/ipfs/go-libp2p/p2p/host/basic', 'lock', 'nat',
    'importer', 'corerepo', 'dht.pb', 'pin', 'bitswap_network',
    'github.com/ipfs/go-libp2p/p2p/protocol/relay', 'peer',
    'transport', 'dht', 'offlinerouting', 'tarfmt', 'eventlog',
    'ipfsaddr', 'github.com/ipfs/go-libp2p/p2p/net/swarm/addr',
    'bitswap', 'reprovider', 'supernode/proxy', 'crypto', 'tour',
    'commands/cli', 'blockservice']}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>List of daemon logging subsystems</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_63"></span> 
   <h2>读取日志的输出</h2> 
   <ul> 
    <li><code>log_tail</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Reads log outputs as they are written.</p> 
   <p>This function returns a reponse object that can be iterated over by the user. The user should make sure to close the response object when they are done reading from it.</p> 
   <pre>>>> for item in c.log_tail():
...     print(item)
...
{"event":"updatePeer","system":"dht",
 "peerID":"QmepsDPxWtLDuKvEoafkpJxGij4kMax11uTH7WnKqD25Dq",
 "session":"7770b5e0-25ec-47cd-aa64-f42e65a10023",
 "time":"2016-08-22T13:25:27.43353297Z"}
{"event":"handleAddProviderBegin","system":"dht",
 "peer":"QmepsDPxWtLDuKvEoafkpJxGij4kMax11uTH7WnKqD25Dq",
 "session":"7770b5e0-25ec-47cd-aa64-f42e65a10023",
 "time":"2016-08-22T13:25:27.433642581Z"}
{"event":"handleAddProvider","system":"dht","duration":91704,
 "key":"QmNT9Tejg6t57Vs8XM2TVJXCwevWiGsZh3kB4HQXUZRK1o",
 "peer":"QmepsDPxWtLDuKvEoafkpJxGij4kMax11uTH7WnKqD25Dq",
 "session":"7770b5e0-25ec-47cd-aa64-f42e65a10023",
 "time":"2016-08-22T13:25:27.433747513Z"}
{"event":"updatePeer","system":"dht",
 "peerID":"QmepsDPxWtLDuKvEoafkpJxGij4kMax11uTH7WnKqD25Dq",
 "session":"7770b5e0-25ec-47cd-aa64-f42e65a10023",
 "time":"2016-08-22T13:25:27.435843012Z"}
…</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><em>iterable</em></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_64"></span> 
   <h2>版本信息</h2> 
   <ul> 
    <li><code>version</code>(<em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns the software version of the currently connected node.</p> 
   <pre>>>> c.version()
{'Version': '0.4.3-rc2', 'Repo': '4', 'Commit': '',
 'System': 'amd64/linux', 'Golang': 'go1.6.2'}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Daemon and system version information</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_65"></span> 
   <h2>拷贝文件</h2> 
   <ul> 
    <li><code>files_cp</code>(<em>source</em>, <em>dest</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Copies files within the MFS.</p> 
   <p>Due to the nature of IPFS this will not actually involve any of the file's content being copied.</p> 
   <pre>>>> c.files_ls("/")
{'Entries': [
    {'Size': 0, 'Hash': '', 'Name': 'Software', 'Type': 0},
    {'Size': 0, 'Hash': '', 'Name': 'test', 'Type': 0}
]}
>>> c.files_cp("/test", "/bla")
''
>>> c.files_ls("/")
{'Entries': [
    {'Size': 0, 'Hash': '', 'Name': 'Software', 'Type': 0},
    {'Size': 0, 'Hash': '', 'Name': 'bla', 'Type': 0},
    {'Size': 0, 'Hash': '', 'Name': 'test', 'Type': 0}
]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>source</strong> (<em>str</em>) -- Filepath within the MFS to copy from</li> 
        <li><strong>dest</strong> (<em>str</em>) -- Destination filepath with the MFS to which the file will be copied to</li> 
       </ul></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_66"></span> 
   <h2>文件列表</h2> 
   <ul> 
    <li><code>files_ls</code>(<em>path</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Lists contents of a directory in the MFS.</p> 
   <pre>>>> c.files_ls("/")
{'Entries': [
    {'Size': 0, 'Hash': '', 'Name': 'Software', 'Type': 0}
]}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>path</strong> (<em>str</em>) -- Filepath within the MFS</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>Directory entries</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_67"></span> 
   <h2>创建目录</h2> 
   <ul> 
    <li><code>files_mkdir</code>(<em>path</em>, <em>parents=False</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Creates a directory within the MFS.</p> 
   <pre>>>> c.files_mkdir("/test")
b''</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>path</strong> (<em>str</em>) -- Filepath within the MFS</li> 
        <li><strong>parents</strong> (<em>bool</em>) -- Create parent directories as needed and do not raise an exception if the requested directory already exists</li> 
       </ul></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_68"></span> 
   <h2>文件统计</h2> 
   <ul> 
    <li><code>files_stat</code>(<em>path</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Returns basic <code>stat</code> information for an MFS file (including its hash).</p> 
   <pre>>>> c.files_stat("/test")
{'Hash': 'QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn',
 'Size': 0, 'CumulativeSize': 4, 'Type': 'directory', 'Blocks': 0}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>path</strong> (<em>str</em>) -- Filepath within the MFS</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>dict</strong> (<em>MFS file information</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_69"></span> 
   <h2>文件删除</h2> 
   <ul> 
    <li><code>files_rm</code>(<em>path</em>, <em>recursive=False</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Removes a file from the MFS.</p> 
   <pre>>>> c.files_rm("/bla/file")
b''</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>path</strong> (<em>str</em>) -- Filepath within the MFS</li> 
        <li><strong>recursive</strong> (<em>bool</em>) -- Recursively remove directories?</li> 
       </ul></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_70"></span> 
   <h2>文件读取</h2> 
   <ul> 
    <li><code>files_read</code>(<em>path</em>, <em>offset=0</em>, <em>count=None</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Reads a file stored in the MFS.</p> 
   <pre>>>> c.files_read("/bla/file")
b'hi'</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>path</strong> (<em>str</em>) -- Filepath within the MFS</li> 
        <li><strong>offset</strong> (<em>int</em>) -- Byte offset at which to begin reading at</li> 
        <li><strong>count</strong> (<em>int</em>) -- Maximum number of bytes to read</li> 
       </ul></td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td> <p><strong>str</strong> (<em>MFS file contents</em>)</p> </td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_71"></span> 
   <h2>文件写入</h2> 
   <ul> 
    <li><code>files_write</code>(<em>path</em>, <em>file</em>, <em>offset=0</em>, <em>create=False</em>, <em>truncate=False</em>, <em>count=None</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Writes to a mutable file in the MFS.</p> 
   <pre>>>> c.files_write("/test/file", io.BytesIO(b"hi"), create=True)
b''</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>path</strong> (<em>str</em>) -- Filepath within the MFS</li> 
        <li><strong>file</strong> (<em>io.RawIOBase</em>) -- IO stream object with data that should be written</li> 
        <li><strong>offset</strong> (<em>int</em>) -- Byte offset at which to begin writing at</li> 
        <li><strong>create</strong> (<em>bool</em>) -- Create the file if it does not exist</li> 
        <li><strong>truncate</strong> (<em>bool</em>) -- Truncate the file to size zero before writing</li> 
        <li><strong>count</strong> (<em>int</em>) -- Maximum number of bytes to read from the source <code>file</code></li> 
       </ul></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_72"></span> 
   <h2>文件删除</h2> 
   <ul> 
    <li><code>files_mv</code>(<em>source</em>, <em>dest</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Moves files and directories within the MFS.</p> 
   <pre>>>> c.files_mv("/test/file", "/bla/file")
b''</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td> 
       <ul> 
        <li><strong>source</strong> (<em>str</em>) -- Existing filepath within the MFS</li> 
        <li><strong>dest</strong> (<em>str</em>) -- Destination to which the file will be moved in the MFS</li> 
       </ul></td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_73"></span> 
   <h2>下线IPFS服务</h2> 
   <ul> 
    <li><code>shutdown</code>()[source]</li> 
   </ul> 
   <p>Stop the connected IPFS daemon instance.</p> 
   <p>Sending any further requests after this will fail with <code>ipfsapi.exceptions.ConnectionError</code>, until you start another IPFS daemon instance.</p> 
   <p><code>add_bytes</code>(<em>data</em>, <em>**kwargs</em>)[source]</p> 
   <p>Adds a set of bytes as a file to IPFS.</p> 
   <pre>>>> c.add_bytes(b"Mary had a little lamb")
'QmZfF6C9j4VtoCsTp4KSrhYH47QMd3DNXVZBKaxJdhaPab'</pre> 
   <p>Also accepts and will stream generator objects.</p> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>data</strong> (<em>bytes</em>) -- Content to be added as a file</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>str</strong> (<em>Hash of the added IPFS object</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_74"></span> 
   <h2>添加字符串作为IPFS对象</h2> 
   <ul> 
    <li><code>add_str</code>(<em>string</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Adds a Python string as a file to IPFS.</p> 
   <pre>>>> c.add_str(u"Mary had a little lamb")
'QmZfF6C9j4VtoCsTp4KSrhYH47QMd3DNXVZBKaxJdhaPab'</pre> 
   <p>Also accepts and will stream generator objects.</p> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>string</strong> (<em>str</em>) -- Content to be added as a file</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>str</strong> (<em>Hash of the added IPFS object</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_75"></span> 
   <h2>添加JSON作为IPFS对象</h2> 
   <ul> 
    <li><code>add_json</code>(<em>json_obj</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Adds a json-serializable Python dict as a json file to IPFS.</p> 
   <pre>>>> c.add_json({'one': 1, 'two': 2, 'three': 3})
'QmVz9g7m5u3oHiNKHj2CJX1dbG1gtismRS3g9NaPBBLbob'</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>json_obj</strong> (<em>dict</em>) -- A json-serializable Python dictionary</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>str</strong> (<em>Hash of the added IPFS object</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_76"></span> 
   <h2>获取JSON对象</h2> 
   <ul> 
    <li><code>get_json</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Loads a json object from IPFS.</p> 
   <pre>>>> c.get_json('QmVz9g7m5u3oHiNKHj2CJX1dbG1gtismRS3g9NaPBBLbob')
{'one': 1, 'two': 2, 'three': 3}</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- Multihash of the IPFS object to load</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>object</strong> (<em>Deserialized IPFS JSON object value</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_77"></span> 
   <h2>添加Python对象到IPFS</h2> 
   <ul> 
    <li><code>add_pyobj</code>(<em>py_obj</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Adds a picklable Python object as a file to IPFS.</p> 
   <p>Deprecated since version 0.4.2: The <code>*_pyobj</code> APIs allow for arbitrary code execution if abused. Either switch to <code>add_json()</code> or use <code>client.add_bytes(pickle.dumps(py_obj))</code> instead.</p> 
   <p>Please see <code>get_pyobj()</code> for the <strong>security risks</strong> of using these methods!</p> 
   <pre>>>> c.add_pyobj([0, 1.0, 2j, '3', 4e5])
'QmWgXZSUTNNDD8LdkdJ8UXSn55KfFnNvTP1r7SyaQd74Ji'</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>py_obj</strong> (<em>object</em>) -- A picklable Python object</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>str</strong> (<em>Hash of the added IPFS object</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <span id="OSC_h2_78"></span> 
   <h2>获取Python对象</h2> 
   <ul> 
    <li><code>get_pyobj</code>(<em>multihash</em>, <em>**kwargs</em>)[source]</li> 
   </ul> 
   <p>Loads a pickled Python object from IPFS.</p> 
   <p>Deprecated since version 0.4.2: The <code>*_pyobj</code> APIs allow for arbitrary code execution if abused. Either switch to <code>get_json()</code> or use <code>pickle.loads(client.cat(multihash))</code> instead.</p> 
   <p>注意</p> 
   <p>The pickle module is not intended to be secure against erroneous or maliciously constructed data. Never unpickle data received from an untrusted or unauthenticated source.</p> 
   <p>Please <strong>read</strong> this article to understand the security risks of using this method!</p> 
   <pre>>>> c.get_pyobj('QmWgXZSUTNNDD8LdkdJ8UXSn55KfFnNvTP1r7SyaQd74Ji')
[0, 1.0, 2j, '3', 400000.0]</pre> 
   <table> 
    <tbody> 
     <tr> 
      <th>Parameters:</th> 
      <td><strong>multihash</strong> (<em>str</em>) -- Multihash of the IPFS object to load</td> 
     </tr> 
     <tr> 
      <th>Returns:</th> 
      <td><strong>object</strong> (<em>Deserialized IPFS Python object</em>)</td> 
     </tr> 
    </tbody> 
   </table> 
   <div class="ad-wrap"> 
    <div id="blog-title-ad"> 
     <ins class="adsbygoogle"></ins> 
    </div> 
   </div> 
  </div> 
  <p>转载于:https://my.oschina.net/u/2306127/blog/1936848</p> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1293904560410140672"></div>
                    <script type="text/javascript" src="/views/front/js/chanyan.js"></script>
                    <!-- 文章页-底部 动态广告位 -->
                    <div class="youdao-fixed-ad" id="detail_ad_bottom"></div>
                </div>
                <div class="col-md-3">
                    <div class="row" id="ad">
                        <!-- 文章页-右侧1 动态广告位 -->
                        <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_1"> </div>
                        </div>
                        <!-- 文章页-右侧2 动态广告位 -->
                        <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_2"></div>
                        </div>
                        <!-- 文章页-右侧3 动态广告位 -->
                        <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_3"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(IPFS 服务的Python API参考)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1950233451282100224.htm"
                           title="python 读excel每行替换_Python脚本操作Excel实现批量替换功能" target="_blank">python 读excel每行替换_Python脚本操作Excel实现批量替换功能</a>
                        <span class="text-muted">weixin_39646695</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E8%AF%BBexcel%E6%AF%8F%E8%A1%8C%E6%9B%BF%E6%8D%A2/1.htm">读excel每行替换</a>
                        <div>Python脚本操作Excel实现批量替换功能大家好,给大家分享下如何使用Python脚本操作Excel实现批量替换。使用的工具Openpyxl,一个处理excel的python库,处理excel,其实针对的就是WorkBook,Sheet,Cell这三个最根本的元素~明确需求原始excel如下我们的目标是把下面excel工作表的sheet1表页A列的内容“替换我吧”批量替换为B列的“我用来替换的</div>
                    </li>
                    <li><a href="/article/1950233199242178560.htm"
                           title="x86-64汇编语言训练程序与实战" target="_blank">x86-64汇编语言训练程序与实战</a>
                        <span class="text-muted">十除以十等于一</span>

                        <div>本文还有配套的精品资源,点击获取简介:汇编语言是一种低级语言,与机器代码紧密相关,特别适用于编写系统级代码及性能要求高的应用。nasm编译器是针对x86和x86-64架构的汇编语言编译器,支持多种语法风格和指令集。项目Euler提供数学和计算机科学问题,鼓励编程技巧应用,前100个问题的答案可共享。x86-64架构扩展了寄存器数量并引入新指令,提升了数据处理效率。学习汇编语言能够深入理解计算机底层</div>
                    </li>
                    <li><a href="/article/1950233167633903616.htm"
                           title="男士护肤品哪个牌子好?十大男士护肤品排行榜" target="_blank">男士护肤品哪个牌子好?十大男士护肤品排行榜</a>
                        <span class="text-muted">高省APP珊珊</span>

                        <div>很多男生意识到护肤的必要性,开始着手护肤,但不知道该选哪个男士护肤品品牌使用好。目前市面上很多男士护肤品品牌,可谓琳琅满目,让人眼花缭乱。男士挑选护肤品时,根据自己皮肤需求去正规渠道挑选合适的知名护肤品比较放心靠谱。高省APP,是2021年推出的平台,0投资,0风险、高省APP佣金更高,模式更好,终端用户不流失。【高省】是一个自用省钱佣金高,分享推广赚钱多的平台,百度有几百万篇报道,也期待你的加入</div>
                    </li>
                    <li><a href="/article/1950233072825856000.htm"
                           title="三菱PLC全套学习资料及应用手册" target="_blank">三菱PLC全套学习资料及应用手册</a>
                        <span class="text-muted">good2know</span>

                        <div>本文还有配套的精品资源,点击获取简介:三菱PLC作为工业自动化领域的核心设备,其系列产品的学习和应用需要全面深入的知识。本次资料包为学习者提供从基础到进阶的全方位学习资源,包括各种型号PLC的操作手册、编程指南、软件操作教程以及实际案例分析,旨在帮助用户系统掌握PLC的编程语言、指令系统及在各类工业应用中的实施。1.三菱PLC基础知识入门1.1PLC的基本概念可编程逻辑控制器(PLC)是工业自动化</div>
                    </li>
                    <li><a href="/article/1950233040592629760.htm"
                           title="2022-10-20" target="_blank">2022-10-20</a>
                        <span class="text-muted">体力劳动者</span>

                        <div>不因感觉稍纵即逝就不加记录。在女儿睡觉后我记下今天的小故事。接手新班级后,今天是第二次收到家长的感谢信(微信)。是我表扬次数最多的两位学生家长致来的感谢,他们明显感受到孩子自信、阳光了不少,写作业由被动变为了主动,家庭氛围也由鸡飞狗跳变成了其乐融融。在被顽皮的学生气得头晕之后,我感到了久违的价值感,责任感甚至使命感,我回复家长这样一句话:我们也需要家长的反馈好让我们的教育工作更有劲头。我也认识到,</div>
                    </li>
                    <li><a href="/article/1950232912192401408.htm"
                           title="程翔授《评价一篇记叙文》" target="_blank">程翔授《评价一篇记叙文》</a>
                        <span class="text-muted">行吟斯基</span>

                        <div>桂林十一中高一2中学生自读程老师学生文章板书课题师巡看。看完举手。问:它是记叙文。不商量。独立打分。学生评价打分。师:高低都正常,不受干扰。师巡,略评。打完举手。调查:分层次举手——高分先举手。最低分。最高95分。最低45分。女:差距太大!师:同一篇,相差55分。若是你的文章,愿落谁手?男:身临其境感觉。师:你有此经历?没也没关系。女:不优美……,结尾无升华……无感悟……师:辞藻不美?(师追问)男</div>
                    </li>
                    <li><a href="/article/1950232910862807040.htm"
                           title="《玉骨遥》:大司命为什么不杀朱颜?原因没那么简单" target="_blank">《玉骨遥》:大司命为什么不杀朱颜?原因没那么简单</a>
                        <span class="text-muted">windy天意晚晴</span>

                        <div>《玉骨遥》里,朱颜就是时影的命劫之人。重明与时影早就知道,他们一直瞒着大司命,如今大司命也知道了真相。可是大司命却没有杀朱颜,而是给朱颜下了诛心咒,还说时影的命劫已经破了,真的如此吗?1、计划总是赶不上变化的大司命从目前剧情来说,大司命还不如时影,他信心十足的事情总会有纰漏。他不让时影见命劫之女,结果时影还是遇上了。他想让时影走火入魔,一心复仇,结果时影在朱颜的劝说下放下了仇恨。大司命让时影开山收</div>
                    </li>
                    <li><a href="/article/1950232820773351424.htm"
                           title="移动端城市区县二级联动选择功能实现包" target="_blank">移动端城市区县二级联动选择功能实现包</a>
                        <span class="text-muted">good2know</span>

                        <div>本文还有配套的精品资源,点击获取简介:本项目是一套为移动端设计的jQuery实现方案,用于简化用户在选择城市和区县时的流程。它包括所有必需文件:HTML、JavaScript、CSS及图片资源。通过动态更新下拉菜单选项,实现城市到区县的联动效果,支持数据异步加载。开发者可以轻松集成此功能到移动网站或应用,并可基于需求进行扩展和优化。1.jQuery移动端解决方案概述jQuery技术简介jQuery</div>
                    </li>
                    <li><a href="/article/1950232782412247040.htm"
                           title="日更006 终极训练营day3" target="_blank">日更006 终极训练营day3</a>
                        <span class="text-muted">懒cici</span>

                        <div>人生创业课(2)今天的主题:学习方法一:遇到有用的书,反复读,然后结合自身实际,列践行清单,不要再写读书笔记思考这本书与我有什么关系,我在哪些地方能用到,之后我该怎么用方法二:读完书没映像怎么办?训练你的大脑,方法:每读完一遍书,立马合上书,做一场分享,几分钟都行对自己的学习要求太低,要逼自己方法三:学习深度不够怎么办?找到细分领域的榜样,把他们的文章、书籍、产品都体验一遍,成为他们的超级用户,向</div>
                    </li>
                    <li><a href="/article/1950232783670538240.htm"
                           title="自律打卡第四天:比昨天进步一点点" target="_blank">自律打卡第四天:比昨天进步一点点</a>
                        <span class="text-muted">花儿的念想</span>

                        <div>今天新闻我们县城又确诊了一例,截止目前已经确诊的三例了,打开,看了一篇简友写的武汉的真实情况,有病住不了院,还没等到床位已经去世的消息,心里更加的难受,武汉尚且这样,如果是我们这没有高速没有火车的十八线的小县城发生这种情况,那情况将是更加的不堪设想,不敢想,唯有祈求灾难早点快去,平安才是最大的福气。突然觉得我的自律打卡,比昨天进步一点点。更希望疫情战争每一天都要比昨天好一点,希望一觉醒来听到的是好</div>
                    </li>
                    <li><a href="/article/1950232781174927360.htm"
                           title="15个小技巧,让我的Windows电脑更好用了!" target="_blank">15个小技巧,让我的Windows电脑更好用了!</a>
                        <span class="text-muted">曹元_</span>

                        <div>01.桌面及文档处理第一部分的技巧,主要是围绕桌面的一些基本操作,包括主题设置、常用文档文件快捷打开的多种方式等等。主题换色默认情况下,我们的Win界面可能就是白色的文档界面,天蓝色的图表背景,说不出哪里不好看,但是就是觉得不够高级。imageimage说到高级感,本能第一反应就会和暗色模式联想起来,如果我们将整个界面换成黑夜模式的话,它会是这样的。imageimage更改主题颜色及暗色模式,我们</div>
                    </li>
                    <li><a href="/article/1950232316974526464.htm"
                           title="(二)SAP Group Reporting (GR) 核心子模块功能及数据流向架构解析" target="_blank">(二)SAP Group Reporting (GR) 核心子模块功能及数据流向架构解析</a>
                        <span class="text-muted"></span>

                        <div>数据如何从子公司流转到合并报表的全过程,即数据采集→合并引擎→报表输出,特别是HANA内存计算如何优化传统ETL瓶颈。SAPGroupReporting(GR)核心模块功能及数据流向的架构解析,涵盖核心组件、数据处理流程和关键集成点,适用于S/4HANA1809+版本:一、核心功能模块概览模块功能关键事务码/FioriApp数据采集(DataCollection)整合子公司财务数据(SAP/非SA</div>
                    </li>
                    <li><a href="/article/1950232316408295424.htm"
                           title="9、汇编语言编程入门:从环境搭建到简单程序实现" target="_blank">9、汇编语言编程入门:从环境搭建到简单程序实现</a>
                        <span class="text-muted">神经网络酱</span>
<a class="tag" taget="_blank" href="/search/%E6%B1%87%E7%BC%96%E8%AF%AD%E8%A8%80/1.htm">汇编语言</a><a class="tag" taget="_blank" href="/search/MEPIS/1.htm">MEPIS</a><a class="tag" taget="_blank" href="/search/GNU%E5%B7%A5%E5%85%B7%E9%93%BE/1.htm">GNU工具链</a>
                        <div>汇编语言编程入门:从环境搭建到简单程序实现1.数据存储介质问题解决在处理数据存储时,若要使用MEPIS系统,需确保有其可访问的存储介质。目前,MEPIS无法向采用NTFS格式(常用于Windows2000和XP工作站)的硬盘写入数据。不过,若硬盘采用FAT32格式,MEPIS就能进行写入操作。此外,MEPIS还能将文件写入软盘和大多数USB闪存驱动器。若工作站连接到局域网,还可通过FTP协议或挂载</div>
                    </li>
                    <li><a href="/article/1950232275262173184.htm"
                           title="月光下的罪恶(5)" target="_blank">月光下的罪恶(5)</a>
                        <span class="text-muted">允歌玖沐</span>

                        <div>5.被孤立顾纨是转校过来的,进入学校后,回头率很高“诶诶诶,你看那女生,哪个系的?”“不知道没见过。”“看那样,一看就是个胆小的货。”顾纨当做没听到,更狠的话她都听过,更何况女生们耍心眼?“他爸爸是做黑生意的,估计女儿也不是什么好的,你以后离他一家子远点。”她走向自己要上课的教室,一进门,所有人的目光看向她,顾纨若无其事的走进教室,开始上课。下课,一群人站起来,但是很显然,她周围的一圈人都不愿意和</div>
                    </li>
                    <li><a href="/article/1950232190038110208.htm"
                           title="day15|前端框架学习和算法" target="_blank">day15|前端框架学习和算法</a>
                        <span class="text-muted">universe_01</span>
<a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E7%AC%94%E8%AE%B0/1.htm">笔记</a>
                        <div>T22括号生成先把所有情况都画出来,然后(在满足什么情况下)把不符合条件的删除。T78子集要画树状图,把思路清晰。可以用暴力法、回溯法和DFS做这个题DFS深度搜索:每个边都走完,再回溯应用:二叉树搜索,图搜索回溯算法=DFS+剪枝T200岛屿数量(非常经典BFS宽度把树状转化成队列形式,lambda匿名函数“一次性的小函数,没有名字”setup语法糖:让代码更简洁好写的语法ref创建:基本类型的</div>
                    </li>
                    <li><a href="/article/1950231640819167232.htm"
                           title="贝多芬诞辰250周年纪念" target="_blank">贝多芬诞辰250周年纪念</a>
                        <span class="text-muted">万千星河赴远方</span>

                        <div>就算不是古典音乐爱好者,你也一定听说过贝多芬。作为古典音乐史上最伟大的音乐家之一,他不仅是古典主义风格的集大成者,同时也是浪漫主义风格的开创者。贝多芬肖像画(1813年)贝多芬的一生共创作了9部交响曲、36首钢琴奏鸣曲、10部小提琴奏鸣曲、16首弦乐四重奏、1部歌剧及2部弥撒曲等等。数量虽然不及前辈海顿、莫扎特多,但他几乎改造了当时所有的音乐表达形式,赋予了它们全新的价值,对后世音乐的发展产生了极</div>
                    </li>
                    <li><a href="/article/1950231513744338944.htm"
                           title="IK分词" target="_blank">IK分词</a>
                        <span class="text-muted">初心myp</span>

                        <div>实现简单的分词功能,智能化分词添加依赖配置:4.10.4org.apache.lucenelucene-core${lucene.version}org.apache.lucenelucene-analyzers-common${lucene.version}org.apache.lucenelucene-queryparser${lucene.version}org.apache.lucenel</div>
                    </li>
                    <li><a href="/article/1950231508648259584.htm"
                           title="三件事—小白猫·雨天·八段锦" target="_blank">三件事—小白猫·雨天·八段锦</a>
                        <span class="text-muted">咸鱼月亮</span>

                        <div>1.最近楼下出现一只非常漂亮的粘人小白猫,看着不像是流浪猫,非常亲人。眼睛比蓝球的还大,而且是绿色的,很漂亮。第一次遇到它,它就跟我到电梯口,如果我稍微招招手,肯定就跟我进电梯了。后来我喂过它几次,好可惜不能养它,一只蓝球就是我的极限了。2.下雨天就心烦,好奇怪。明明以前我超爱看窗外的雨和听雨声,看来近来的心情不够宁静了。3.最近在练八段锦,从第一次就爱上了这个运动,很轻松缓慢,但是却出汗。感觉可</div>
                    </li>
                    <li><a href="/article/1950231509906550784.htm"
                           title="25-1-2019" target="_blank">25-1-2019</a>
                        <span class="text-muted">树藤与海岛呢</span>

                        <div>hello八月来报道了今天看到了一篇文章就只想记下那两句话:良田千顷不过一日三餐广夏万间只睡卧榻三尺大概的意思就是要珍惜当下不要等来不及的时候才珍惜分享今天的两餐最近没有时间运动呢下个月补回好了说完了哈哈goodnight图片发自App图片发自App</div>
                    </li>
                    <li><a href="/article/1950231381485350912.htm"
                           title="《极简思维》第三部分" target="_blank">《极简思维》第三部分</a>
                        <span class="text-muted">小洋苏兮</span>

                        <div>整理你的人际关系如何改善人际关系?摘录:因为人际关系问题是人们生活中不快乐的主要原因。感想:感觉这个说的挺对,之前我总是埋头学习,不管舍友不管自己的合作伙伴的一些事情,但实际上,这学期关注了之后好多了摘录:“亲密关系与社交会让你健康而快乐。这是基础。太过于关注成就或不太关心人际关系的人都不怎么快乐。基本上来说,人类就是建立在人脉关系上的。”感想:但是如果有时想的太多就不太好,要以一个开放的心态跟别</div>
                    </li>
                    <li><a href="/article/1950231308781285376.htm"
                           title="力扣热题100-------54. 螺旋矩阵" target="_blank">力扣热题100-------54. 螺旋矩阵</a>
                        <span class="text-muted">海航Java之路</span>
<a class="tag" taget="_blank" href="/search/%E5%8A%9B%E6%89%A3/1.htm">力扣</a><a class="tag" taget="_blank" href="/search/leetcode/1.htm">leetcode</a><a class="tag" taget="_blank" href="/search/%E7%9F%A9%E9%98%B5/1.htm">矩阵</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                        <div>给你一个m行n列的矩阵matrix,请按照顺时针螺旋顺序,返回矩阵中的所有元素。示例1:输入:matrix=[[1,2,3],[4,5,6],[7,8,9]]输出:[1,2,3,6,9,8,7,4,5]示例2:输入:matrix=[[1,2,3,4],[5,6,7,8],[9,10,11,12]]输出:[1,2,3,4,8,12,11,10,9,5,6,7]提示:m==matrix.lengthn</div>
                    </li>
                    <li><a href="/article/1950231254427299840.htm"
                           title="我不懂什么是爱,但我给你全部我拥有的" target="_blank">我不懂什么是爱,但我给你全部我拥有的</a>
                        <span class="text-muted">香尧</span>

                        <div>因为怕黑,所以愿意陪伴在夜中行走的人,给他一点点的安全感。因为渴望温柔与爱,所以愿意为别的孩子付出爱与温柔。因为曾遭受侮辱和伤害,所以不以同样的方式施于其他人。如果你向别人出之以利刃,对方还了你爱与包容,真的不要感激他,真的不要赞美他。每一个被人伤害过的人心里都留下了一颗仇恨的种子,他也会想要有一天以眼还眼,以牙还牙。但他未让那颗种子生根发芽,他用一把心剑又一次刺向他自己,用他血荐仇恨,开出一朵温</div>
                    </li>
                    <li><a href="/article/1950230873060208640.htm"
                           title="你要记住,最重要的是:随时做好准备,为了你可能成为更好的自己,放弃现在的自己。" target="_blank">你要记住,最重要的是:随时做好准备,为了你可能成为更好的自己,放弃现在的自己。</a>
                        <span class="text-muted">霖霖z</span>

                        <div>打卡人:周云日期:2018年11月09日【日精进打卡第180天】【知~学习】《六项精进》0遍共214遍《通篇》1遍共106遍《大学》2遍共347遍《坚强工作,温柔生活》ok《不抱怨的世界》104-108页《经典名句》你要记住,最重要的是:随时做好准备,为了你可能成为更好的自己,放弃现在的自己。【行~实践】一、修身:(对自己个人)1、坚持打卡二、齐家:(对家庭和家人)打扫卫生,接送孩子,洗衣做饭,陪</div>
                    </li>
                    <li><a href="/article/1950230804957294592.htm"
                           title="SpringMVC执行流程(原理),通俗易懂" target="_blank">SpringMVC执行流程(原理),通俗易懂</a>
                        <span class="text-muted">国服冰</span>
<a class="tag" taget="_blank" href="/search/SpringMVC/1.htm">SpringMVC</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/mvc/1.htm">mvc</a>
                        <div>SpringMVC执行流程(原理),通俗易懂一、图解SpringMVC流程二、进一步理解Springmvc的执行流程1、导入依赖2、建立展示的视图3、web.xml4、spring配置文件springmvc-servlet5、Controller6、tomcat配置7、访问的url8、视图页面一、图解SpringMVC流程图为SpringMVC的一个较完整的流程图,实线表示SpringMVC框架提</div>
                    </li>
                    <li><a href="/article/1950230678696161280.htm"
                           title="C++ 计数排序、归并排序、快速排序" target="_blank">C++ 计数排序、归并排序、快速排序</a>
                        <span class="text-muted">每天搬一点点砖</span>
<a class="tag" taget="_blank" href="/search/c%2B%2B/1.htm">c++</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a>
                        <div>计数排序:是一种基于哈希的排序算法。他的基本思想是通过统计每个元素的出现次数,然后根据统计结果将元素依次放入排序后的序列中。这种排序算法适用于范围较小的情况,例如整数范围在0到k之间计数排序步骤:1初始化一个长度为最大元素值加1的计数数组,所有元素初始化为02遍历原始数组,将每个元素值作为索引,在计数数组中对应位置加13将数组清空4遍历计数器数组,按照数组中的元素个数放回到元数组中计数排序的优点和</div>
                    </li>
                    <li><a href="/article/1950230114205757440.htm"
                           title="现在发挥你的优势" target="_blank">现在发挥你的优势</a>
                        <span class="text-muted">爱生活的佑嘉</span>

                        <div>来和我做咨询的一些朋友,涉及到定位的,都会说,我不知道我的优势是什么,你能不能帮我看看?还有一些朋友,喜欢做各种测试来了解自己,测试过后,然并卵。今天,我想来聊聊优势,如何能了解自己的优势是什么。首先,我们要知道,如果要成为“不一般”的人,我们所做的事情,就要基于自身的优势。我做管理者十多年,看到每个员工都有不同的特长,有的擅长数字,有的擅长人际,有的擅长写作。这些知道自己优势并且在这方面刻意练习</div>
                    </li>
                    <li><a href="/article/1950229985633562624.htm"
                           title="2023-11-02" target="_blank">2023-11-02</a>
                        <span class="text-muted">一帆f</span>

                        <div>发现浸润心田的感觉:今天一个机缘之下突然想分享我的婆媳关系,我一边分享一边回忆我之前和儿媳妇关系的微妙变化,特别是分享到我能感受到儿媳妇的各种美好,现在也能心平气和的和老公平等对话,看到自己看到老公,以己推人以人推己自然而然的换位思考,心中有一种美好的能量在涌动,一种浸润心田的感觉从心胸向全身扩散,美好极了……我很想记住这种感觉,赶紧把它写下来以留纪念,也就是当我看见他人的美好,美好的美妙的浸润心</div>
                    </li>
                    <li><a href="/article/1950229986984128512.htm"
                           title="贫穷家庭的孩子考上985以后会怎样?" target="_blank">贫穷家庭的孩子考上985以后会怎样?</a>
                        <span class="text-muted">Mellisa蜜思言</span>

                        <div>我出生在一个贫穷的农村家庭,据我妈说,我出生的时候才4斤多,而她生完我以后月子里就瘦到70斤。家里一直很穷,父母都是在菜市场卖菜的,家里还有几亩地种庄稼的。我很小开始就要去帮忙,暑假的生活就是帮忙去卖菜和割稻谷,那时候自己对于割稻谷这种事情有着莫名的恐惧,生怕自己长大以后还是每年都要过着割稻谷这种日子。父母因为忙于生计无暇顾及我的学习,幸好我因为看到他们这样子的生活,内心里有深深的恐惧感,驱使着我</div>
                    </li>
                    <li><a href="/article/1950229922647699456.htm"
                           title="实时数据流计算引擎Flink和Spark剖析" target="_blank">实时数据流计算引擎Flink和Spark剖析</a>
                        <span class="text-muted">程小舰</span>
<a class="tag" taget="_blank" href="/search/flink/1.htm">flink</a><a class="tag" taget="_blank" href="/search/spark/1.htm">spark</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/kafka/1.htm">kafka</a><a class="tag" taget="_blank" href="/search/hadoop/1.htm">hadoop</a>
                        <div>在过去几年,业界的主流流计算引擎大多采用SparkStreaming,随着近两年Flink的快速发展,Flink的使用也越来越广泛。与此同时,Spark针对SparkStreaming的不足,也继而推出了新的流计算组件。本文旨在深入分析不同的流计算引擎的内在机制和功能特点,为流处理场景的选型提供参考。(DLab数据实验室w.x.公众号出品)一.SparkStreamingSparkStreamin</div>
                    </li>
                    <li><a href="/article/1950229040682037248.htm"
                           title="48. 旋转图像 - 力扣(LeetCode)" target="_blank">48. 旋转图像 - 力扣(LeetCode)</a>
                        <span class="text-muted">Fiee-77</span>
<a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E7%BB%84/1.htm">数组</a><a class="tag" taget="_blank" href="/search/leetcode/1.htm">leetcode</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84/1.htm">数据结构</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E7%BB%84/1.htm">数组</a>
                        <div>题目:给定一个n×n的二维矩阵matrix表示一个图像。请你将图像顺时针旋转90度。你必须在原地旋转图像,这意味着你需要直接修改输入的二维矩阵。请不要使用另一个矩阵来旋转图像。示例1:输入:matrix=[[1,2,3],[4,5,6],[7,8,9]]输出:[[7,4,1],[8,5,2],[9,6,3]]示例2:输入:matrix=[[5,1,9,11],[2,4,8,10],[13,3,6,</div>
                    </li>
                                <li><a href="/article/113.htm"
                                       title="windows下源码安装golang" target="_blank">windows下源码安装golang</a>
                                    <span class="text-muted">616050468</span>
<a class="tag" taget="_blank" href="/search/golang%E5%AE%89%E8%A3%85/1.htm">golang安装</a><a class="tag" taget="_blank" href="/search/golang%E7%8E%AF%E5%A2%83/1.htm">golang环境</a><a class="tag" taget="_blank" href="/search/windows/1.htm">windows</a>
                                    <div>         系统: 64位win7, 开发环境:sublime text 2,  go版本: 1.4.1 
  
 1.  安装前准备(gcc, gdb, git) 
       golang在64位系</div>
                                </li>
                                <li><a href="/article/240.htm"
                                       title="redis批量删除带空格的key" target="_blank">redis批量删除带空格的key</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/redis/1.htm">redis</a>
                                    <div>redis批量删除的通常做法: 
 
 
redis-cli keys "blacklist*" | xargs redis-cli del 
 
上面的命令在key的前后没有空格时是可以的,但有空格就不行了: 
 

$redis-cli keys "blacklist*"
1) "blacklist:12: 361942420@qq.com</div>
                                </li>
                                <li><a href="/article/367.htm"
                                       title="oracle正则表达式的用法" target="_blank">oracle正则表达式的用法</a>
                                    <span class="text-muted">0624chenhong</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F/1.htm">正则表达式</a>
                                    <div>  方括号表达示 
方括号表达式 
描述 
[[:alnum:]] 
字母和数字混合的字符 
[[:alpha:]] 
字母字符 
[[:cntrl:]] 
控制字符 
[[:digit:]] 
数字字符 
[[:graph:]] 
图像字符 
[[:lower:]] 
小写字母字符 
[[:print:]] 
打印字符 
[[:punct:]] 
标点符号字符 
[[:space:]]</div>
                                </li>
                                <li><a href="/article/494.htm"
                                       title="2048源码(核心算法有,缺少几个anctionbar,以后补上)" target="_blank">2048源码(核心算法有,缺少几个anctionbar,以后补上)</a>
                                    <span class="text-muted">不懂事的小屁孩</span>
<a class="tag" taget="_blank" href="/search/2048/1.htm">2048</a>
                                    <div>2048游戏基本上有四部分组成, 
1:主activity,包含游戏块的16个方格,上面统计分数的模块 
2:底下的gridview,监听上下左右的滑动,进行事件处理, 
3:每一个卡片,里面的内容很简单,只有一个text,记录显示的数字 
4:Actionbar,是游戏用重新开始,设置等功能(这个在底下可以下载的代码里面还没有实现) 
 
写代码的流程 
1:设计游戏的布局,基本是两块,上面是分</div>
                                </li>
                                <li><a href="/article/621.htm"
                                       title="jquery内部链式调用机理" target="_blank">jquery内部链式调用机理</a>
                                    <span class="text-muted">换个号韩国红果果</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/jquery/1.htm">jquery</a>
                                    <div>只需要在调用该对象合适(比如下列的setStyles)的方法后让该方法返回该对象(通过this  因为一旦一个函数称为一个对象方法的话那么在这个方法内部this(结合下面的setStyles)指向这个对象) 

function  create(type){
var element=document.createElement(type);
    //this=element;
</div>
                                </li>
                                <li><a href="/article/748.htm"
                                       title="你订酒店时的每一次点击 背后都是NoSQL和云计算" target="_blank">你订酒店时的每一次点击 背后都是NoSQL和云计算</a>
                                    <span class="text-muted">蓝儿唯美</span>
<a class="tag" taget="_blank" href="/search/NoSQL/1.htm">NoSQL</a>
                                    <div>全球最大的在线旅游公司Expedia旗下的酒店预订公司,它运营着89个网站,跨越68个国家,三年前开始实验公有云,以求让客户在预订网站上查询假期酒店时得到更快的信息获取体验。 
云端本身是用于驱动网站的部分小功能的,如搜索框的自动推荐功能,还能保证处理Hotels.com服务的季节性需求高峰整体储能。 
Hotels.com的首席技术官Thierry Bedos上个月在伦敦参加“2015 Clou</div>
                                </li>
                                <li><a href="/article/875.htm"
                                       title="java笔记1" target="_blank">java笔记1</a>
                                    <span class="text-muted">a-john</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                                    <div>1,面向对象程序设计(Object-oriented Propramming,OOP):java就是一种面向对象程序设计。 
2,对象:我们将问题空间中的元素及其在解空间中的表示称为“对象”。简单来说,对象是某个类型的实例。比如狗是一个类型,哈士奇可以是狗的一个实例,也就是对象。 
3,面向对象程序设计方式的特性: 
    3.1 万物皆为对象。 
   </div>
                                </li>
                                <li><a href="/article/1002.htm"
                                       title="C语言 sizeof和strlen之间的那些事 C/C++软件开发求职面试题 必备考点(一)" target="_blank">C语言 sizeof和strlen之间的那些事 C/C++软件开发求职面试题 必备考点(一)</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/C%2FC%2B%2B%E6%B1%82%E8%81%8C%E9%9D%A2%E8%AF%95%E5%BF%85%E5%A4%87%E8%80%83%E7%82%B9/1.htm">C/C++求职面试必备考点</a>
                                    <div>        找工作在即,以后决定每天至少写一个知识点,主要是记录,逼迫自己动手、总结加深印象。当然如果能有一言半语让他人收益,后学幸运之至也。如有错误,还希望大家帮忙指出来。感激不尽。 
       后学保证每个写出来的结果都是自己在电脑上亲自跑过的,咱人笨,以前学的也半吊子。很多时候只能靠运行出来的结果再反过来</div>
                                </li>
                                <li><a href="/article/1129.htm"
                                       title="程序员写代码时就不要管需求了吗?" target="_blank">程序员写代码时就不要管需求了吗?</a>
                                    <span class="text-muted">asia007</span>
<a class="tag" taget="_blank" href="/search/%E7%A8%8B%E5%BA%8F%E5%91%98%E4%B8%8D%E8%83%BD%E4%B8%80%E5%91%B3%E8%B7%9F%E9%9C%80%E6%B1%82%E8%B5%B0/1.htm">程序员不能一味跟需求走</a>
                                    <div>      编程也有2年了,刚开始不懂的什么都跟需求走,需求是怎样就用代码实现就行,也不管这个需求是否合理,是否为较好的用户体验。当然刚开始编程都会这样,但是如果有了2年以上的工作经验的程序员只知道一味写代码,而不在写的过程中思考一下这个需求是否合理,那么,我想这个程序员就只能一辈写敲敲代码了。 
      我的技术不是很好,但是就不代</div>
                                </li>
                                <li><a href="/article/1256.htm"
                                       title="Activity的四种启动模式" target="_blank">Activity的四种启动模式</a>
                                    <span class="text-muted">百合不是茶</span>
<a class="tag" taget="_blank" href="/search/android/1.htm">android</a><a class="tag" taget="_blank" href="/search/%E6%A0%88%E6%A8%A1%E5%BC%8F%E5%90%AF%E5%8A%A8/1.htm">栈模式启动</a><a class="tag" taget="_blank" href="/search/Activity%E7%9A%84%E6%A0%87%E5%87%86%E6%A8%A1%E5%BC%8F%E5%90%AF%E5%8A%A8/1.htm">Activity的标准模式启动</a><a class="tag" taget="_blank" href="/search/%E6%A0%88%E9%A1%B6%E6%A8%A1%E5%BC%8F%E5%90%AF%E5%8A%A8/1.htm">栈顶模式启动</a><a class="tag" taget="_blank" href="/search/%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F%E5%90%AF%E5%8A%A8/1.htm">单例模式启动</a>
                                    <div>android界面的操作就是很多个activity之间的切换,启动模式决定启动的activity的生命周期 ; 
  
启动模式xml中配置 
    <activity android:name=".MainActivity" android:launchMode="standard&quo</div>
                                </li>
                                <li><a href="/article/1383.htm"
                                       title="Spring中@Autowired标签与@Resource标签的区别" target="_blank">Spring中@Autowired标签与@Resource标签的区别</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/%40Resource/1.htm">@Resource</a><a class="tag" taget="_blank" href="/search/%40Autowired/1.htm">@Autowired</a><a class="tag" taget="_blank" href="/search/%40Qualifier/1.htm">@Qualifier</a>
                                    <div>Spring不但支持自己定义的@Autowired注解,还支持由JSR-250规范定义的几个注解,如:@Resource、 @PostConstruct及@PreDestroy。 
  
1. @Autowired    @Autowired是Spring 提供的,需导入    Package:org.springframewo</div>
                                </li>
                                <li><a href="/article/1510.htm"
                                       title="Changes Between SOAP 1.1 and SOAP 1.2" target="_blank">Changes Between SOAP 1.1 and SOAP 1.2</a>
                                    <span class="text-muted">sunjing</span>
<a class="tag" taget="_blank" href="/search/Changes/1.htm">Changes</a><a class="tag" taget="_blank" href="/search/Enable/1.htm">Enable</a><a class="tag" taget="_blank" href="/search/SOAP+1.1/1.htm">SOAP 1.1</a><a class="tag" taget="_blank" href="/search/SOAP+1.2/1.htm">SOAP 1.2</a>
                                    <div>JAX-WS 
SOAP Version 1.2 Part 0: Primer (Second Edition) 
SOAP Version 1.2 Part 1: Messaging Framework (Second Edition) 
SOAP Version 1.2 Part 2: Adjuncts (Second Edition) 
  
Which style of WSDL</div>
                                </li>
                                <li><a href="/article/1637.htm"
                                       title="【Hadoop二】Hadoop常用命令" target="_blank">【Hadoop二】Hadoop常用命令</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/hadoop/1.htm">hadoop</a>
                                    <div>以Hadoop运行Hadoop自带的wordcount为例, 
  
hadoop脚本位于/home/hadoop/hadoop-2.5.2/bin/hadoop,需要说明的是,这些命令的使用必须在Hadoop已经运行的情况下才能执行 
  Hadoop HDFS相关命令 
 
  hadoop fs -ls 
 
 列出HDFS文件系统的第一级文件和第一级</div>
                                </li>
                                <li><a href="/article/1764.htm"
                                       title="java异常处理(初级)" target="_blank">java异常处理(初级)</a>
                                    <span class="text-muted">白糖_</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/DAO/1.htm">DAO</a><a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/%E8%99%9A%E6%8B%9F%E6%9C%BA/1.htm">虚拟机</a><a class="tag" taget="_blank" href="/search/Ajax/1.htm">Ajax</a>
                                    <div>从学习到现在从事java开发一年多了,个人觉得对java只了解皮毛,很多东西都是用到再去慢慢学习,编程真的是一项艺术,要完成一段好的代码,需要懂得很多。 
最近项目经理让我负责一个组件开发,框架都由自己搭建,最让我头疼的是异常处理,我看了一些网上的源码,发现他们对异常的处理不是很重视,研究了很久都没有找到很好的解决方案。后来有幸看到一个200W美元的项目部分源码,通过他们对异常处理的解决方案,我终</div>
                                </li>
                                <li><a href="/article/1891.htm"
                                       title="记录整理-工作问题" target="_blank">记录整理-工作问题</a>
                                    <span class="text-muted">braveCS</span>
<a class="tag" taget="_blank" href="/search/%E5%B7%A5%E4%BD%9C/1.htm">工作</a>
                                    <div>1)那位同学还是CSV文件默认Excel打开看不到全部结果。以为是没写进去。同学甲说文件应该不分大小。后来log一下原来是有写进去。只是Excel有行数限制。那位同学进步好快啊。 
2)今天同学说写文件的时候提示jvm的内存溢出。我马上反应说那就改一下jvm的内存大小。同学说改用分批处理了。果然想问题还是有局限性。改jvm内存大小只能暂时地解决问题,以后要是写更大的文件还是得改内存。想问题要长远啊</div>
                                </li>
                                <li><a href="/article/2018.htm"
                                       title="org.apache.tools.zip实现文件的压缩和解压,支持中文" target="_blank">org.apache.tools.zip实现文件的压缩和解压,支持中文</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/apache/1.htm">apache</a>
                                    <div>刚开始用java.util.Zip,发现不支持中文(网上有修改的方法,但比较麻烦) 
后改用org.apache.tools.zip 
org.apache.tools.zip的使用网上有更简单的例子 
下面的程序根据实际需求,实现了压缩指定目录下指定文件的方法 
 



import java.io.BufferedReader;
import java.io.BufferedWrit</div>
                                </li>
                                <li><a href="/article/2145.htm"
                                       title="读书笔记-4" target="_blank">读书笔记-4</a>
                                    <span class="text-muted">chengxuyuancsdn</span>
<a class="tag" taget="_blank" href="/search/%E8%AF%BB%E4%B9%A6%E7%AC%94%E8%AE%B0/1.htm">读书笔记</a>
                                    <div>1、JSTL 核心标签库标签 
2、避免SQL注入 
3、字符串逆转方法 
4、字符串比较compareTo 
5、字符串替换replace 
6、分拆字符串 
 
 
1、JSTL 核心标签库标签共有13个,
学习资料:http://www.cnblogs.com/lihuiyy/archive/2012/02/24/2366806.html
功能上分为4类:
(1)表达式控制标签:out</div>
                                </li>
                                <li><a href="/article/2272.htm"
                                       title="[物理与电子]半导体教材的一个小问题" target="_blank">[物理与电子]半导体教材的一个小问题</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/%E9%97%AE%E9%A2%98/1.htm">问题</a>
                                    <div> 
 
      各种模拟电子和数字电子教材中都有这个词汇-空穴 
 
      书中对这个词汇的解释是; 当电子脱离共价键的束缚成为自由电子之后,共价键中就留下一个空位,这个空位叫做空穴 
 
      我现在回过头翻大学时候的教材,觉得这个</div>
                                </li>
                                <li><a href="/article/2399.htm"
                                       title="Flashback Database --闪回数据库" target="_blank">Flashback Database --闪回数据库</a>
                                    <span class="text-muted">daizj</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E9%97%AA%E5%9B%9E%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">闪回数据库</a>
                                    <div>Flashback 技术是以Undo segment中的内容为基础的, 因此受限于UNDO_RETENTON参数。要使用flashback 的特性,必须启用自动撤销管理表空间。 
在Oracle 10g中, Flash back家族分为以下成员: Flashback Database, Flashback Drop,Flashback Query(分Flashback Query,Flashbac</div>
                                </li>
                                <li><a href="/article/2526.htm"
                                       title="简单排序:插入排序" target="_blank">简单排序:插入排序</a>
                                    <span class="text-muted">dieslrae</span>
<a class="tag" taget="_blank" href="/search/%E6%8F%92%E5%85%A5%E6%8E%92%E5%BA%8F/1.htm">插入排序</a>
                                    <div>
    public void insertSort(int[] array){
        int temp;
        
        for(int i=1;i<array.length;i++){
            temp = array[i];
            
            for(int k=i-1;k>=0;k--)</div>
                                </li>
                                <li><a href="/article/2653.htm"
                                       title="C语言学习六指针小示例、一维数组名含义,定义一个函数输出数组的内容" target="_blank">C语言学习六指针小示例、一维数组名含义,定义一个函数输出数组的内容</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/c/1.htm">c</a>
                                    <div># include <stdio.h>

int main(void)
{
	int * p; //等价于 int *p 也等价于 int* p;
	int i = 5;
	char ch = 'A';

	//p = 5;	//error
	//p = &ch;	//error
	//p = ch;	//error

	p = &i;		// </div>
                                </li>
                                <li><a href="/article/2780.htm"
                                       title="centos下php redis扩展的安装配置3种方法" target="_blank">centos下php redis扩展的安装配置3种方法</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/redis/1.htm">redis</a>
                                    <div>方法一 
1.下载php redis扩展包     代码如下 复制代码    
#wget http://redis.googlecode.com/files/redis-2.4.4.tar.gz     
2 tar -zxvf 解压压缩包,cd /扩展包 (进入扩展包然后 运行phpize 一下是我环境中phpize的目录,/usr/local/php/bin/phpize (一定要</div>
                                </li>
                                <li><a href="/article/2907.htm"
                                       title="线程池(Executors)" target="_blank">线程池(Executors)</a>
                                    <span class="text-muted">shuizhaosi888</span>
<a class="tag" taget="_blank" href="/search/%E7%BA%BF%E7%A8%8B%E6%B1%A0/1.htm">线程池</a>
                                    <div>在java类库中,任务执行的主要抽象不是Thread,而是Executor,将任务的提交过程和执行过程解耦 
	public interface Executor {

	    void execute(Runnable command);
	}
 
  
public class RunMain implements Executor{

	@Override
	pub</div>
                                </li>
                                <li><a href="/article/3034.htm"
                                       title="openstack 快速安装笔记" target="_blank">openstack 快速安装笔记</a>
                                    <span class="text-muted">haoningabc</span>
<a class="tag" taget="_blank" href="/search/openstack/1.htm">openstack</a>
                                    <div>前提是要配置好yum源 
版本icehouse,操作系统redhat6.5 
最简化安装,不要cinder和swift 
三个节点 
172 control节点keystone glance horizon 
173 compute节点nova 
173 network节点neutron 
 

control
/etc/sysctl.conf

net.ipv4.ip_forward =</div>
                                </li>
                                <li><a href="/article/3161.htm"
                                       title="从c面向对象的实现理解c++的对象(二)" target="_blank">从c面向对象的实现理解c++的对象(二)</a>
                                    <span class="text-muted">jimmee</span>
<a class="tag" taget="_blank" href="/search/C%2B%2B/1.htm">C++</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1/1.htm">面向对象</a><a class="tag" taget="_blank" href="/search/%E8%99%9A%E5%87%BD%E6%95%B0/1.htm">虚函数</a>
                                    <div>1. 类就可以看作一个struct,类的方法,可以理解为通过函数指针的方式实现的,类对象分配内存时,只分配成员变量的,函数指针并不需要分配额外的内存保存地址。 
2. c++中类的构造函数,就是进行内存分配(malloc),调用构造函数 
3. c++中类的析构函数,就时回收内存(free) 
4. c++是基于栈和全局数据分配内存的,如果是一个方法内创建的对象,就直接在栈上分配内存了。 
专门在</div>
                                </li>
                                <li><a href="/article/3288.htm"
                                       title="如何让那个一个div可以拖动" target="_blank">如何让那个一个div可以拖动</a>
                                    <span class="text-muted">lingfeng520240</span>
<a class="tag" taget="_blank" href="/search/html/1.htm">html</a>
                                    <div>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml</div>
                                </li>
                                <li><a href="/article/3415.htm"
                                       title="第10章 高级事件(中)" target="_blank">第10章 高级事件(中)</a>
                                    <span class="text-muted">onestopweb</span>
<a class="tag" taget="_blank" href="/search/%E4%BA%8B%E4%BB%B6/1.htm">事件</a>
                                    <div>index.html 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/</div>
                                </li>
                                <li><a href="/article/3542.htm"
                                       title="计算两个经纬度之间的距离" target="_blank">计算两个经纬度之间的距离</a>
                                    <span class="text-muted">roadrunners</span>
<a class="tag" taget="_blank" href="/search/%E8%AE%A1%E7%AE%97/1.htm">计算</a><a class="tag" taget="_blank" href="/search/%E7%BA%AC%E5%BA%A6/1.htm">纬度</a><a class="tag" taget="_blank" href="/search/LBS/1.htm">LBS</a><a class="tag" taget="_blank" href="/search/%E7%BB%8F%E5%BA%A6/1.htm">经度</a><a class="tag" taget="_blank" href="/search/%E8%B7%9D%E7%A6%BB/1.htm">距离</a>
                                    <div>要解决这个问题的时候,到网上查了很多方案,最后计算出来的都与百度计算出来的有出入。下面这个公式计算出来的距离和百度计算出来的距离是一致的。 
	/**
	 * 
	 * @param longitudeA
	 *            经度A点
	 * @param latitudeA
	 *            纬度A点
	 * @param longitudeB
	 *    </div>
                                </li>
                                <li><a href="/article/3669.htm"
                                       title="最具争议的10个Java话题" target="_blank">最具争议的10个Java话题</a>
                                    <span class="text-muted">tomcat_oracle</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                                    <div>1、Java8已经到来。什么!? Java8 支持lambda。哇哦,RIP Scala!     随着Java8 的发布,出现很多关于新发布的Java8是否有潜力干掉Scala的争论,最终的结论是远远没有那么简单。Java8可能已经在Scala的lambda的包围中突围,但Java并非是函数式编程王位的真正觊觎者。     
 2、Java 9 即将到来      
Oracle早在8月份就发布</div>
                                </li>
                                <li><a href="/article/3796.htm"
                                       title="zoj 3826 Hierarchical Notation(模拟)" target="_blank">zoj 3826 Hierarchical Notation(模拟)</a>
                                    <span class="text-muted">阿尔萨斯</span>
<a class="tag" taget="_blank" href="/search/rar/1.htm">rar</a>
                                    <div> 题目链接:zoj 3826 Hierarchical Notation 
 题目大意:给定一些结构体,结构体有value值和key值,Q次询问,输出每个key值对应的value值。 
 解题思路:思路很简单,写个类词法的递归函数,每次将key值映射成一个hash值,用map映射每个key的value起始终止位置,预处理完了查询就很简单了。 这题是最后10分钟出的,因为没有考虑value为{}的情</div>
                                </li>
                </ul>
            </div>
        </div>
    </div>

<div>
    <div class="container">
        <div class="indexes">
            <strong>按字母分类:</strong>
            <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a
                href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a
                href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a
                href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a
                href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a
                href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a
                href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a
                href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a
                href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a>
        </div>
    </div>
</div>
<footer id="footer" class="mb30 mt30">
    <div class="container">
        <div class="footBglm">
            <a target="_blank" href="/">首页</a> -
            <a target="_blank" href="/custom/about.htm">关于我们</a> -
            <a target="_blank" href="/search/Java/1.htm">站内搜索</a> -
            <a target="_blank" href="/sitemap.txt">Sitemap</a> -
            <a target="_blank" href="/custom/delete.htm">侵权投诉</a>
        </div>
        <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved.
<!--            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>-->
        </div>
    </div>
</footer>
<!-- 代码高亮 -->
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/>
<script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script>





</body>

</html>