Skip to content

segmentio/gevent-semaphore-decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gevent-semaphore-decorator

Note
Segment has paused maintenance on this project, but may return it to an active status in the future. Issues and pull requests from external contributors are not being considered, although internal contributions may appear from time to time. The project remains available under its open source license for anyone to use.

pip install gevent_semaphore_decorator

usage

from gevent_semaphore_decorator import semaphore
import requests

@semaphore(5)
def make_request():
  requests.get(...)

Now, only 5 requests will be made concurrently. The rest will hold without blocking the rest of your program.

About

semaphore / concurrency limiting function decorator

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages