Intuitive multi-threaded task processing in python.
Project description
pylateral
Intuitive multi-threaded task processing in python.
Example
import urllib.request
@pylateral.task
def request_and_print(url):
response = urllib.request.urlopen(url)
print(response.read())
URLS = [
"https://www.nytimes.com/",
"https://www.cnn.com/",
"https://europe.wsj.com/",
"https://www.bbc.co.uk/",
"https://some-made-up-domain.com/",
]
with pylateral.task_pool():
for url in URLS:
request_and_print(url)
print("Complete!")
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
pylateral-1.0.0.tar.gz
(8.3 kB
view hashes)
Built Distribution
pylateral-1.0.0-py3-none-any.whl
(12.4 kB
view hashes)
Close
Hashes for pylateral-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 357f321e9229544ef93f0a4ccd4fce218b3a472c52ae99250df34ca2b2252d23 |
|
MD5 | bdc834387d94b0ff83064680c0b93a20 |
|
BLAKE2b-256 | aa11ed8c5b09cca637e1f4dd17a05325b877b93577bcdd2955b60bdeb38df241 |