Skip to content

Commit f015024

Browse files
Andrew-Chen-WangLilSpazJoekp
authored andcommitted
(doc) Mention requiring closing Reddit http connection
1 parent d5e8743 commit f015024

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/getting_started/quick_start.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,16 @@ to read-only mode whenever you want:
157157
If you are uncomfortable hard-coding your credentials into your program, there are
158158
some options available to you. Please see: :ref:`configuration`.
159159

160+
Close Connections in :class:`.Reddit`
161+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162+
163+
The asynchronous context requires closing your session when you finish using Reddit:
164+
165+
.. code-block:: python
166+
167+
reddit = asyncpraw.Reddit(...)
168+
await reddit.close()
169+
160170
Obtain a :class:`.Subreddit`
161171
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162172

0 commit comments

Comments
 (0)