Reddit API for telereddit and discoreddit.
-
Clone the repository
-
Install requirements
pip install -r requirements/requirements.txt
Before using pyreddit you must initialize it with a valid configuration secret using python-dotenv.
-
Duplicate
/pyreddit/config/.env.template
-
Fill the required secrets (this duplicated file should NOT be committed.)
-
Initialize the environment variables
import os from dotenv import load_dotenv from pyreddit.services.services_wrapper import ServicesWrapper load_dotenv( dotenv_path=os.path.join(os.path.dirname(__file__), "../config/.env") ) ServicesWrapper.init_services() reddit.get_post("https://www.reddit.com/r/DidntKnowIWantedThat/comments/iruaqs/but_do_i_really_need_it/")
If you want to report a bug or would like a feature to be added, feel free to open an issue.
-
Open an issue to discuss the change you want to make
-
Fork the repository
-
Install dev requirements
pip install -r requirements/dev.txt
-
Make changes
-
Run tests
python -m unittest
-
Open a pull request and make sure all checks pass
We follow Semantic Versioning. The version X.Y.Z indicates:
- X is the major version (backward-incompatible),
- Y is the minor version (backward-compatible), and
- Z is the patch version (backward-compatible bug fix).
GPL v3 - Copyright 2020 © fabio.sangregorio.dev.