Skip to content

Commit 48b710e

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: 6 - JSON files created/updated: 7 - 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 d847ad0 commit 48b710e

9 files changed

Lines changed: 318 additions & 167 deletions

File tree

.codeboarding/Configuration_Manager.json

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

.codeboarding/Configuration_Manager.rst

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
{
2+
"description": "The PRAW library's core architecture for data retrieval revolves around a client-centric design, with `praw.Reddit` acting as the central orchestrator. This client leverages the external `prawcore` library for all low-level HTTP communications with the Reddit API. Higher-level data access is facilitated through the `praw.models` package, which provides object-oriented representations of Reddit entities and serves as an entry point for initiating data fetches. For handling lists and streams of data, PRAW employs `ListingGenerator` and `StreamGenerator`, respectively. These generators inherit common functionalities from `BaseListingMixin` and interact directly with `praw.Reddit` to execute API calls, ensuring a consistent and efficient mechanism for retrieving both paginated and real-time Reddit content. This layered approach separates concerns, allowing for flexible and robust interaction with the Reddit API.",
3+
"components": [
4+
{
5+
"name": "ListingGenerator",
6+
"description": "Manages paginated requests to the Reddit API, handling parameters like `limit`, `after`, `before`, `sort`, and `time_filter`. It acts as an iterator, yielding individual Reddit model objects.",
7+
"referenced_source_code": [
8+
{
9+
"qualified_name": "praw.models.listing.generator.ListingGenerator",
10+
"reference_file": "praw/models/listing/generator.py",
11+
"reference_start_line": 17,
12+
"reference_end_line": 103
13+
}
14+
],
15+
"assigned_files": [
16+
"praw/models/listing/generator.py"
17+
],
18+
"can_expand": true
19+
},
20+
{
21+
"name": "StreamGenerator",
22+
"description": "Focuses on real-time data retrieval by continuously polling or listening for new items (e.g., new submissions, new comments) and yielding them as they become available.",
23+
"referenced_source_code": [
24+
{
25+
"qualified_name": "praw.models.listing.stream.StreamGenerator",
26+
"reference_file": "praw.models.listing.stream.py",
27+
"reference_start_line": 1,
28+
"reference_end_line": 10
29+
}
30+
],
31+
"assigned_files": [],
32+
"can_expand": true
33+
},
34+
{
35+
"name": "BaseListingMixin",
36+
"description": "A foundational component providing common methods and properties for `ListingGenerator` and `StreamGenerator`, related to making API calls, handling responses, and potentially error handling specific to listing/streaming operations.",
37+
"referenced_source_code": [
38+
{
39+
"qualified_name": "praw.models.listing.mixins.base.BaseListingMixin",
40+
"reference_file": "praw/models/listing/mixins/base.py",
41+
"reference_start_line": 15,
42+
"reference_end_line": 149
43+
}
44+
],
45+
"assigned_files": [
46+
"praw/models/listing/mixins/base.py"
47+
],
48+
"can_expand": true
49+
},
50+
{
51+
"name": "praw.Reddit",
52+
"description": "The main PRAW instance responsible for executing HTTP requests to the Reddit API. It acts as the central client for all API interactions, orchestrating requests and responses.",
53+
"referenced_source_code": [
54+
{
55+
"qualified_name": "praw.Reddit",
56+
"reference_file": "praw/reddit.py",
57+
"reference_start_line": 57,
58+
"reference_end_line": 600
59+
}
60+
],
61+
"assigned_files": [],
62+
"can_expand": true
63+
},
64+
{
65+
"name": "praw.models",
66+
"description": "This package contains various Reddit model objects such as `Submission`, `Comment`, and `Redditor`. It also exposes methods that return instances of `ListingGenerator` and `StreamGenerator`, serving as an entry point to the subsystem for interacting with Reddit data.",
67+
"referenced_source_code": [
68+
{
69+
"qualified_name": "praw.models",
70+
"reference_file": "praw/models/__init__.py",
71+
"reference_start_line": null,
72+
"reference_end_line": null
73+
}
74+
],
75+
"assigned_files": [
76+
"praw/models/list/moderated.py",
77+
"praw/models/list/__init__.py",
78+
"praw/models/list/base.py",
79+
"praw/models/list/draft.py",
80+
"praw/models/list/redditor.py",
81+
"praw/models/list/trophy.py",
82+
"praw/models/listing/__init__.py",
83+
"praw/models/listing/domain.py",
84+
"praw/models/listing/listing.py",
85+
"praw/models/listing/mixins/__init__.py",
86+
"praw/models/listing/mixins/submission.py",
87+
"praw/models/listing/mixins/subreddit.py",
88+
"praw/models/listing/mixins/redditor.py",
89+
"praw/models/listing/mixins/rising.py"
90+
],
91+
"can_expand": true
92+
},
93+
{
94+
"name": "prawcore",
95+
"description": "An external library that handles low-level HTTP communication, including request building, sending, and response parsing. It acts as the underlying transport layer for PRAW, abstracting the complexities of direct API interaction.",
96+
"referenced_source_code": [
97+
{
98+
"qualified_name": "prawcore",
99+
"reference_file": "praw/reddit.py",
100+
"reference_start_line": 527,
101+
"reference_end_line": 546
102+
}
103+
],
104+
"assigned_files": [],
105+
"can_expand": true
106+
},
107+
{
108+
"name": "Unclassified",
109+
"description": "Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)",
110+
"referenced_source_code": [],
111+
"assigned_files": [],
112+
"can_expand": false
113+
}
114+
],
115+
"components_relations": [
116+
{
117+
"relation": "inherits from",
118+
"src_name": "ListingGenerator",
119+
"dst_name": "BaseListingMixin"
120+
},
121+
{
122+
"relation": "inherits from",
123+
"src_name": "StreamGenerator",
124+
"dst_name": "BaseListingMixin"
125+
},
126+
{
127+
"relation": "interacts with",
128+
"src_name": "ListingGenerator",
129+
"dst_name": "praw.Reddit"
130+
},
131+
{
132+
"relation": "interacts with",
133+
"src_name": "StreamGenerator",
134+
"dst_name": "praw.Reddit"
135+
},
136+
{
137+
"relation": "utilizes",
138+
"src_name": "praw.Reddit",
139+
"dst_name": "prawcore"
140+
},
141+
{
142+
"relation": "exposes methods returning",
143+
"src_name": "praw.models",
144+
"dst_name": "ListingGenerator"
145+
},
146+
{
147+
"relation": "exposes methods returning",
148+
"src_name": "praw.models",
149+
"dst_name": "StreamGenerator"
150+
}
151+
]
152+
}
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
Listing Streaming
2+
=================
3+
4+
.. mermaid::
5+
6+
graph LR
7+
ListingGenerator["ListingGenerator"]
8+
StreamGenerator["StreamGenerator"]
9+
BaseListingMixin["BaseListingMixin"]
10+
praw_Reddit["praw.Reddit"]
11+
praw_models["praw.models"]
12+
prawcore["prawcore"]
13+
Unclassified["Unclassified"]
14+
ListingGenerator -- "inherits from" --> BaseListingMixin
15+
StreamGenerator -- "inherits from" --> BaseListingMixin
16+
ListingGenerator -- "interacts with" --> praw_Reddit
17+
StreamGenerator -- "interacts with" --> praw_Reddit
18+
praw_Reddit -- "utilizes" --> prawcore
19+
praw_models -- "exposes methods returning" --> ListingGenerator
20+
praw_models -- "exposes methods returning" --> StreamGenerator
21+
22+
| |codeboarding-badge| |demo-badge| |contact-badge|
23+
24+
.. |codeboarding-badge| image:: https://img.shields.io/badge/Generated%20by-CodeBoarding-9cf?style=flat-square
25+
:target: https://github.com/CodeBoarding/CodeBoarding
26+
.. |demo-badge| image:: https://img.shields.io/badge/Try%20our-Demo-blue?style=flat-square
27+
:target: https://www.codeboarding.org/demo
28+
.. |contact-badge| image:: https://img.shields.io/badge/Contact%20us%20-%20contact@codeboarding.org-lightgrey?style=flat-square
29+
:target: mailto:contact@codeboarding.org
30+
31+
Details
32+
-------
33+
34+
The PRAW library's core architecture for data retrieval revolves around a client-centric design, with `praw.Reddit` acting as the central orchestrator. This client leverages the external `prawcore` library for all low-level HTTP communications with the Reddit API. Higher-level data access is facilitated through the `praw.models` package, which provides object-oriented representations of Reddit entities and serves as an entry point for initiating data fetches. For handling lists and streams of data, PRAW employs `ListingGenerator` and `StreamGenerator`, respectively. These generators inherit common functionalities from `BaseListingMixin` and interact directly with `praw.Reddit` to execute API calls, ensuring a consistent and efficient mechanism for retrieving both paginated and real-time Reddit content. This layered approach separates concerns, allowing for flexible and robust interaction with the Reddit API.
35+
36+
ListingGenerator
37+
^^^^^^^^^^^^^^^^
38+
39+
Manages paginated requests to the Reddit API, handling parameters like `limit`, `after`, `before`, `sort`, and `time_filter`. It acts as an iterator, yielding individual Reddit model objects.
40+
41+
**Related Classes/Methods**:
42+
43+
* praw.models.listing.generator.ListingGenerator:17-103
44+
45+
StreamGenerator
46+
^^^^^^^^^^^^^^^
47+
48+
Focuses on real-time data retrieval by continuously polling or listening for new items (e.g., new submissions, new comments) and yielding them as they become available.
49+
50+
**Related Classes/Methods**:
51+
52+
* praw.models.listing.stream.StreamGenerator:1-10
53+
54+
BaseListingMixin
55+
^^^^^^^^^^^^^^^^
56+
57+
A foundational component providing common methods and properties for `ListingGenerator` and `StreamGenerator`, related to making API calls, handling responses, and potentially error handling specific to listing/streaming operations.
58+
59+
**Related Classes/Methods**:
60+
61+
* praw.models.listing.mixins.base.BaseListingMixin:15-149
62+
63+
praw.Reddit
64+
^^^^^^^^^^^
65+
66+
The main PRAW instance responsible for executing HTTP requests to the Reddit API. It acts as the central client for all API interactions, orchestrating requests and responses.
67+
68+
**Related Classes/Methods**:
69+
70+
* praw.Reddit:57-600
71+
72+
praw.models
73+
^^^^^^^^^^^
74+
75+
This package contains various Reddit model objects such as `Submission`, `Comment`, and `Redditor`. It also exposes methods that return instances of `ListingGenerator` and `StreamGenerator`, serving as an entry point to the subsystem for interacting with Reddit data.
76+
77+
**Related Classes/Methods**:
78+
79+
* praw.models
80+
81+
prawcore
82+
^^^^^^^^
83+
84+
An external library that handles low-level HTTP communication, including request building, sending, and response parsing. It acts as the underlying transport layer for PRAW, abstracting the complexities of direct API interaction.
85+
86+
**Related Classes/Methods**:
87+
88+
* prawcore:527-546
89+
90+
Unclassified
91+
^^^^^^^^^^^^
92+
93+
Component for all unclassified files and utility functions (Utility functions/External Libraries/Dependencies)
94+
95+
**Related Classes/Methods**: *None*

0 commit comments

Comments
 (0)