{"id":24527225,"url":"https://github.com/mrsrmn/redditeasy","last_synced_at":"2025-04-14T15:24:25.812Z","repository":{"id":38010331,"uuid":"313892405","full_name":"mrsrmn/RedditEasy","owner":"mrsrmn","description":"RedditEasy is a rapidly-fast API wrapper for getting posts using the Reddit JSON API with both sync and async options","archived":false,"fork":false,"pushed_at":"2022-06-12T11:12:14.000Z","size":905,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T04:22:51.852Z","etag":null,"topics":["aiohttp","api-wrapper","python","python3","reddit"],"latest_commit_sha":null,"homepage":"https://redditeasy.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrsrmn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-18T10:01:14.000Z","updated_at":"2024-09-28T23:31:58.000Z","dependencies_parsed_at":"2022-09-12T13:04:26.069Z","dependency_job_id":null,"html_url":"https://github.com/mrsrmn/RedditEasy","commit_stats":null,"previous_names":["mrsrmn/redditeasy","makufonskifto/redditeasy"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsrmn%2FRedditEasy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsrmn%2FRedditEasy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsrmn%2FRedditEasy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsrmn%2FRedditEasy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsrmn","download_url":"https://codeload.github.com/mrsrmn/RedditEasy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248905019,"owners_count":21180906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","api-wrapper","python","python3","reddit"],"created_at":"2025-01-22T06:17:13.556Z","updated_at":"2025-04-14T15:24:25.787Z","avatar_url":"https://github.com/mrsrmn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation Status](https://readthedocs.org/projects/redditeasy/badge/?version=latest)](https://redditeasy.readthedocs.io/en/latest/?badge=latest)\n[![License](https://img.shields.io/github/license/MakufonSkifto/redditeasy)](LICENSE)\n[![GitHub stars](https://img.shields.io/github/stars/MakufonSkifto/redditeasy)](https://github.com/ExpDev07/coronavirus-tracker-api/stargazers) \n[![PyPI version](https://badge.fury.io/py/redditeasy.svg)](https://badge.fury.io/py/redditeasy)\n[![Monthly Downloads](https://img.shields.io/pypi/dm/redditeasy.svg)](https://badge.fury.io/py/redditeasy)\n[![Downloads](https://pepy.tech/badge/redditeasy)](https://pepy.tech/project/redditeasy)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/22632d363d7747acbbcf357c5b6795c4)](https://www.codacy.com/gh/MakufonSkifto/RedditEasy/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=MakufonSkifto/RedditEasy\u0026amp;utm_campaign=Badge_Grade)\n[![Python Versions](https://img.shields.io/badge/Python-3%20%7C%203.6%20%7C%203.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-blue.svg)](https://img.shields.io/badge/Python-3%20%7C%203.5%20%7C%203.6%20%7C%203.7%20%7C%203.8%20%7C%203.9-blue.svg)\n# RedditEasy\n\nRedditEasy is a rapidly-fast API wrapper for getting posts using the Reddit JSON API with both sync and async options\n\n## Install\nTo install RedditEasy, do:\n\n``pip install redditeasy`` \n\nOR\n\n``python -m pip install redditeasy``\n\nOR (not recommended)\n\n``pip install git+https://github.com/MakufonSkifto/RedditEasy.git``\n\n## Documentation\nDocs can be found [here](https://redditeasy.readthedocs.io/en/latest/)\n\n## Async RedditEasy\nYes, there is an async version of RedditEasy. To use it, you need to use the Async classes. Which are `AsyncSubreddit` and `AsyncUser`\n\nHere is a small example on using `AsyncSubreddit`: https://github.com/MakufonSkifto/RedditEasy/blob/main/examples/async_meme.py\n\nYou can and should use this in a discord.py bot. The normal classes could cause a [blocking](https://discordpy.readthedocs.io/en/latest/faq.html#what-does-blocking-mean) in an async program.\n\nThis **will not** work outside an async function whatsoever.\n\n## Usage\n\n### Without Reddit API client info\nThis method is not suggested as it may be slow and throw errors more often\n\n```python\nimport redditeasy\nimport datetime\n\n# To get your Reddit API client info go to\n# https://www.reddit.com/prefs/apps\n# and create an app\n\n# For more detailed explanation, see this image: https://i.imgur.com/Ri13AQu.png\n\n\npost = redditeasy.Subreddit()\n\npostoutput = post.get_post(subreddit=\"dankmemes\") # Subreddit name\n\n# Formatted version of created_at\nformatted_time = datetime.datetime.fromtimestamp(postoutput.created_at).strftime(\"%d/%m/%Y %I:%M:%S UTC\")\n\nprint(f\"Posts Title: {postoutput.title}\\n\"\n      f\"Posts Content: {postoutput.content}\\n\"\n      f\"Posts Author: u/{postoutput.author}\\n\"\n      f\"Posts URL: {postoutput.post_url}\\n\"\n      f\"Spoiler?: {postoutput.spoiler}\\n\"\n      f\"Post Created At: {formatted_time}\\n\"\n      f\"Posts Upvote Count: {postoutput.score}\\n\"\n      f\"Posts Award Count: {postoutput.total_awards}\\n\"\n      f\"NSFW?: {postoutput.nsfw}\\n\"\n      f\"Post Flair: {postoutput.post_flair}\\n\"\n      f\"User Flair: {postoutput.author_flair}\\n\"\n      f\"Subreddit Subscribers: {postoutput.subreddit_subscribers}\\n\"\n      f\"Comment count: {postoutput.comment_count}\\n\"\n      f\"Is Media?: {postoutput.is_media}\\n\"\n      f\"Subreddit Name: r/{postoutput.subreddit_name}\\n\"\n      f\"Content Type: {postoutput.content_type}\")\n\n```\n\n### With Reddit API client info\n\n```python\nimport redditeasy\nimport datetime\n\n# To get your Reddit API client info go to\n# https://www.reddit.com/prefs/apps\n# and create an app\n\n# For more detailed explanation, see this image: https://i.imgur.com/Ri13AQu.png\n\n\npost = redditeasy.Subreddit(client_id=\"\",            # Your client ID\n                            client_secret=\"\",        # Your client secret\n                            user_agent=\"\"            # Your user agent (ex: ClientName/0.1 by YourUsername\")\n                            )\n\npostoutput = post.get_post(subreddit=\"dankmemes\")    # Subreddit name\n\n# Formatted version of created_at\nformatted_time = datetime.datetime.fromtimestamp(postoutput.created_at).strftime(\"%d/%m/%Y %I:%M:%S UTC\")\n\nprint(f\"Posts Title: {postoutput.title}\\n\"\n      f\"Posts Content: {postoutput.content}\\n\"\n      f\"Posts Author: u/{postoutput.author}\\n\"\n      f\"Posts URL: {postoutput.post_url}\\n\"\n      f\"Spoiler?: {postoutput.spoiler}\\n\"\n      f\"Post Created At: {formatted_time}\\n\"\n      f\"Posts Upvote Count: {postoutput.score}\\n\"\n      f\"Posts Award Count: {postoutput.total_awards}\\n\"\n      f\"NSFW?: {postoutput.nsfw}\\n\"\n      f\"Post Flair: {postoutput.post_flair}\\n\"\n      f\"User Flair: {postoutput.author_flair}\\n\"\n      f\"Subreddit Subscribers: {postoutput.subreddit_subscribers}\\n\"\n      f\"Comment count: {postoutput.comment_count}\\n\"\n      f\"Is Media?: {postoutput.is_media}\\n\"\n      f\"Subreddit Name: r/{postoutput.subreddit_name}\\n\"\n      f\"Content Type: {postoutput.content_type}\")\n\n```\n\nMore examples are in the [examples folder](https://github.com/MakufonSkifto/RedditEasy/tree/main/examples)\n\n## Getting Reddit API client info\nTo get your Reddit API client info go to\nhttps://www.reddit.com/prefs/apps\nand create a script.\n\n![](https://i.imgur.com/Ri13AQu.png)\n\n(You don't have to fill \"redirect_uri\")\n\n## Changelog\n\nChangelog can be found [here](https://redditeasy.readthedocs.io/en/latest/changelog.html)\n\n## Operating Systems\n\nAll of RedditEasy's versions were tested in `Windows`, `Linux (Ubuntu)` and `MacOS`\n\n## Errors\n\nThe module will raise `redditeasy.exceptions.RequestError`  if there was an error with the request. Traceback will show the details about the error\n\nThe module will raise `redditeasy.exceptions.EmptyResult` if the given user / subreddit is empty\n\n## Issues\n\nIf you have any issues with RedditEasy, please report them via the [issue tracker](https://github.com/MakufonSkifto/RedditEasy/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsrmn%2Fredditeasy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsrmn%2Fredditeasy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsrmn%2Fredditeasy/lists"}