Skip to main content

High Performance HTTP Requests Library

Project description

FiberHTTP Supported Versions

FiberHTTP High Performance HTTP Requests Library

GIF

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 might not for you

Fiberhttp is designed to provide high performance but lacks many features like:

missing Features:

  • No Support streaming requests
  • No Support redirects requests
  • No Support compressed requests
  • No Support chunked requests

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.

Features:

  • Keep-alive (socket connection)
  • Upload & Download Multi Files
  • Prepare bytes request before send
  • Create Connection with server before send the request
  • High-performance SSL/TLS handshake, verify
  • Reading responses in various formats such as JSON, headers, Cookies

How to use

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fiberhttp-5.0.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

fiberhttp-5.0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file fiberhttp-5.0.1.tar.gz.

File metadata

  • Download URL: fiberhttp-5.0.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for fiberhttp-5.0.1.tar.gz
Algorithm Hash digest
SHA256 c66d44aeeb8e8a2aaaeba80c4e2998a8b531073d68fbdeb43f630a1ce97b5dfc
MD5 861cc9f55aa2a0e6d7548c6fc59e1676
BLAKE2b-256 1ccf0a8fd67ad07d1f9deba81578bccf021d173e94b06e4e9accdc8b9eddd894

See more details on using hashes here.

File details

Details for the file fiberhttp-5.0.1-py3-none-any.whl.

File metadata

  • Download URL: fiberhttp-5.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for fiberhttp-5.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3a3feafdde371a0cf73f017acd6f085cc1b6bf32a1faafa16293f7c15a58c34
MD5 b1cb5b480b7fc4f1b569d522fc88db55
BLAKE2b-256 7023b0f088a9df2c10134044423a37fba978355b54fe22256a99027dfd287a85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page