Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cloudmercato/pycurlb
Python cURL benchmark - Get info about connection
https://github.com/cloudmercato/pycurlb
benchmark curl curl-library http http-client python
Last synced: about 1 month ago
JSON representation
Python cURL benchmark - Get info about connection
- Host: GitHub
- URL: https://github.com/cloudmercato/pycurlb
- Owner: cloudmercato
- License: bsd-3-clause
- Created: 2019-02-14T03:38:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-08-26T20:14:13.000Z (4 months ago)
- Last Synced: 2024-09-27T04:53:31.223Z (3 months ago)
- Topics: benchmark, curl, curl-library, http, http-client, python
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
=====================
Python cURL benchmark
=====================pycurlb is a wrapper around libcurl and pycurl allowing to retrieve info about connections.
Install
=======This project works only with Python 3.
::
pip install pycurlb
Usage
=====In Python
---------::
from pycurlb import Curler
curler = Curler()
info = curler.perform('http://example.com')
print(info)
In Shell
--------::
curlb http://example.com
{
"appconnect_time": 0.0,
"connect_time": 0.20492,
"content_length_download": 1270.0,
"content_length_upload": -1.0,
"content_type": "text/html; charset=UTF-8",
"effective_url": "http://example.com/",
"ftp_entry_path": null,
"header_size": 344,
"http_code": 200,
"http_connectcode": 0,
"local_ip": "10.211.55.3",
"local_port": 35040,
"namelookup_time": 0.02877,
"num_connects": 1,
"os_errno": 0,
"pretransfer_time": 0.20498700000000003,
"primary_ip": "93.184.216.34",
"primary_port": 80,
"redirect_count": 0,
"redirect_time": 0.0,
"redirect_url": null,
"request_size": 141,
"size_download": 1270.0,
"size_upload": 0.0,
"speed_download": 3478.0,
"speed_upload": 0.0,
"ssl_engines": [],
"ssl_verifyresult": 0,
"starttransfer_time": 0.364974,
"total_time": 0.36507199999999995
}
We try to keep the same options than the original ``curl`` comamnd.