Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #234

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 16 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## The AT Protocol SDK

> ⚠️ Under construction. Until the 1.0.0 release, I am not going to care about backward compatibility between versions.
> ⚠️ Under construction. Until the 1.0.0 release compatibility between versions is not guaranteed.

Code snippet:
```python
Expand Down Expand Up @@ -76,17 +76,16 @@ if __name__ == '__main__':

### Introduction

This SDK attempts to implement everything that provides ATProto. Due to the unstable state of the protocol (it grows and changes fast) and a bit of outdated documentation, only the client side is supported for now. There is support for Lexicon Schemes, XRPC clients, and Firehose. All models, queries, and procedures are generated automatically. The main focus is on the lexicons of atproto.com and bsky.app, but it doesn't have a vendor lock on it. Feel free to use the code generator for your own lexicon schemes. SDK also provides utilities to work with CID, NSID, AT URI Schemes, DAG-CBOR, CAR files.
This SDK attempts to implement everything that provides ATProto. There is support for Lexicon Schemes, XRPC clients, Firehose, Identity, DID keys, signatures, and more. All models, queries, and procedures are generated automatically. The main focus is on the lexicons of atproto.com and bsky.app, but it doesn't have a vendor lock on it. Feel free to use the code generator for your own lexicon schemes. SDK also provides utilities to work with CID, NSID, AT URI Schemes, DAG-CBOR, CAR files, DID Documents and more.

### Requirements

- Python 3.7.1 or higher.
- Access to Bsky if you don't have an own server.

### Installing

``` bash
pip3 install -U atproto
pip install -U atproto
```

### Quick start
Expand Down Expand Up @@ -134,23 +133,25 @@ client.send_post(text='Hello World!')
```

Useful links to continue:
- [List of all methods with documentation](https://atproto.readthedocs.io/en/latest/xrpc_clients/client.html).
- [List of all methods with documentation](https://atproto.readthedocs.io/en/latest/atproto_client/index.html).
- [Examples of using the methods](https://github.com/MarshalX/atproto/tree/main/examples).

### SDK structure

The SDK is built upon the following components:

| Package | Description |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| `atproto` | The package that contains import shortcuts to other packages. |
| `atproto_cli` | The package that contains the CLI tool to generate code. |
| `atproto_client` | The package that contains the XRPC Client, data models, and utils like rich text helper. |
| `atproto_codegen` | The package that contains the code generator of models, clients, and namespaces. |
| `atproto_core` | The package that contains the core of the SDK. Base class of exceptions, tools to work with NSID, AT URI Schemes, CID, and CAR files. |
| `atproto_firehose` | The package that contains the Firehose (data streaming) client and models. |
| `atproto_identity` | The package that contains the identity resolvers for DID and Handle. |
| `atproto_lexicon` | The package that contains the lexicon parser. |
| Package | Description |
|--------------------|-----------------------------------------------------------------------------|
| `atproto` | Import shortcuts to other packages. |
| `atproto_cli` | CLI tool to generate code. |
| `atproto_client` | XRPC Client, data models, and utils like rich text helper. |
| `atproto_codegen` | Code generator of models, clients, and namespaces. |
| `atproto_core` | Tools to work with NSID, AT URI Schemes, CID, CAR files, and DID Documents. |
| `atproto_crypto` | Crypto utils like multibase, signature verification, work with DID keys. |
| `atproto_firehose` | Firehose (data streaming) client and models. |
| `atproto_identity` | Identity resolvers for DID, Handle, AT Protocol data, signing keys. |
| `atproto_lexicon` | Lexicon parser. |
| `atproro_server` | Server-side utils like JWT. |

I highly recommend you to use the `atproto` package to import everything that you need.
It contains shortcuts to all other packages.
Expand Down Expand Up @@ -272,11 +273,6 @@ with open('cat.jpg', 'rb') as f:

I hope you are not scared. May the Force be with you. Good luck!

### Future changes

Things that a want to do soon:
- Provide autogenerated Record Namespaces with more high-level work with basic operations upon records (CRUD + list records)

### Change log

The full change log is available in [CHANGES.md](https://github.com/MarshalX/atproto/blob/main/CHANGES.md).
Expand Down
7 changes: 0 additions & 7 deletions docs/source/atproto/atproto_client.client.auth.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/source/atproto/atproto_identity.did.models.rst

This file was deleted.

4 changes: 2 additions & 2 deletions docs/source/atproto_client/clients.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
XRPC Clients
============
Clients
=======

.. automodule:: atproto_client.client
:members:
Expand Down
18 changes: 18 additions & 0 deletions docs/source/atproto_client/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Client (API)
============

.. automodule:: atproto_client
:members:
:undoc-members:
:inherited-members:

Submodules
----------

.. toctree::
:maxdepth: 4

clients
namespace
models
utils/index
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions docs/source/atproto_client/utils/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Utils
=====

.. toctree::
:maxdepth: 4

text_builder
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions docs/source/atproto_core/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Core
====

.. automodule:: atproto_core
:members:
:undoc-members:
:inherited-members:

Submodules
----------

.. toctree::
:maxdepth: 4

nsid
cid
uri
car
cbor
did_doc
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/source/atproto_crypto/did.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DID
===

.. automodule:: atproto_crypto.did
:members:
:undoc-members:
17 changes: 17 additions & 0 deletions docs/source/atproto_crypto/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Crypto
======

.. automodule:: atproto_crypto
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

.. toctree::
:maxdepth: 4

did
multibase
verify
6 changes: 6 additions & 0 deletions docs/source/atproto_crypto/multibase.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Multibase
=========

.. automodule:: atproto_crypto.multibase
:members:
:undoc-members:
7 changes: 7 additions & 0 deletions docs/source/atproto_crypto/verify.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Verify signature
================

.. automodule:: atproto_crypto.verify
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Submodules
.. toctree::
:maxdepth: 4

firehose.models
models
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Identity (DID and Handle resolvers)
===================================

Check out what is a DID Document in the :doc:`../did_doc`.
Check out what is a DID Document in the :doc:`../atproto_core/did_doc`.

AT Protocol uses two identifiers: DID and Handle. Handles are DNS names while DIDs are an emerging W3C standard which act as secure & stable IDs.

Expand Down Expand Up @@ -30,6 +30,9 @@ Learn how to use cache to speed up the resolution process in the :doc:`cache` se
:undoc-members:
:inherited-members:

Submodules
----------

.. toctree::
:maxdepth: 4

Expand Down
16 changes: 16 additions & 0 deletions docs/source/atproto_lexicon/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Lexicon
=======

.. automodule:: atproto_lexicon
:members:
:undoc-members:
:inherited-members:

Submodules
----------

.. toctree::
:maxdepth: 4

parser
models
7 changes: 7 additions & 0 deletions docs/source/atproto_lexicon/models.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Models
======

.. automodule:: atproto_lexicon.models
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/atproto_lexicon/parser.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Parser
======

.. automodule:: atproto_lexicon.parser
:members:
:undoc-members:
:show-inheritance:
3 changes: 3 additions & 0 deletions docs/source/atproto_server/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Server
:undoc-members:
:inherited-members:

Submodules
----------

.. toctree::
:maxdepth: 4

Expand Down
36 changes: 8 additions & 28 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,19 @@ Documentation

readme
Examples <https://github.com/MarshalX/atproto/tree/main/examples>
⭐️ Star <https://github.com/MarshalX/atproto>

.. toctree::
:caption: SDK
:maxdepth: 4

firehose
atproto_client/clients
namespace
models
atproto_identity/identity
atproto_client/index
atproto_core/index
atproto_firehose/index
atproto_identity/index
atproto_crypto/index
atproto_server/index

.. toctree::
:caption: Core
:maxdepth: 4

nsid
cid
uri
car
cbor
did_doc

.. toctree::
:caption: Utils
:maxdepth: 4

text_builder

.. toctree::
:caption: Exceptions
:maxdepth: 4

atproto_lexicon/index
exceptions

.. toctree::
Expand All @@ -62,7 +42,7 @@ Documentation

GitHub <https://github.com/MarshalX/atproto>
PyPI <https://pypi.org/project/atproto/>
Author <https://github.com/MarshalX>
🦁 Author <https://github.com/MarshalX>
AT Protocol Docs <https://atproto.com/docs>
IPLD Data Model <https://ipld.io/>
Discord Bluesky API <https://discord.gg/PCyVJXU9jN>
34 changes: 15 additions & 19 deletions docs/source/readme.content.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
### Introduction

This SDK attempts to implement everything that provides ATProto. Due to the unstable state of the protocol (it grows and changes fast) and a bit of outdated documentation, only the client side is supported for now. There is support for Lexicon Schemes, XRPC clients, and Firehose. All models, queries, and procedures are generated automatically. The main focus is on the lexicons of atproto.com and bsky.app, but it doesn't have a vendor lock on it. Feel free to use the code generator for your own lexicon schemes. SDK also provides utilities to work with CID, NSID, AT URI Schemes, DAG-CBOR, CAR files.
This SDK attempts to implement everything that provides ATProto. There is support for Lexicon Schemes, XRPC clients, Firehose, Identity, DID keys, signatures, and more. All models, queries, and procedures are generated automatically. The main focus is on the lexicons of atproto.com and bsky.app, but it doesn't have a vendor lock on it. Feel free to use the code generator for your own lexicon schemes. SDK also provides utilities to work with CID, NSID, AT URI Schemes, DAG-CBOR, CAR files, DID Documents and more.

### Requirements

- Python 3.7.1 or higher.
- Access to Bsky if you don't have an own server.

### Installing

``` bash
pip3 install -U atproto
pip install -U atproto
```

### Quick start
Expand Down Expand Up @@ -58,23 +57,25 @@ client.send_post(text='Hello World!')
```

Useful links to continue:
- [List of all methods with documentation](https://atproto.readthedocs.io/en/latest/xrpc_clients/client.html).
- [List of all methods with documentation](https://atproto.readthedocs.io/en/latest/atproto_client/index.html).
- [Examples of using the methods](https://github.com/MarshalX/atproto/tree/main/examples).

### SDK structure

The SDK is built upon the following components:

| Package | Description |
|--------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| `atproto` | The package that contains import shortcuts to other packages. |
| `atproto_cli` | The package that contains the CLI tool to generate code. |
| `atproto_client` | The package that contains the XRPC Client, data models, and utils like rich text helper. |
| `atproto_codegen` | The package that contains the code generator of models, clients, and namespaces. |
| `atproto_core` | The package that contains the core of the SDK. Base class of exceptions, tools to work with NSID, AT URI Schemes, CID, and CAR files. |
| `atproto_firehose` | The package that contains the Firehose (data streaming) client and models. |
| `atproto_identity` | The package that contains the identity resolvers for DID and Handle. |
| `atproto_lexicon` | The package that contains the lexicon parser. |
| Package | Description |
|--------------------|-----------------------------------------------------------------------------|
| `atproto` | Import shortcuts to other packages. |
| `atproto_cli` | CLI tool to generate code. |
| `atproto_client` | XRPC Client, data models, and utils like rich text helper. |
| `atproto_codegen` | Code generator of models, clients, and namespaces. |
| `atproto_core` | Tools to work with NSID, AT URI Schemes, CID, CAR files, and DID Documents. |
| `atproto_crypto` | Crypto utils like multibase, signature verification, work with DID keys. |
| `atproto_firehose` | Firehose (data streaming) client and models. |
| `atproto_identity` | Identity resolvers for DID, Handle, AT Protocol data, signing keys. |
| `atproto_lexicon` | Lexicon parser. |
| `atproro_server` | Server-side utils like JWT. |

I highly recommend you to use the `atproto` package to import everything that you need.
It contains shortcuts to all other packages.
Expand Down Expand Up @@ -196,8 +197,3 @@ with open('cat.jpg', 'rb') as f:
```

I hope you are not scared. May the Force be with you. Good luck!

### Future changes

Things that a want to do soon:
- Provide autogenerated Record Namespaces with more high-level work with basic operations upon records (CRUD + list records)
2 changes: 1 addition & 1 deletion docs/source/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## The AT Protocol SDK

> ⚠️ Under construction. Until the 1.0.0 release, I am not going to care about backward compatibility between versions.
> ⚠️ Under construction. Until the 1.0.0 release compatibility between versions is not guaranteed.

Code snippet:
```python
Expand Down
Loading
Loading