Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
FiberHTTP
High Performance HTTP Requests Library
The benchmarks folder contains comparisons between FiberHTTP
and other well-known libraries such as requests
, httpx
, http.client
, and others. You will notice that FiberHTTP
outperforms them every time
Fiberhttp is designed to provide high performance but lacks many features like:
missing Features:
All these features are not supported by the library for the purpose of improving performance.
If these features are important to you, and you value compatibility and functionality over performance, then the requests library might be a better choice for you.
Benchmarks Codes: benchmarks
Library | Results (Lower is Better) |
---|---|
FiberHTTP | 1,000,000 HTTP Requests in 18 SEC'S |
http.client | 1,000,000 HTTP Requests in 92 SEC'S |
AIOHTTP | 1,000,000 HTTP Requests in 162 SEC'S |
urllib3 | 1,000,000 HTTP Requests in 221 SEC'S |
HTTPX | 1,000,000 HTTP Requests in 332 SEC'S |
HTTPX-ASYNC | 1,000,000 HTTP Requests in 427 SEC'S |
requests | 1,000,000 HTTP Requests in 472 SEC'S |
install Fiberhttp (supported all os systems)
pip install fiberhttp
with client session
import fiberhttp
# create client session with timeout
# ! timeout arg not requierd
cn = fiberhttp.Client(timeout=10)
# send get request
res = cn.get('https://httpbin.org/ip')
status_code = res.status_code()
body = res.text()
headers = res.headers()['Date']
json = res.json()['origin']
without client session
import fiberhttp
# send request without create client
response = fiberhttp.get('https://httpbin.org/ip')
with proxies
import fiberhttp
# create client proxy
cn = fiberhttp.Client_Proxy('http://20.111.54.16:8123')
# send request after the proxy in the client session
response = cn.get('https://httpbin.org/ip').json()['origin']
print(response)
use prepare request to get high performance
import fiberhttp
cn = fiberhttp.Client()
# prepare request with this format
request = fiberhttp.Request('GET', 'https://httpbin.org/ip')
# send request after prepare it
response = cn.send(request).json()
create connection with host before send request to reduce response time
import fiberhttp
cn = fiberhttp.Client()
request = fiberhttp.Request('GET', 'https://httpbin.org/ip')
# create connection with host
cn.connect('httpbin.org')
response = cn.send(request).text()
print(response)
FAQs
High Performance HTTP Requests Library
We found that fiberhttp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.