From 109e928487319c4e6c85a103a3c8342590cfd973 Mon Sep 17 00:00:00 2001 From: cipres Date: Mon, 13 Nov 2023 21:06:19 +0100 Subject: [PATCH] Pin the sphinx version to 5.3 and update the docs --- docs/index.rst | 28 ++++++++++++++++++++++++++-- requirements-docs.txt | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 8c9a139..7bd564b 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,14 @@ aioipfs ======= -Asynchronous IPFS client API for Python3's asyncio. +*aioipfs* is an asynchronous Python client library for +`kubo `_ (formerly called *go-ipfs*), +which is the reference implementation of the `IPFS `_ +(*Interplanetary Filesystem*) protocol. + +*aioipfs* uses the `aiohttp `_ +library to access kubo's +`RPC `_ endpoints. .. toctree:: :maxdepth: 2 @@ -21,6 +28,10 @@ Asynchronous IPFS client API for Python3's asyncio. Installation ============ +You can use any Python version that supports +`asyncio `_ +and asynchronous generators (from Python version 3.6 to version 3.12). + .. code-block:: shell pip install aioipfs @@ -34,7 +45,7 @@ If you want to use orjson_ to decode JSON messages: Async IPFS client ================= -To create an :class:`~aioipfs.AsyncIPFS` client instance it's +When creating a :class:`~aioipfs.AsyncIPFS` client instance it's recommended to specify the node's RPC API address with a multiaddr_:: import aioipfs @@ -137,6 +148,19 @@ string argument, which should be the path in the MFS for the link:: async for added in client.core.add('file1.txt', to_files='/file1.txt'): print(added['Hash']) +Ignoring files with .gitignore or .ipfsignore +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*aioipfs* supports the use of +`gitignore `_ files to specify +which files should not be imported in IPFS. Use the +*ignore_rules_path* keyword argument to indicate the name of the file +(relative to the directory you're importing) containing the ignore rules:: + + async for added in client.core.add('directory', recursive=True, + ignore_rules_path='.ipfsignore'): + print(added['Hash']) + Adding bytes ------------ diff --git a/requirements-docs.txt b/requirements-docs.txt index 9041ca6..ef0087b 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,3 +1,3 @@ -sphinx +sphinx==5.3.0 sphinxcontrib-asyncio guzzle_sphinx_theme