Saravanan666/pypi-org huggingface dataset:
Package: httpmedia
httpmediaWhat is it?Simple file-sharing on HTTP (likepython -m http.serveron steroids)Shows thumbnails for images/videos/others usingvignetteSupports audio/video file seeking (python -m http.serverdoes not!)Can display a slideshow usingbaguetteboxHTTP basic auth for access protectionFewdependenciesFree license (WTFPLv2)Usable through WSGI or standaloneInstallFromPyPI:pipx install httpmediaConfigurationCommand-line arguments (not for WSGI)--bind=ADDRESS--root=DIR: more prioritary than$HTTPMEDIA_ROOTif present, defaults to current directory if neither is set--auth=USER:PASSWORD: protect with HTTP basic auth--auth=env: same as above but fetch credentials from$HTTPMEDIA_USERand$HTTPMEDIA_PASSWORDPORTEnv vars (typically for WSGI)HTTPMEDIA_ROOT: directory to be publishedHTTPMEDIA_BASEURL: useful when reverse proxied, thumbnails and static resources will be refered to be under that base url so request are directed to httpmedia by the reverse proxy
Package: httpmeter
This is a hackable python based HTTP/HTTPS benchmarking tool.
It supports traffic proxying for both HTTP and HTTPS, thus also can be used to
test performance of proxy servers.It is implemented with asyncio and runs on Python >= 3.5.
You can optionally useuvloopfor
better performance.Usagepip3 install httpmeterSynopsis:httpmeter [options] URLOptions:-h  Display usage information.

-c, --concurrency <N>
    How many requests should be executed in parallel.

-n, requests <N>
    How many requests to make in total.

-H, --header <custom-header>
    Additional headers to send with every request. Multiple entries
    allowed. E.g.
        --header "Connection: close" --header "User-Agent: benchmark"

-X, --proxy <http://user:pass@proxy:port>
    Proxy address. E.g. http://user1:pass123@localhost:8080

--uvloop
    Use uvloop to increase networking performance.

-p N, --process-count N
    Use N processes to distribute requests over separate CPU cores.
    By default uses the same number of processes as there are CPU
    cores.Other Toolshttps://github.com/httperf/httperfhttps://github.com/wg/wrkhttp://httpd.apache.org/docs/current/programs/ab.htmlhttps://github.com/borgstrom/httpbenchmarkDevelopmentGet dependencies:$ virtualenv --python3 pyenv
$ pyenv/bin/pip install -r requirements/prod.txtRun the benchmark:$ pyenv/bin/python -m httpmeter -c 100 -n 500 \
    -X http://username:password@1.2.3.4:8080 http://target.com
Package: httpmethods
HTTP Request MethodsHTTP verbs that python core's HTTP parser supports.This module provides an export that is just likeHTTP request methodsfrom Developer Mozilla, with the following differences:All method names are lower-cased.All method names are upper-cased.HTTP Status CodesAlso this module provides a list with allHTTP Status Codesand you can get only status description by status code or get all status.We use the methods package fromNode.jsas inspirationInstallInstall and update usingPip:$pipinstallhttpmethodsAPIimporthttpmethodsasmethodsA Simple Examplefromhttpmethodsimportget_http_methodsformethodinget_http_methods():print(method)$ get
$ post
$ put
$ delete
$ ...fromhttpmethodsimportget_http_methodsfor_methodinget_http_methods(uppercase=True):print(_method)$ GET
$ POST
$ PUT
$ DELETE
$ ...fromhttpmethodsimportget_status_codes,get_status_by_codeprint(get_status_by_code(200))print(get_status_by_code(401))print(get_status_codes())$ 200 OK
$ 401 Unauthorized
$ {
$   100: "100 Continue",
$   101: "101 Switching Protocols",
$   103: "103 Early Hints",
$   ...
$ }LicenseMIT
Package: httpmultipart
Just a Python Http Multipart Post Handler.
You can use it to post multipart requests.UsagePost>>>importhttpmultipart>>>multipart.post(url,fields,files)...The fields and files are both sequence.
After run post function, it will return the response.InstallationAutomatic installation:pip install httpmultipartManual installation: Download the latest source fromPyPI.tar xzvf httpmultipart-$VERSION.tar.gz
cd httpmultipart-$VERSION
python setup.py build
sudo python setup.py installThe HttpMultipart source code ishosted on GitHub.
Package: httpobs-cli
This repository is for the HTTP Observatory command line utility. If
you’re looking for the code for the HTTP Observatory itself, it can be
foundhere.Getting started with the HTTP ObservatoryFirst, install the client:$pipinstallhttpobs-cliAnd then scan websites to your heart’s content, using our hosted
service:$ httpobs www.mozilla.org
Score: 30 [E]
Modifiers:
    [  -5] Initial redirection from http to https is to a different host, preventing HSTS
    [  -5] Subresource Integrity (SRI) not implemented, but all external scripts are loaded over https
    [  -5] X-Content-Type-Options header not implemented
    [ -10] X-XSS-Protection header not implemented
    [ -20] HTTP Strict Transport Security (HSTS) header not implemented
    [ -25] Content Security Policy (CSP) header not implemented

$ httpobs www.google.com
Score: 35 [D-]
Modifiers:
    [  +5] Preloaded via the HTTP Public Key Pinning (HPKP) preloading process
    [  -5] X-Content-Type-Options header not implemented
    [ -20] Cookies set without using the Secure flag or set over http
    [ -20] HTTP Strict Transport Security (HSTS) header not implemented
    [ -25] Content Security Policy (CSP) header not implemented

$ httpobs --zero github.com
Score: 120 [A+]
Modifiers:
    [  +5] HTTP Public Key Pinning (HPKP) header set to a minimum of 15 days (1296000)
    [  +5] Preloaded via the HTTP Strict Transport Security (HSTS) preloading process
    [  +5] Subresource Integrity (SRI) is implemented and all scripts are loaded from a similar origin
    [  +5] X-Frame-Options (XFO) implemented via the CSP frame-ancestors directive
    [   0] All cookies use the Secure flag and all session cookies use the HttpOnly flag
    [   0] Content Security Policy (CSP) implemented with 'unsafe-inline' inside style-src
    [   0] Content is not visible via cross-origin resource sharing (CORS) files or headers
    [   0] Contribute.json isn't required on websites that don't belong to Mozilla
    [   0] Initial redirection is to https on same host, final destination is https
    [   0] X-Content-Type-Options header set to "nosniff"
    [   0] X-XSS-Protection header set to "1; mode=block"If you want additional options, such as to see the raw scan output, usehttpobs--help:$ httpobs --help
usage: httpobs [options] host

positional arguments:
  host           hostname of the website to scan

optional arguments:
  -h, --help     show this help message and exit
  -d, --debug    output only raw JSON from scan and tests
  -r, --rescan   initiate a rescan instead of showing recent scan results
  -v, --verbose  display progress indicator
  -x, --hidden   don't list scan in the recent scan results
  -z, --zero     show test results that don't affect the final scoreAuthorsApril KingLicenseMozilla Public License Version 2.0
Package: http-okapi
A simple HTTP API tool.The ToolThe tool is an HTML page with a background image. These resources are
presented as package resources of thehttp_okapipackage. The
resource filenames areokapi.htmlandokapibg.png. The HTML
page referencesokapibg.pngby name, so the two files are meant
to be served from the same path.CherryPy HandlerThis package also presents a server implementation for CherryPy. To
use it, simply bind thehttp_okapi.cherrypy.Serversomewhere in
your handler tree:class MyServer:
    okapi = http_okapi.cherrypy.Server()Then, the okapi tool will be available at that path.
Package: httpony
HTTPony is an HTTP request listener that pretty prints requests to a terminal.ReleasesVersion 0.3, May 7, 2019Add support for Python 3.5, 3.6, 3.7.Drop support for Python 3.3.Version 0.2, October 20, 2016Update to fix API changes from HTTPie.Version 0.1, August 31, 2015Initial releaseShow HTTP requests in the terminal
Package: http-parser
http-parserHTTP request/response parser for Python compatible with Python 2.x
(>=2.7), Python 3 and Pypy. If possible a C parser based onhttp-parserfrom Ryan Dahl will be used.http-parser is under the MIT license.Project url:https://github.com/benoitc/http-parser/Requirements:Python 2.7 or sup. Pypy latest version.Cython if you need to rebuild the C code (Not needed for Pypy)Installation$ pip install http-parserOr install from source:$ git clone git://github.com/benoitc/http-parser.git
$ cd http-parser && python setup.py installNote: if you get an error on MacOSX try to install with the following
arguments:$ env ARCHFLAGS=”-arch i386 -arch x86_64” python setup.py installUsagehttp-parser provide youparser.HttpParserlow-level parser in C that
you can access in your python program andhttp.HttpStreamproviding
higher-level access to a readable,sequential io.RawIOBase object.To help you in your day work, http-parser provides you 3 kind of readers
in the reader module: IterReader to read iterables, StringReader to
reads strings and StringIO objects, SocketReader to read sockets or
objects with the same api (recv_into needed). You can of course use any
io.RawIOBase object.Example of HttpStreamex:#!/usr/bin/env python
import socket

from http_parser.http import HttpStream
from http_parser.reader import SocketReader

def main():
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    try:
        s.connect(('gunicorn.org', 80))
        s.send("GET / HTTP/1.1\r\nHost: gunicorn.org\r\n\r\n")
        r = SocketReader(s)
        p = HttpStream(r)
        print p.headers()
        print p.body_file().read()
    finally:
        s.close()

if __name__ == "__main__":
    main()Example of HttpParser:#!/usr/bin/env python
import socket

# try to import C parser then fallback in pure python parser.
try:
    from http_parser.parser import HttpParser
except ImportError:
    from http_parser.pyparser import HttpParser


def main():

    p = HttpParser()
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    body = []
    try:
        s.connect(('gunicorn.org', 80))
        s.send("GET / HTTP/1.1\r\nHost: gunicorn.org\r\n\r\n")

        while True:
            data = s.recv(1024)
            if not data:
                break

            recved = len(data)
            nparsed = p.execute(data, recved)
            assert nparsed == recved

            if p.is_headers_complete():
                print p.get_headers()

            if p.is_partial_body():
                body.append(p.recv_body())

            if p.is_message_complete():
                break

        print "".join(body)

    finally:
        s.close()

if __name__ == "__main__":
    main()You can find more docs in the code (or use a doc generator).Copyright2011-2020 (c) Benoît Chesneau <benoitc@e-engura.org>
Package: http-plot-server
plot_serverA lightweight http plot server written in python to visualize data locally. Storing only a fixed number of data points (100 per default) per measurement to keep the resources low.Empty plotSelectable dataQuickstartInstall the package via pippip3 install http-plot-serverAdapt the settings in param.cfg to your needs and runplot_server --cfg=param.cfgor run the module aspython3 -m plot_server --cfg=param.cfgand open your browser with the specified port, per default:http://localhost:8080You can also leave out the cfg flag and default values will be used.Command line options--host: specifies the host (default: 0.0.0.0), can belocalhostto avoid access from outside--port: specifies the port the server runs on (default: 8080)--max-points: specifies the maximum number of data points the plot server stores per measurement (default: 100)--cfg: specifies the path to a config file containing the above command line arguments (seemisc/param.cfg)How to feed data to the plot_serverYou can add data points to the plot_server by a simple http POST request including the json payload{"tag":"Measurement Name","value":1234,"unit":"W","ts":1649859909}Whereunitandtsare optional. Iftsis not provided, then the time is used at which the post request is made. Ifunitis not provided, then the plot_server simply displays "Value" on the y-axis.An example program feeding the plot_server is included in this repository and namedmisc/data_injector.py.A short python snippet would look like thisimportrequestsdata={"tag":"Measurement Name","value":1234,"unit":"W","ts":1649859909}url="http://localhost:8080"requests.post(url,json=data)
Package: http-prep
A tool to easily create complicated and dynamic URLs and headers.Installpip install http-prepimporthttpprepURL=httpprep.URL(protocol="https",subdomain="www",domain="httpbin",top_level_domain="org",path_segments=["post"])URL.components.queries["a","b","b""c","c"]=[1,2,...,4,5]print(URL.build(query_check=...))# any queries whose value is equal to ... will not be included>>>'https://www.httpbin.org/post?a=1&b=2&c=4'HEADERS=httpprep.Headers()HEADERS.Accept="*/*"HEADERS.Authorization="abc123"HEADERS.Content_Disposition=...HEADERS["Some-Non-Standard-Header"]=1234print(HEADERS.format_dict(...))# any headers whose value is equal to ... will not be included>>>{'Accept':'*/*','Authorization':'abc123','Some-Non-Standard-Header':1234}print(HEADERS.format_list(...))# any headers whose value is equal to ... will not be included>>>[('Accept','*/*'),('Authorization','abc123'),('Some-Non-Standard-Header',1234)]print(HEADERS.format_lines(...))# any headers whose value is equal to ... will not be included>>>['Accept: */*','Authorization: abc123','Some-Non-Standard-Header: 1234']
Package: http-pyparser
HTTPPyparserFormat or create HTTP messages easily and simply using theHTTPPyParserlibrary in Python! You can installhttp-pyparserwithpippackage manager:pip install http-pyparserLicenseApache License
Version 2.0, January 2004
http://www.apache.org/licenses/This project uses theApache 2.0license, see theLICENSEfile formore information.
Package: http-raw
http-rawA library for better processing of raw data✌️Installpipinstallhttp-rawUseimporthttprawraw='''POST /post HTTP/1.1Host: httpbin.orgUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateConnection: closeContent-Type: application/x-www-form-urlencodedContent-Length: 19key1=val1&key2=val2'''# resp is requests Responseresp=httpraw.request(raw=raw)print(resp.status_code)print(resp.text)proxy={'socks5':'127.0.0.1:1086'}resp=httpraw.request(raw=raw,proxy=proxy,timeout=5,ssl=True,verify=True)# use apiurl='http://httpbin.org/post'headers='''User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3Accept-Encoding: gzip, deflateConnection: closeContent-Type: application/x-www-form-urlencoded'''data='key1=val1&key2=val2'resp=httpraw.post(url,headers=headers,data=data)Devpipenvinstall--dev
Package: httprealm
httprealmHTTP proxy for Realm of the Mad God written in Python 3.6InstallationBefore installing you need to getPython3.6+To build HTTPRealm from sources, simply use this commands:gitclonegit://github.com/crinny/httprealmcdhttprealm
pipinstall-rrequirements.txtTo start the proxy, execute this command:pythonhttprealm.pyThat's it! No manipulations with client are required.DocumentationPlugin documentation
Package: http-relay
http-relayRelay HTTP requests from localhost to a remote host (act as reverse HTTP proxy).This HTTP relay properly processes also the nonstandard HTTP responses likeICY 200 OKproduced by Shoutcast or NTRIP streaming servers.The relay works properly with hostnames, IPv4 and IPv6 addresses. IPv6 addresses can be specified with or without[].Usageusage: http-relay [-h] [-n NUM_THREADS] [-b BUFFER_SIZE] [-t SIGKILL_TIMEOUT] [-s] host [port] [local_port] [local_addr]

positional arguments:
  host                  The remote host to connect to (e.g. "cvut.cz")
  port                  The remote host's port to connect to (e.g. 80).
  local_port            The local port to be used for the relay. If left out, will be the same as remote port.
  local_addr            Local interface (IP or hostname) to run the relay on. By default, it runs on all IPv4 interfaces (0.0.0.0).

optional arguments:
  -h, --help            show this help message and exit
  -n NUM_THREADS, --num-threads NUM_THREADS
                        Number of threads servicing the incoming requests.
  -b BUFFER_SIZE, --buffer-size BUFFER_SIZE
                        Size of the buffer used for reading responses. Generally, a larger buffer should be more efficient, but if it is too large, the local clients may time out before they receive any data.
  -t SIGKILL_TIMEOUT, --sigkill-timeout SIGKILL_TIMEOUT
                        If specified, the relay will be sigkilled in this number of seconds.
  -s, --sigkill-on-stream-stop
                        If True, --sigkill-timeout will not be counted when no requests are active, and during requests, each successful data transmission will reset the timeout. This can be used to detect
                        stale streams if you expect an application to be constantly receiving data.Python moduleThis package also provides Python modulehttp_relay. You can start the relay as a part of your application like this:fromhttp_relayimportrun# ...run("0.0.0.0",80,"cvut.cz",80)Exampleshttp-relaycvut.cz808080# redirects local port 8080 to cvut.cz:80http-relaycvut.cz2101# redirects local port 2101 to cvut.cz:2101http-relaycvut.cz808080localhost# redirects localhost:8080 to cvut.cz:80 (i.e. no external access to the 8080 port)http-relaystream.cz2101-t10-s# redirects local port 2101 to stream.cz and kills the relay after 10 secs if a stream is being downloaded and becomes stale
Package: http-reqtrace
http-reqtraceDescriptionThe application starts a Web server which logs details of all incoming HTTP requests such as:HTTP Method & URLQuery paramsHeadersBodyThe application accepts all HTTP methods and URIs.
The routing is defined like this:/status/:statusCode: return an HTTP response with status codestatusCodeand body{"message":"OK|KO"}/**/*: return an HTTP response with status code200 OKand body{"message":"OK"}/metrics: return Prometheus metrics regarding HTTP requestsFollowing query parameters are also supported:?latencyInMs=60000: wait for the given period in milliseconds before responding. This time cannot exceed 5 minuts.This service can be used to :See very quickly what are the requests received and inspect their content.Have a quick way to simulate specific cases with particular HTTP response codes.How to useStarts the serviceRun container:$dockerrun-ti--namehttp-reqtrace-p80:8080-ePORT=8080-u65534:65534julb/http-reqtrace:latestNote: thePORTenvironment variable can be set to customize listening port.Request the service with any method, URI and parameters$curlhttp://localhost/context/uri?param1=value1&param2=value2-H"Authorization: Bearer jwt"{"statusCode":200,"message":"OK"}INFOinapp:>[GET]HTTP/1.1http://localhost/context/uri?param1=value1&param2=value2
INFOinapp:>>Header:Host:localhost
INFOinapp:>>Header:User-Agent:curl/7.54.0
INFOinapp:>>Header:Accept:*/*
INFOinapp:>>Header:Authorization:Bearerjwt
INFOinapp:>>Query:param1:value1
INFOinapp:>>Query:param2:value2
INFOinapp:>>Body:b''INFOinapp:<[HTTP200]Getting specific HTTP responses status codes$curlhttp://localhost/status/404-H"Authorization: Bearer jwt"{"statusCode":404,"message":"KO"}$curlhttp://localhost/status/500-H"Authorization: Bearer jwt"{"statusCode":500,"message":"KO"}INFOinapp:>[GET]HTTP/1.1http://localhost/status/404
INFOinapp:>>Header:Host:localhost
INFOinapp:>>Header:User-Agent:curl/7.54.0
INFOinapp:>>Header:Accept:*/*
INFOinapp:>>Header:Authorization:Bearerjwt
INFOinapp:>>Body:b''INFOinapp:<[HTTP404]INFOinapp:>[GET]HTTP/1.1http://localhost/status/500
INFOinapp:>>Header:Host:localhost
INFOinapp:>>Header:User-Agent:curl/7.54.0
INFOinapp:>>Header:Accept:*/*
INFOinapp:>>Header:Authorization:Bearerjwt
INFOinapp:>>Body:b''INFOinapp:<[HTTP500]Simulate latency$curlhttp://localhost/status/504?latencyInMs=60000{"statusCode":504,"message":"KO"}INFOinapp:>[GET]HTTP/1.1http://localhost/status/504?latencyInMs=60000INFOinapp:>>Header:Host:localhost
INFOinapp:>>Header:User-Agent:curl/7.54.0
INFOinapp:>>Header:Accept:*/*
INFOinapp:>>Query:latencyInMs:60000INFOinapp:>>Body:b''INFOinapp:<<Waitingfortimeoutexhaust:60000ms.
INFOinapp:<[HTTP504]
Package: http-request-args
http_request_argsIntroductionGetting StartedExampleContributorsLicenseIntroductionThis library helps to validate the request body and query string arguments. And it's implemented to be used with flask-restplus library.Getting StartedIn order to install, open the command prompt and type ✌️:pip install http-request-argsExampleIn order to use refer to the followingExampleContributorsThis project exists thanks to all the people who contribute. [Contribute].""LicenseThis library is licensed under the MIT License - see theLICENSE.mdfile for details.
Package: http-request-codegen
http-request-codegenDocumentation:en-eshttp-request-codegengenerates HTTP request code snippets for different
implementations. It's perfect if you want to include examples documenting APIs.
Supports the following features:Request parameters values randomization using multiples strategies:Random values from iterables and callables.Random values from data types.Random values fromFaker providers.Randomization using seeds and localization.Request headers customization.Request optional arguments by implementation.Custom line wrapping.Custom indentation.Custom quotation characters.Rendering in one line.
Package: http-request-response
http_request_responseIntroductionGetting StartedContributorsLicenseIntroductionThe main target of this library is to standardize the request response in case of using flask-restplus library.Getting StartedIn order to install, open the command prompt and type ✌️:pip install http-request-responseIn order to import:from http_request_response import RequestUtilitiesMainly this library has two classes:RequestResponseRequestUtilitiesThe response when it is used is like the following:Response body{
  "status_code": ,
  "data": ,
  "message": ""
}In order to use,  the endpoint-function should be decorated with try_except decorartors:@cls.api.route('/')
class ItemPost(Resource):
    ##### Post
    @RequestUtilities.try_except
    def post(self):
        """ Create a new record  """
        return business_obj.create(request.body_args)You have to make sure that the function returns two items:The first one is an object of status code (refer to http_status_code library)JSON serializable dataContributorsThis project exists thanks to all the people who contribute. [Contribute].""LicenseThis library is licensed under the MIT License - see theLICENSE.mdfile for details.
Package: http-requests-viewer
HTTP Requests ViewerA django app to view all http(s) from driver session usingselenium-wireInstallationUsing pip:pipinstallhttp-requests-viewerAdd "bootstrap4" and "http_requests_viewer" in INSTALLED_APPS setting:INSTALLED_APPS=(# ...'bootstrap4','http_requests_viewer',# ...)Include the http_requests_viewer URLconf in your project urls.py:urlpatterns=[# ...path('hr-viewer/',include('http_requests_viewer.urls')),# ...]Runpython manage.py migrateto create the models.Runpython manage.py runserverVisithttp://127.0.0.1:8000/hr-viewer/agents/to create new agent.Visithttp://127.0.0.1:8000/hr-viewer/targets/new/to create new target.