Skip to content

Commit

Permalink
FURTHER release preparations
Browse files Browse the repository at this point in the history
  • Loading branch information
halcy committed Dec 15, 2017
1 parent f55ff45 commit 4629807
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ of this time, it is feature complete for Mastodon version 2.1.0.

A note about rate limits
------------------------
Mastodons API rate limits per IP. By default, the limit is 300 requests per 5 minute
time slot. This can differ from instance to instance and is subject to change.
Mastodons API rate limits per user account. By default, the limit is 300 requests
per 5 minute time slot. This can differ from instance to instance and is subject to change.
Mastodon.py has three modes for dealing with rate limiting that you can pass to
the constructor, "throw", "wait" and "pace", "wait" being the default.

Expand All @@ -76,6 +76,15 @@ a loop without ever sleeping at all yourself. It is for applications that would
just pretend there is no such thing as a rate limit and are fine with sometimes not
being very interactive.

In addition to the per-user limit, there is a per-IP limit of 7500 requests per 5
minute time slot, and tighter limits on logins. Mastodon.py does not make any effort
to respect these.

If your application requires many hits to endpoints that are available without logging
in, do consider using Mastodon.py without authenticating to get the full per-IP limit. In
this case, you can set the Mastodon objects `ratelimit_limit` and `ratelimit_remaining`
properties appropriately if you want to use advanced rate limit handling.

A note about pagination
-----------------------
Many of Mastodons API endpoints are paginated. What this means is that if you request
Expand Down

0 comments on commit 4629807

Please sign in to comment.