Library for easier asyncio concurrent tasks.
Project description
Python asyncio railgun
A python3.4+ asyncio library wrapper for utilzing asyncio tasks and gather(*) functionality. Library is meant to make concurrent tasks easier and safer through the use of semaphores.
Table of contents
Requirements
This library requires Python 3.6 and above.
Note: You may need to use
python3
before your commands to ensure you use the correct Python path. e.g.python3 --version
python --version
-- or --
python3 --version
Installation
We recommend using PyPI to install the Slack Developer Kit for Python.
pip3 install asyncio-railgun==0.0.1
Basic Usage examples
Run
from asyncio import get_event_loop
from railgun.railgun import Railgun
from http import client
def example_call_api(host='www.google.com', url='/'):
conn = client.HTTPSConnection(host, port=443, timeout=5)
conn.request(method='GET', url=url)
response = conn.getresponse()
return response.status
rail_gun = Railgun(semaphores_count=10)
results = rail_gun.run([example_call_api(), example_call_api()])
print(results)
Run async
TBD
Repeat
TBD
Support
TBD
Contact me on christogoosen@gmail.com
Otherwise see the examples and log an issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file asyncio-railgun-0.0.3.linux-x86_64.tar.gz
.
File metadata
- Download URL: asyncio-railgun-0.0.3.linux-x86_64.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d78454334f8657572f632f04d09915ccd6c0e6f7aaa2f4c1e31f26dfc7210246 |
|
MD5 | 899e179eb0c7380ec0666e4f21f474f8 |
|
BLAKE2b-256 | 789174ff15979f625baa0ef056f897210d6dfcd4d17a4bfabb01ec388553768b |