Skip to content

Commit

Permalink
updated example
Browse files Browse the repository at this point in the history
  • Loading branch information
biplap-sarkar committed Mar 15, 2016
1 parent af5d7cc commit bb364c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ Suppose you want to limit the number of api calls to be 1000 per minute. It can

1.) Import the library
```
from pylimit.pylimit import PyLimit
from pylimit import PyRateLimit
```

2.) Initialize the library
```
PyLimit.init(redis_host="localhost", redis_port=6379)
PyRateLimit.init(redis_host="localhost", redis_port=6379)
```

3.) Create a rate limit namespace
```
limit = PyLimit()
limit = PyRateLimit()
limit.create(60, # rate limit period in seconds
100) # no of attempts in the time period
```
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ Suppose you want to limit the number of api calls to be 1000 per minute. It can

1.) Import the library
```
from pylimit.pylimit import PyLimit
from pylimit import PyRateLimit
```

2.) Initialize the library
```
PyLimit.init(redis_host="localhost", redis_port=6379)
PyRateLimit.init(redis_host="localhost", redis_port=6379)
```

3.) Create a rate limit namespace
```
limit = PyLimit()
limit = PyRateLimit()
limit.create(60, # rate limit period in seconds
100) # no of attempts in the time period
```
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
setup(
name = 'pylimit',
packages = ['pylimit'],
version = '0.1.0-beta',
description = 'Rate limiting library for python using Redis',
version = '0.1.4',
description = 'A distributed rate limiting library for python using leaky bucket algorithm and Redis',
author='Biplap Sarkar',
author_email='[email protected]',
url='https://github.com/biplap-sarkar/pylimit',
download_url='https://github.com/biplap-sarkar/pylimit/archive/v0.1.0-beta.tar.gz',
download_url='https://github.com/biplap-sarkar/pylimit/archive/v0.1.4.tar.gz',
keywords=['rate limiting', 'throttle', 'redis'],
classifiers=[],
)

0 comments on commit bb364c3

Please sign in to comment.