PySnooNotes
Python wrapper for the Snoonotes API
Supported Features:
- Fetch notes for a particular user
- Fetch Subreddit Notes - Caching implemented
- Add notes for a user
- Removing usernotes for a user
Depends On:
requests==2.23.0
Usage:
Imports
To use in your python project, use:
from pysnoonotes.core import SnooNotes
Sample Usage
Authenticate using a Reddit account that can add usernotes and a user_key for that account that can be generated from "https://snoonotes.com/#!/userkey". The generated key is sent via PM to your reddit account.
sn = SnooNotes("username", "user_key")
- Returns a dictionary with usernames and their associated usernotes:
notes_for_username = sn.get_notes_for_user("username")
notes_for_usernames12 = sn.get_notes_for_user(["username1", "username2"])
- Returns notes supported in that particular subreddit:
subreddit_notes = sn.get_notes_for_subreddit("subreddit")
NOTE: This function caches queries using a pickle file to ./caches directory to prevent repeated API requests. By default it automatically updates caches once a day. However, using use_cache=False, you can manually trigger a call that bypasses cache (this call will also update the cache)
- Add a new usernote for the user under a subreddit with a custom note and a link to the comment/post:
sn.add_note_for_user("username", "note_type_id", "subreddit", "Reason for note", "www.reddit.com/r/subreddit/123abc/.../123abc")
- Delete a usernote for a given username, given a note_id.
sn.delete_note_for_user("username","note_id")
The above is also summarized in the sample.py script
Metadata
Release files for pysnoonotes 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysnoonotes-1.1.0.tar.gz | 4.5 kB | Without provenance | Details for pysnoonotes-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysnoonotes-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for pysnoonotes-1.1.0-py3-none-any.whl |
Total release size: 11.2 kB
Release files / pysnoonotes-1.1.0.tar.gz
| Download URL | pysnoonotes-1.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
224a27feb5dd8db0b3ba5d49064310b76d1f620d8dc531c3d09e79ae9fc1b85b
|
|
BLAKE2b-256 checksum How to use checksums |
9f66ba89823573a99f77e5e889d0f3f8db68c20314b255aef65a32c8a24586ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8
|
Release files / pysnoonotes-1.1.0-py3-none-any.whl
| Download URL | pysnoonotes-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4007190fa7ff7be76a2f126a071f821b6b11400d5a32d593a2b8c9faedcc87ff
|
|
BLAKE2b-256 checksum How to use checksums |
20a8af3de0067cff3ad077d6f4b97e91f95d9c238ce021e8912bde8fe38c6e6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.8
|
Security for pysnoonotes 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.