Async_test
Toy example of asynchronous requests with retries. Program will count tags on github repos in 2 ways: using requests library and aiohttp.
Program counts tags on github repos. There are 5 params:
--query
- Query for repos search.--pages-count
- Pages count where tags will be counted. Default = 1.--top
- How many top tags to show. Default = 1.--timeout
- Timeout for cases when status code != 200. Default = 1.--retries-count
- Retries count for cases when status code != 200. Default = 1.
Sometimes for big values of --pages-count
sync and async approaches can show different results. The reason of that is GutHub.com defence versus abuse.