Module pyreddit.reddit

Reddit API interface module.

Contains all the functions to call Reddit APIs, retrieve the desired information and build pyreddit objects.

Functions

def init(env_path: Union[str, NoneType] = None) ‑> NoneType

Init environment variables and services.

Parameters

env_path : Optional[str]
path for the dotenv config file. Defaults to /config/.env
def get_post(post_url: str) ‑> Post

Get the post from the Reddit API and construct the Post object.

Parameters

post_url : str
post url to fetch from the Reddit API.

Returns

Post Post object containing all the retrieved post information.