From 30b06876e03be50e856d48e11dfdeae7e73aaa1a Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Thu, 24 Nov 2022 19:44:24 -0500 Subject: [PATCH] update docs --- docs/index.rst | 19 +++++++++++++++++++ docs/usage.rst | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index d2258bb..1a75178 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,3 +2,22 @@ Welcome to ActivityPub Utilities's documentation! ================================================= ApUtils is a collection of classes and functions to aid in the development of an ActivityPub server. + + +Installation +~~~~~~~~~~~~ + +The only current installation source at the moment is git. Either install straight from the git url + +.. code-block:: bash + + python3 -m pip install git+https://git.barkshark.xyz/barkshark/aputils.git@0.1.0 + +or clone the repo and install locally + +.. code-block:: bash + + git clone https://git.barkshark.xyz/barkshark/aputils.git + cd aputils + git checkout 0.1.0 + python3 -m pip install . diff --git a/docs/usage.rst b/docs/usage.rst index d4b9a15..9b81fbf 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -1,2 +1,19 @@ Usage ===== + +Each class and function in the API section can either be imported or accessed straight from the +module. The following two code blocks do the same thing. + +.. code-block:: python + + import aputils + from pathlib import Path + + signer = aputils.Signer(Path('privkey.pem'), 'https://social.example.com/users/cheese_wedge#main-key') + +.. code-block:: python + + from aputils import Signer + from pathlib import Path + + signer = Signer(Path('privkey.pem'), 'https://social.example.com/users/cheese_wedge#main-key')