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.tar.gz (12.2 kB view details)

Uploaded Source

Built Distributions

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

Uploaded Python 3

fiberhttp-5.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fiberhttp-5.0.tar.gz
  • Upload date:
  • Size: 12.2 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.tar.gz
Algorithm Hash digest
SHA256 38f8f1bc0cf033c9c35087c23402a37d374989249dc2e655353f5f2b86bab572
MD5 d4261847fd427099a88234d7967a7c5d
BLAKE2b-256 a77e1081b5af86451f60928064c96b7e2d0ee917b4b5ef4c05d0c381ecd71c2f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fiberhttp-5.0.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f15994b2027afd1bee96d05bea2cd6d0ff88b05ea174a418dfdf122740d25d0b
MD5 8945f4821a48f130d78ca875532b2ec7
BLAKE2b-256 7c017c04e147f1e55182f542ea8affed3043be7c1741d4372106cace6ec573be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fiberhttp-5.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 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-py3-none-any.whl
Algorithm Hash digest
SHA256 6ee581e1d0cef26af6eb3cd573cae253ae162b0930cf74d69d45a08a3ec2b238
MD5 12d73b813cd886270566f49959060af5
BLAKE2b-256 eaa92cc8d6015b9d1b9115cb76e0cfb1fc8004edfda36d2c2041d8b10a62f786

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