Skip to content

Commit 5dcaebd

Browse files
committed
docs: update codeboarding documentation
## 📚 Documentation Update This commit contains updated documentation files fetched from the CodeBoarding service. ### 📊 Summary - Documentation files created/updated: 5 - JSON files created/updated: 6 - Documentation directory: .codeboarding/ - JSON directory: .codeboarding/ - Output format: .rst - Repository analyzed: https://github.com/CodeBoarding/praw - Source branch: main - Target branch: main 🤖 This commit was automatically generated by the CodeBoarding documentation update workflow.
1 parent 3acb442 commit 5dcaebd

18 files changed

Lines changed: 563 additions & 682 deletions

.codeboarding/API_Client_Core.json

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"reference_start_line": 57,
1212
"reference_end_line": 901
1313
}
14-
],
15-
"can_expand": true
14+
]
1615
},
1716
{
1817
"name": "Client Initializer",
@@ -36,8 +35,7 @@
3635
"reference_start_line": 479,
3736
"reference_end_line": 525
3837
}
39-
],
40-
"can_expand": true
38+
]
4139
},
4240
{
4341
"name": "Request Executor",
@@ -49,8 +47,7 @@
4947
"reference_start_line": 0,
5048
"reference_end_line": 0
5149
}
52-
],
53-
"can_expand": false
50+
]
5451
},
5552
{
5653
"name": "Response Objectifier",
@@ -62,8 +59,7 @@
6259
"reference_start_line": 0,
6360
"reference_end_line": 0
6461
}
65-
],
66-
"can_expand": true
62+
]
6763
},
6864
{
6965
"name": "Rate Limit Manager",
@@ -75,8 +71,7 @@
7571
"reference_start_line": 0,
7672
"reference_end_line": 0
7773
}
78-
],
79-
"can_expand": false
74+
]
8075
},
8176
{
8277
"name": "API Operation Methods",
@@ -112,8 +107,7 @@
112107
"reference_start_line": 0,
113108
"reference_end_line": 0
114109
}
115-
],
116-
"can_expand": true
110+
]
117111
},
118112
{
119113
"name": "Async Checker",
@@ -125,8 +119,7 @@
125119
"reference_start_line": 388,
126120
"reference_end_line": 411
127121
}
128-
],
129-
"can_expand": false
122+
]
130123
}
131124
],
132125
"components_relations": [

.codeboarding/API_Client_Core.md

Lines changed: 0 additions & 100 deletions
This file was deleted.

.codeboarding/API_Client_Core.rst

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
High-level diagram representation of: praw
2+
==========================================
3+
4+
.. mermaid::
5+
6+
graph LR
7+
API_Client_Core["API Client Core"]
8+
Client_Initializer["Client Initializer"]
9+
Request_Executor["Request Executor"]
10+
Response_Objectifier["Response Objectifier"]
11+
Rate_Limit_Manager["Rate Limit Manager"]
12+
API_Operation_Methods["API Operation Methods"]
13+
Async_Checker["Async Checker"]
14+
Client_Initializer -- "initializes" --> API_Client_Core
15+
API_Client_Core -- "manages" --> Request_Executor
16+
API_Client_Core -- "manages" --> Response_Objectifier
17+
API_Client_Core -- "manages" --> Rate_Limit_Manager
18+
API_Client_Core -- "exposes" --> API_Operation_Methods
19+
API_Operation_Methods -- "invokes" --> Request_Executor
20+
Request_Executor -- "checks" --> Async_Checker
21+
Request_Executor -- "returns raw response to" --> Response_Objectifier
22+
Response_Objectifier -- "transforms for" --> API_Operation_Methods
23+
API_Operation_Methods -- "consults" --> Rate_Limit_Manager
24+
click API_Client_Core href "https://github.com/CodeBoarding/praw/blob/main/.codeboarding/API_Client_Core.html" "Details"
25+
26+
| |codeboarding-badge| |demo-badge| |contact-badge|
27+
28+
.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square
29+
:target: https://github.com/CodeBoarding/GeneratedOnBoardings
30+
.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square
31+
:target: https://www.codeboarding.org/demo
32+
.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square
33+
:target: mailto:contact@codeboarding.org
34+
35+
Details
36+
-------
37+
38+
The PRAW Reddit API client is structured around the `API Client Core`, which serves as the primary interface for users. This core is set up by the `Client Initializer`, configuring essential components like the HTTP client and response parsing. User interactions, such as fetching data or creating posts, are handled by `API Operation Methods`. These methods delegate the actual HTTP communication to the `Request Executor`, which may consult the `Async Checker` for proper asynchronous execution. Upon receiving a raw response, the `Request Executor` passes it to the `Response Objectifier` for transformation into structured Python objects, which are then returned to the `API Operation Methods`. Throughout this process, the `Rate Limit Manager` is consulted to ensure adherence to Reddit's API usage policies, with the `API Client Core` overseeing and managing these interactions.
39+
40+
API Client Core
41+
^^^^^^^^^^^^^^^
42+
43+
:ref:`Expand <API_Client_Core>`
44+
45+
Serves as the main entry point for users to interact with the Reddit API. It orchestrates all underlying operations, manages the client's state, and exposes a high-level, object-oriented interface.
46+
47+
**Related Classes/Methods**:
48+
49+
* `QName:`praw.reddit.Reddit` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py`, Lines:(57:901) <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L57-L901>`_
50+
51+
Client Initializer
52+
^^^^^^^^^^^^^^^^^^
53+
54+
Sets up the API Client Core instance, including configuring the underlying HTTP client (prawcore) and the response objectification mechanism. It integrates `prawcore` for HTTP requests and the `Objector` for response parsing.
55+
56+
**Related Classes/Methods**:
57+
58+
* `QName:`praw.reddit.Reddit.__init__` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
59+
* `QName:`praw.reddit._prepare_prawcore` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py`, Lines:(527:546) <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L527-L546>`_
60+
* `QName:`praw.reddit._prepare_objector` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py`, Lines:(479:525) <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L479-L525>`_
61+
62+
Request Executor
63+
^^^^^^^^^^^^^^^^
64+
65+
Executes the raw HTTP requests to the Reddit API, handling the low-level communication details.
66+
67+
**Related Classes/Methods**:
68+
69+
* `QName:`praw.reddit.Reddit.request` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
70+
71+
Response Objectifier
72+
^^^^^^^^^^^^^^^^^^^^
73+
74+
Transforms the raw JSON responses from the API into structured PRAW Python objects, making them easier to consume and work with.
75+
76+
**Related Classes/Methods**:
77+
78+
* `QName:`praw.reddit.Reddit._objectify_request` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
79+
80+
Rate Limit Manager
81+
^^^^^^^^^^^^^^^^^^
82+
83+
Monitors and enforces Reddit's API rate limits, pausing requests when necessary to prevent exceeding usage quotas and ensuring compliance.
84+
85+
**Related Classes/Methods**:
86+
87+
* `QName:`praw.reddit.Reddit._handle_rate_limit` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
88+
89+
API Operation Methods
90+
^^^^^^^^^^^^^^^^^^^^^
91+
92+
Provide specific, high-level methods for common API operations (e.g., fetching data, creating posts, deleting resources), abstracting the underlying request and response handling details from the end-user.
93+
94+
**Related Classes/Methods**:
95+
96+
* `QName:`praw.reddit.Reddit.get` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
97+
* `QName:`praw.reddit.Reddit.post` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
98+
* `QName:`praw.reddit.Reddit.delete` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
99+
* `QName:`praw.reddit.Reddit.patch` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
100+
* `QName:`praw.reddit.Reddit.put` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py` <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L0-L0>`_
101+
102+
Async Checker
103+
^^^^^^^^^^^^^
104+
105+
Manages and verifies the asynchronous context for operations, ensuring proper execution in async environments.
106+
107+
**Related Classes/Methods**:
108+
109+
* `QName:`praw.reddit._check_for_async` FileRef: `/home/ubuntu/CodeBoarding/repo/praw/praw/reddit.py`, Lines:(388:411) <https://github.com/CodeBoarding/praw/blob/main/.codeboarding/praw/reddit.py#L388-L411>`_
110+
111+
112+
FAQ
113+
---
114+
115+
`See the FAQ <https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq>`_

.codeboarding/Exception_Handling.json

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)