Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Acl | 2,570 | 5 days ago | 32 | lgpl-3.0 | C | |||||
A powerful server and network library, including coroutine, redis client, http, websocket, mqtt with C/C++ for multi-platform. | ||||||||||
Mix | 1,868 | 24 days ago | 70 | August 05, 2021 | 1 | apache-2.0 | PHP | |||
☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架,支持 Swoole、Swow、WorkerMan、FPM、CLI-Server | ||||||||||
Userver | 1,693 | 18 hours ago | 77 | apache-2.0 | C++ | |||||
The C++ Asynchronous Framework (beta) | ||||||||||
Node Practice | 1,330 | 6 years ago | 3 | mit | JavaScript | |||||
Node.js 实践教程 | ||||||||||
Saber | 928 | 16 | 23 | 2 years ago | 28 | April 20, 2021 | 20 | apache-2.0 | PHP | |
⚔️ Saber, PHP异步协程HTTP客户端 | PHP Coroutine HTTP client - Swoole Humanization Library | ||||||||||
Restc Cpp | 529 | 3 months ago | 57 | mit | C++ | |||||
Modern C++ REST Client library | ||||||||||
Simps | 395 | 2 | a year ago | 6 | October 15, 2020 | 2 | apache-2.0 | PHP | ||
🚀 A simple, lightweight and high-performance PHP coroutine framework. | ||||||||||
Shadowfax | 356 | a year ago | 34 | January 15, 2022 | 11 | mit | PHP | |||
Run Laravel on Swoole. | ||||||||||
Circuits | 284 | 4 months ago | 38 | other | Python | |||||
circuits is a Lightweight Event driven and Asynchronous Application Framework for the Python Programming Language with a strong Component Architecture. | ||||||||||
Awesome Swoole | 270 | 3 years ago | ||||||||
A curated list of Swoole |
TRIP, Tornado & Requests In Pair, an async HTTP library for Python.
Simple as Requests, Trip let you get rid of annoying network blocking.
Coroutine in python 2.7+ can be this simple:
import trip
def main():
r = yield trip.get('https://httpbin.org/get', auth=('user', 'pass'))
print(r.content)
trip.run(main)
With Trip, you may finish one hundred requests in one piece of time.
Trip gets its name from two powerful site packages and aims to combine them together. Trip refers to 'Tornado & Requests In Pair', TRIP. To put them together, I reused much of their codes about structure and dealing. Actually I only made little effort to make a mixture. Thanks to Tornado and Requests.
Through using Trip, you may take full advantage of Requests, including: Sessions with Cookie persistence, browser-style SSL verification, automatic content decoding, basic/digest authentication, elegant key/value Cookies. Meanwhile, your requests are coroutine like using AsyncHTTPClient of Tornado, network blocking will not be a problem.
Found difficult optimizing spiders' time consuming? Found tricky using asyncio http packages? Found heavy custimizing big spider framework? Try Trip, you will not regret!
Paste it into your console and enjoy:
python -m pip install trip
Documents are here: http://trip.readthedocs.io/zh/latest/
Some of the advaced features are listed here:
Using async and await in python 3
import trip
async def main():
r = await trip.get('https://httpbin.org/get', auth=('user', 'pass'))
print(r.content)
trip.run(main)
Sessions with Cookie persistence
import trip
def main():
s = trip.Session()
r = yield s.get(
'https://httpbin.org/cookies/set',
params={'name': 'value'},
allow_redirects=False)
r = yield s.get('https://httpbin.org/cookies')
print(r.content)
trip.run(main)
Event hooks
import trip
def main():
def print_url(r, *args, **kwargs):
print(r.url)
def record_hook(r, *args, **kwargs):
r.hook_called = True
return r
url = 'http://httpbin.org/get'
r = yield trip.get('http://httpbin.org', hooks={'response': [print_url, record_hook]})
print(r.hook_called)
trip.run(main)
Timeouts
import trip
def main():
r = yield trip.get('http://github.com', timeout=0.001)
print(r)
trip.run(main)
Proxy
import trip
proxies = {
'http': '127.0.0.1:8080',
'https': '127.0.0.1:8081',
}
def main():
r = yield trip.get('https://httpbin.org/get', proxies=proxies)
print(r.content)
trip.run(main)