class asyncpraw.models.reddit.subreddit.SubredditWiki(subreddit: asyncpraw.models.Subreddit)

Provides a set of wiki functions to a Subreddit.

__init__(subreddit: asyncpraw.models.Subreddit)

Initialize a SubredditWiki instance.


subreddit – The subreddit whose wiki to work with.

await create(*, content: str, name: str, reason: str | None = None, **other_settings: Any)

Create a new WikiPage.

  • name – The name of the new WikiPage. This name will be normalized.

  • content – The content of the new WikiPage.

  • reason – The reason for the creation.

  • other_settings – Additional keyword arguments to pass.

To create the wiki page "praw_test" in r/test try:

subreddit = await reddit.subreddit("test")
    name="praw_test", content="wiki body text", reason="Async PRAW Test Creation"
await get_page(page_name, fetch: bool = True, **kwargs) WikiPage

Return the WikiPage for the Subreddit named page_name.

  • page_name – Name of the wikipage.

  • fetch – Determines if Async PRAW will fetch the object (default: True).

This method is to be used to fetch a specific wikipage, like so:

subreddit = await reddit.subreddit("test")
wikipage = await"proof")
revisions(**generator_kwargs: Any) AsyncGenerator[Dict[str, asyncpraw.models.Redditor | WikiPage | str | int | bool | None], None]

Return a ListingGenerator for recent wiki revisions.

Additional keyword arguments are passed in the initialization of ListingGenerator.

To view the wiki revisions for "praw_test" in r/test try:

subreddit = await reddit.subreddit("test")
page = await"praw_test")
async for item in page.revisions():