Skip to content

Commit

Permalink
Small fixes in documentation
Browse files Browse the repository at this point in the history
pt-EN :p
  • Loading branch information
ecarrara committed Jul 13, 2023
1 parent e883185 commit d0e7fca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Usage::
from simple_token_bucket import SimpleTokenBucket
from simple_token_bucket.backends.redis import RedisBackend

# Put this somewhere safe!
third_party_api_rate_limit_bucket = SimpleTokenBucket(
name="third_party_api",
bucket_size=3,
Expand All @@ -21,10 +20,10 @@ Usage::
third_party_api_rate_limit_bucket.try_get_token()
third_party_api_rate_limit_bucket.try_get_token()

# a quarta chamada deve falhar com a exception NotEnoughTokens
# will raises NotEnoughTokens
third_party_api_rate_limit_bucket.try_get_token()

# após 10s a chama volta a funcionar
# after 10 seconds everythin works again
import time
time.sleep(10)
third_party_api_rate_limit_bucket.try_get_token()
Expand Down

0 comments on commit d0e7fca

Please sign in to comment.