Skip to content

Commit

Permalink
Pin the sphinx version to 5.3 and update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cipres authored and cipres committed Nov 13, 2023
1 parent 57b088d commit 109e928
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
28 changes: 26 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
aioipfs
=======

Asynchronous IPFS client API for Python3's asyncio.
*aioipfs* is an asynchronous Python client library for
`kubo <https://github.com/ipfs/kubo>`_ (formerly called *go-ipfs*),
which is the reference implementation of the `IPFS <https://ipfs.tech>`_
(*Interplanetary Filesystem*) protocol.

*aioipfs* uses the `aiohttp <https://github.com/aio-libs/aiohttp>`_
library to access kubo's
`RPC <https://docs.ipfs.tech/reference/kubo/rpc>`_ endpoints.

.. toctree::
:maxdepth: 2
Expand All @@ -21,6 +28,10 @@ Asynchronous IPFS client API for Python3's asyncio.
Installation
============

You can use any Python version that supports
`asyncio <https://docs.python.org/3/library/asyncio.html>`_
and asynchronous generators (from Python version 3.6 to version 3.12).

.. code-block:: shell
pip install aioipfs
Expand All @@ -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
Expand Down Expand Up @@ -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 <https://git-scm.com/docs/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
------------

Expand Down
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx
sphinx==5.3.0
sphinxcontrib-asyncio
guzzle_sphinx_theme

0 comments on commit 109e928

Please sign in to comment.