https://github.com/jeds6391/reddit-saved-post-viewer-api
Provides an API for accessing your saved posts on reddit.com
https://github.com/jeds6391/reddit-saved-post-viewer-api
api flask posts python reddit saved
Last synced: 8 months ago
JSON representation
Provides an API for accessing your saved posts on reddit.com
- Host: GitHub
- URL: https://github.com/jeds6391/reddit-saved-post-viewer-api
- Owner: JedS6391
- Created: 2019-11-03T01:54:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T06:48:51.000Z (over 3 years ago)
- Last Synced: 2023-03-07T04:25:50.700Z (about 3 years ago)
- Topics: api, flask, posts, python, reddit, saved
- Language: Python
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reddit saved post API
This project contains a web API for accessing reddit saved posts.
## Run
### Environment variables
The following environment variables are required by the API:
- `SECRET_KEY`: A secret key used for flask-session
- `CLIENT_ID`: The reddit client ID (must be obtained via [reddit](https://www.reddit.com/prefs/apps))
- `CLIENT_SECRET`: The reddit client secret (must be obtained via [reddit](https://www.reddit.com/prefs/apps))
- `REDIRECT_URI`: The reddit redirect URI (must be obtained via [reddit](https://www.reddit.com/prefs/apps))
- `SESSION_TYPE`: The type of session backend used by flask-session
- `APP_SETTINGS`: Which configuration object to use: `config.DevelopmentConfig` or `config.ProductionConfig`
The following environment variables are optional for the API:
- `WORKER_LOGGING_LEVEL`: Controls the logging level for the queue workers
- `NUMBER_OF_WORKERS`: Controls the number of queue workers
### Server
To run the main server, first populate any required environment variables, then start an application instance using `gunicorn`:
```
gunicorn main:app.app
```
To start the queue workers, simply execute:
```
python3 worker.py
```