From 93fc8e19be231383dfb1e02ca756d1b5d004fbea Mon Sep 17 00:00:00 2001 From: Erik Pohl <89852209+ErikPohl444@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:55:29 -0500 Subject: [PATCH 1/5] Update README.md Fixed some grammar in the readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2da27bf8..613c41f8 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ You can get help in several ways: ### Advanced usage -I'll be honest. The high-level Client that was shown in the "Quick Start" section is not a real ATProto API. This is syntax sugar built upon the real XRPC methods! The high-level methods are not cover the full need of developers. To be able to do anything that you want, you should know to work with low-level API. Let's dive into it! +I'll be honest. The high-level Client that was shown in the "Quick Start" section is not a real ATProto API. This is syntax sugar built upon the real XRPC methods! The high-level methods do not cover the full needs of developers. To be able to do anything that you want, you should know to work with low-level API. Let's dive into it! The basics: - Namespaces – classes that group sub-namespaces and the XRPC queries and procedures. Built upon NSID ATProto semantic. From 5e5a0151274ec75be06882e7f39ec273fed12a55 Mon Sep 17 00:00:00 2001 From: Erik Pohl <89852209+ErikPohl444@users.noreply.github.com> Date: Sat, 14 Dec 2024 16:51:40 -0500 Subject: [PATCH 2/5] Update README.md added text --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 613c41f8..229a1e97 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ You can get help in several ways: ### Advanced usage -I'll be honest. The high-level Client that was shown in the "Quick Start" section is not a real ATProto API. This is syntax sugar built upon the real XRPC methods! The high-level methods do not cover the full needs of developers. To be able to do anything that you want, you should know to work with low-level API. Let's dive into it! +I'll be honest. The high-level Client that was shown in the "Quick Start" section is not a real ATProto API. This is syntax sugar built upon the real XRPC methods! The high-level methods do not cover the full needs of developers. To be able to do anything that you want, you should know how to work with low-level API. Let's dive into it! The basics: - Namespaces – classes that group sub-namespaces and the XRPC queries and procedures. Built upon NSID ATProto semantic. From 2791200774e2a149d3b437ea5f2114e450f5e2d8 Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Sat, 14 Dec 2024 23:09:40 +0100 Subject: [PATCH 3/5] update readme.content.md --- docs/source/readme.content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/readme.content.md b/docs/source/readme.content.md index a9475e4f..df79346d 100644 --- a/docs/source/readme.content.md +++ b/docs/source/readme.content.md @@ -97,7 +97,7 @@ You can get help in several ways: ### Advanced usage -I'll be honest. The high-level Client that was shown in the "Quick Start" section is not a real ATProto API. This is syntax sugar built upon the real XRPC methods! The high-level methods are not cover the full need of developers. To be able to do anything that you want, you should know to work with low-level API. Let's dive into it! +I'll be honest. The high-level Client that was shown in the "Quick Start" section is not a real ATProto API. This is syntax sugar built upon the real XRPC methods! The high-level methods do not cover the full needs of developers. To be able to do anything that you want, you should know how to work with low-level API. Let's dive into it! The basics: - Namespaces – classes that group sub-namespaces and the XRPC queries and procedures. Built upon NSID ATProto semantic. From 528c703764f6457401d19fbcacd2fa52c2b67212 Mon Sep 17 00:00:00 2001 From: Erik Pohl <89852209+ErikPohl444@users.noreply.github.com> Date: Sat, 14 Dec 2024 17:12:08 -0500 Subject: [PATCH 4/5] Update README.md Made additional language changes per request. --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 229a1e97..e9a6dcd7 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ if __name__ == '__main__': ### Introduction -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. +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. The SDK also provides utilities to work with CID, NSID, AT URI Schemes, DAG-CBOR, CAR files, DID Documents and more. ### Requirements @@ -93,7 +93,7 @@ pip install atproto ### Quick start -First of all, you need to create the instance of the XRPC Client. To do so, you have two major options: asynchronous, and synchronous. The difference only in import and how you call the methods. If you are not familiar with async, use sync instead. +First of all, you need to create the instance of the XRPC Client. To do so, you have two major options: asynchronous and synchronous. The difference is only in the import and how you call the methods. If you are not familiar with async, use sync instead. For sync: @@ -117,7 +117,7 @@ client = AsyncClient() In the snippets below, only the sync version will be presented. -Right after the creation of the Client instance, you probably want to access the full API and perform actions by profile. To achieve this, you should log in to the network using your handle and password. The password could be app-specific. +Right after the creation of the Client instance, you will probably want to access the full API and perform actions by profile. To achieve this, you should log into the network using your handle and password. The password could be app-specific. ```python from atproto import Client @@ -126,9 +126,9 @@ client = Client() client.login('my-username', 'my-password') ``` -You are awesome! Now you feel to pick any high-level method that you want and perform it! +You are awesome! Now feel free to pick any high-level method that you want and try it out! -Code to send post: +Code to send a post: ```python from atproto import Client @@ -160,7 +160,7 @@ The SDK is built upon the following components: | `atproto_lexicon` | Lexicon parser. | | `atproto_server` | Server-side utils like JWT. | -I highly recommend you to use the `atproto` package to import everything that you need. +I highly recommend that you use the `atproto` package to import everything that you need. It contains shortcuts to all other packages. ### Documentation @@ -193,7 +193,7 @@ Client().com Client().app ``` -To dive deeper, you can navigate using hints from your IDE. Thanks to well-type hinted SDK, it's much easier. +To dive deeper, you can navigate using hints from your IDE. Thanks to a well-type hinted SDK, it's much easier. ```python from atproto import Client @@ -204,11 +204,11 @@ Client().app.bsky.feed.get_likes(...) Client().app.bsky.graph.get_follows(...) ``` -The endpoint of the path is always the method that you want to call. The method presents a query or procedure in XRPC. You should not care about it much. The only thing you need to know is that the procedures required data objects. Queries could be called with or without params. +The endpoint of the path is always the method you want to call. The method presents a query or procedure in XRPC. You should not care about it much. The only thing you need to know is that the procedures require data objects. Queries could be called with or without params. #### Records -In some sub-namespaces, you can find records. Such record classes provide a syntax sugar not defined in the lexicon scheme. This sugar provides a more convenient way to work with repository operations. Such as creating a record, deleting a record, and so on. +In some sub-namespaces, you can find records. Such record classes provide a syntax sugar not defined in the lexicon scheme. This sugar provides a more convenient way to work with repository operations, such as creating a record, deleting a record, and so on. Here are some available records of Bluesky records: @@ -270,14 +270,14 @@ The model classes in the "models" aliases could be: - Record model - Type model -The only thing you need to know is how to create instances of models. Not with all models, you will work as model-creator. For example, SDK will create Response models for you. +The only thing you need to know is how to create instances of models. You won't need to work as model-creator for all models. For example, the SDK will create Response models for you. -There are a few ways how to create the instance of a model: +There are a few ways to create the instance of a model: - Dict-based - Class-based -The instances of data and params models should be passed as arguments to the methods that were described above. +The instances of any data and params models should be passed as arguments to the methods that were described above. Dict-based: @@ -301,13 +301,13 @@ params = models.ComAtprotoIdentityResolveHandle.Params(handle='marshal.dev') print(client.com.atproto.identity.resolve_handle(params)) ``` -Tip: look at typehint of the method to figure out the name and the path to the input/data model! +Tip: look at the typehint of the method to figure out the name and the path to the input/data model! Pro Tip: use IDE autocompletion to find necessary models! Just start typing the method name right after the dot (`models.{type method name in camel case`). -Models could be nested as hell. Be ready for it! +Models can be nested to the innermost rings of hell. Be ready for it! -This is how we can send a post with the image using low-level XRPC Client: +This is how we can send a post with an image using low-level XRPC Client: ```python from atproto import Client, models From 2aa1af4626150e409180b39e0a6dbfbac5fa59bf Mon Sep 17 00:00:00 2001 From: "Ilya (Marshal)" Date: Sat, 14 Dec 2024 23:27:03 +0100 Subject: [PATCH 5/5] sync with readme.content.md --- README.md | 2 +- docs/source/readme.content.md | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e9a6dcd7..6a08c1af 100644 --- a/README.md +++ b/README.md @@ -270,7 +270,7 @@ The model classes in the "models" aliases could be: - Record model - Type model -The only thing you need to know is how to create instances of models. You won't need to work as model-creator for all models. For example, the SDK will create Response models for you. +The only thing you need to know is how to create instances of models. You won't need to work as model-creator for all models. For example, the SDK will create Response models for you. There are a few ways to create the instance of a model: diff --git a/docs/source/readme.content.md b/docs/source/readme.content.md index df79346d..6865b9fd 100644 --- a/docs/source/readme.content.md +++ b/docs/source/readme.content.md @@ -1,6 +1,6 @@ ### Introduction -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. +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. The SDK also provides utilities to work with CID, NSID, AT URI Schemes, DAG-CBOR, CAR files, DID Documents and more. ### Requirements @@ -14,7 +14,7 @@ pip install atproto ### Quick start -First of all, you need to create the instance of the XRPC Client. To do so, you have two major options: asynchronous, and synchronous. The difference only in import and how you call the methods. If you are not familiar with async, use sync instead. +First of all, you need to create the instance of the XRPC Client. To do so, you have two major options: asynchronous and synchronous. The difference is only in the import and how you call the methods. If you are not familiar with async, use sync instead. For sync: @@ -38,7 +38,7 @@ client = AsyncClient() In the snippets below, only the sync version will be presented. -Right after the creation of the Client instance, you probably want to access the full API and perform actions by profile. To achieve this, you should log in to the network using your handle and password. The password could be app-specific. +Right after the creation of the Client instance, you will probably want to access the full API and perform actions by profile. To achieve this, you should log into the network using your handle and password. The password could be app-specific. ```python from atproto import Client @@ -47,9 +47,9 @@ client = Client() client.login('my-username', 'my-password') ``` -You are awesome! Now you feel to pick any high-level method that you want and perform it! +You are awesome! Now feel free to pick any high-level method that you want and try it out! -Code to send post: +Code to send a post: ```python from atproto import Client @@ -81,7 +81,7 @@ The SDK is built upon the following components: | `atproto_lexicon` | Lexicon parser. | | `atproto_server` | Server-side utils like JWT. | -I highly recommend you to use the `atproto` package to import everything that you need. +I highly recommend that you use the `atproto` package to import everything that you need. It contains shortcuts to all other packages. ### Documentation @@ -114,7 +114,7 @@ Client().com Client().app ``` -To dive deeper, you can navigate using hints from your IDE. Thanks to well-type hinted SDK, it's much easier. +To dive deeper, you can navigate using hints from your IDE. Thanks to a well-type hinted SDK, it's much easier. ```python from atproto import Client @@ -125,11 +125,11 @@ Client().app.bsky.feed.get_likes(...) Client().app.bsky.graph.get_follows(...) ``` -The endpoint of the path is always the method that you want to call. The method presents a query or procedure in XRPC. You should not care about it much. The only thing you need to know is that the procedures required data objects. Queries could be called with or without params. +The endpoint of the path is always the method you want to call. The method presents a query or procedure in XRPC. You should not care about it much. The only thing you need to know is that the procedures require data objects. Queries could be called with or without params. #### Records -In some sub-namespaces, you can find records. Such record classes provide a syntax sugar not defined in the lexicon scheme. This sugar provides a more convenient way to work with repository operations. Such as creating a record, deleting a record, and so on. +In some sub-namespaces, you can find records. Such record classes provide a syntax sugar not defined in the lexicon scheme. This sugar provides a more convenient way to work with repository operations, such as creating a record, deleting a record, and so on. Here are some available records of Bluesky records: @@ -191,14 +191,14 @@ The model classes in the "models" aliases could be: - Record model - Type model -The only thing you need to know is how to create instances of models. Not with all models, you will work as model-creator. For example, SDK will create Response models for you. +The only thing you need to know is how to create instances of models. You won't need to work as model-creator for all models. For example, the SDK will create Response models for you. -There are a few ways how to create the instance of a model: +There are a few ways to create the instance of a model: - Dict-based - Class-based -The instances of data and params models should be passed as arguments to the methods that were described above. +The instances of any data and params models should be passed as arguments to the methods that were described above. Dict-based: @@ -222,13 +222,13 @@ params = models.ComAtprotoIdentityResolveHandle.Params(handle='marshal.dev') print(client.com.atproto.identity.resolve_handle(params)) ``` -Tip: look at typehint of the method to figure out the name and the path to the input/data model! +Tip: look at the typehint of the method to figure out the name and the path to the input/data model! Pro Tip: use IDE autocompletion to find necessary models! Just start typing the method name right after the dot (`models.{type method name in camel case`). -Models could be nested as hell. Be ready for it! +Models can be nested to the innermost rings of hell. Be ready for it! -This is how we can send a post with the image using low-level XRPC Client: +This is how we can send a post with an image using low-level XRPC Client: ```python from atproto import Client, models