Apraw

Latest version: v0.6.8a0

Safety actively analyzes 630390 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.4.0

Update Log

**Major:**

- Implement [`AuthenticatedUser.karma() -> Karma`](https://apraw.readthedocs.io/en/latest/api/reddit/user.htmlauthenticateduser) with `subreddit() -> Subreddit` method.
- Implement `class Listing`. Handles parsing of listings and acts as an iterator/generator.
- Add `last` auto-property for last item.
- Use in `class Reddit` and `class ListingGenerator`.
- `Reddit.info()` with `ids` automatically splits into batches of 100 items.
- Explicitly set `kind` in `class aPRAWBase` and add `fullname` auto-property.
- Implement [`class SubmissionModeration`](https://apraw.readthedocs.io/en/latest/api/models/submission/submission_moderation.html) and [`class CommentModeration`](https://apraw.readthedocs.io/en/latest/api/models/comment/comment_moderation.html).
-

**Minor:**

- Improve typing and using `functools.wraps()` for wrapper functions.
- Optimize imports.
- Create and use mixins for hideable, spoilerable, savable etc. in `class Submission` and `class Comment`.
- This does not change the usage of methods such as `save()`, `hide()` and `author()`.

---

**Docs:**

- Setup Sphinx documentation structure.
- Document all classes, helpers and models used by end-user with NumPyDoc format.
- Add installation, quickstart guide and examples.
- Setup RTD Theme.
- Publish docs to [RTD](http://apraw.readthedocs.io/).

**Tests:**

- Write tests for `class AuthenticatedUser`.
- Write tests for `class SubmissionModeration`, `class CommentModeration` and new mixins.

0.3.2alpha

Update Log

- Add `skip_existing` to streams, only recommended for use with `/new` endpoints.
- Refactor `class SubredditWikiPage` to `SubredditWikipage`.

**Tests:**

- Improved tests for listing generator.

0.3.0alpha

Update Log

**Typing:**

aPRAW is now fully type-hinted. Type-hints were added to previously untyped methods.

**`class aPRAWBase`:**

Used in `Subreddit`, `Submission` and other Reddit items. Dynamically sets attributes from data, and parses `created_utc` if present. Method `_update()` takes data and updates class attributes if missing.

**`class User`/`class AuthenticatedUser`:**

- Add `class User` managing user login information, access data, tokens and ratelimit.
- Also includes `me()` returning an `AuthenticatedUser`
- `AuthenticatedUser` implements `Redditor` features.
- `karma()` method currently not mapped to correct endpoint.

**Subreddit Wiki:**

- Implement `class SubredditWiki`, `class SubredditWikiPage`, `class WikipageRevision`;
- Add `SubredditWiki.revisions: ListingGenerator`.
- Add `SubredditWiki.__call__() -> List[str]`.
- Add `SubredditWiki.page(page: str) -> SubredditWikiPage`.
- Add `SubredditWiki.create(page: str, content_md: str, reason: str) -> SubredditWikiPage`.
- Add `SubredditWikiPage.revisions: ListingGenerator`.
- Add `SubredditWikiPage.add_editor(username: str)`.
- Add `SubredditWikiPage.del_editor(username: str)`.
- Add `SubredditWikiPage.edit(content_md: str, reason: str) -> bool`.
- Add `WikipageRevision.__str__()`.

**Other:**

- Add `Reddit.wiki_revision_kind`.
- Add util function `prepend_kind(org: str, kind: str)`.

**Tests:**

- Tests are excluded from PyPi package.
- Write tests for new wikiclasses and functions.
- Write tests for new util function.

0.2.0alpha

**Update Log:**

- Create `apraw.reddit.RequestHandler` to handle ratelimit and add `asyncio.sleep()` to requests.
- Create `apraw.reddit.Auth` to manage login tokens and ratelimit.
- Remove unused `SubredditStream` class in favor of using `ListingGenerator`.
- Remove `apraw.Reddit.get_listing()` in favor of using `ListingGenerator`.
- Add usage of `ListingGenerator` to the following classes/methods:
- `apraw.subreddit.SubredditModeration`
- `apraw.subreddit.SubredditModmail`
- `apraw.Redditor.comments()` and `submissions()`
- `apraw.Reddit.subreddits()`
- Make `ListingGenerator.get_listing_generator() -> aiter()` a class-method.
- Add `apraw.Comment.subreddit()`
- Inject `apraw.Subreddit` into `apraw.Comment` wherever possible.
- Add injection of `apraw.Subreddit` into `ListingGenerator` for use in `Comment` and `Submission`.
- Implement `/api/info` endpoint: `apraw.Reddit.info(id: str, ids: List[str], url: str)`

**Tests:**
- Update tests using PyTest framework. Create `confest.py` with global `Reddit` fixture.
- Add (incomplete) type-hinting to tests.
- Write tests for `apraw.Subreddit.mod.reports()` and `log()`.
- Write tests for `apraw.Comment.subreddit()`.
- Write tests for `apraw.Reddit.subreddits`.

0.1.1alpha

**Initial release:**

This first version features a PyPi release that can be installed on local clients and be used in a global context. Working and tested features include streams, endless listings, fetching Redditors, Subreddits, Modmail, Comments, Submissions as well as using Reddit's messaging service.

Page 3 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.