The fundamental operations that the user of the library cares about are "check if I can take an action" and "record that I took, or am about to take, an action". The standlone functions provide the tools needed to build the above operations. They do not have any policy beyond the translation of their use case to the underlying key-value store operations, so they are valuable in unusual cases. The new RateLimit uses them to make the probably-common case of ratelimits pulled from g.live_config simpler. It provides check() and record_usage() operations. Also, add documentation and _multi variants and support rate limits with greater than 1 day periods, despite that they are more likely to fail due to cache resets.
Greetings!
This is the primary codebase that powers reddit.com.
For notices about major changes and general discussion of reddit development, subscribe to the /r/redditdev and /r/changelog subreddits.
You can also chat with us via IRC in #reddit-dev on freenode.
Quickstart
To set up your own instance of reddit to develop with, we have a handy install script for Ubuntu that will automatically install and configure most of the stack.
Alternatively, refer to our Install Guide for instructions on setting up reddit from scratch. Many frequently asked questions regarding local reddit installs are covered in our FAQ.
APIs
To learn more about reddit's API, check out our automated API documentation and the API wiki page. Please use a unique User-Agent string and take care to abide by our API rules.
Happy hacking!
Issues and Contribution Guidelines
Thanks for wanting to help make reddit better! First things first, though: github issues is only for confirmed, active bugs. Please submit ideas to /r/ideasfortheadmins.
Please read more on contributions in CONTRIBUTING.md.