【文件属性】:
文件名称:Promise_Scrapy:适用于Scrapy请求的Promise API
文件大小:19KB
文件格式:ZIP
更新时间:2021-04-05 17:11:14
Python
不回调。
基于回调的异步库的Promise风格的接口。
yield from (
Promise . all (
open_db_connection (),
Promise . race (
fetch_data_region_US (),
fetch_data_region_DE (),
),
)
. then ( parse_data )
. then ( update_rows )
. then ( commit )
. catch ( rollback )
. finally_ ( close_connection )
)
## Contents
This library imitates the logic of the `
【文件预览】:
Promise_Scrapy-master
----.gitignore(2KB)
----promise_scrapy()
--------async_.py(4KB)
--------__init__.py(77B)
--------base.py(343B)
--------utils.py(4KB)
--------exceptions.py(3KB)
--------promise.py(16KB)
----example.py(719B)
----README.md(29KB)