Skip to main content

More comfortable requests with python

Project description

HttpClient

Python based HttpClient for more comfortable requests.

Usage

Single Request

Sometimes you may just want to send a single request. To achieve that there are some flags ready to use.

(env)$ python HttpClient -t post -u http://127.0.0.1:8000 -d '{"user": "eve", "password": "12345"}'
  • -t / --type
    Represents the request verb [ get | post | put | patch | options | delete ] to use.
  • -u / --url
    Is the endpoint to reach.
  • -d / --data
    Represents the body of the request.

Several Requests

If you need to send several requests, you can use a file as an input.

(env)$ python HttpClient -i example.request
  • -i / --input
    Is the path to a file that contains the requests especifications.

An example of a post request inside example.request file may be:

## This comment is important to parse correctly the request
POST http://127.0.0.1:8000
Headers
ContentType: application/json
Authorization: Basic QWxhZGRpbjpvcGuIHN1c2FtZQ==
{
  "data": "data one",
  "data 2": "data two"
}

Extra flags

There are two optional flags that may help you:

  • -v / --verbose
    The presence of this flag will indicate that the especifications of requests and a more detailed reponse will be printed in the screen.
  • -p / --parallel
    This flag is intented to help with performance and excecution times. Internally indicates that several threads are going to be used for the requests.

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

HttpPy-0.0.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

HttpPy-0.0.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file HttpPy-0.0.1.tar.gz.

File metadata

  • Download URL: HttpPy-0.0.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for HttpPy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 10790e35aae50352ca6bffe27398fb94ec1d578dcbaf77b34b34a3572f5442da
MD5 0c7ccc29318a3eef2515f72053491520
BLAKE2b-256 ecacc66c18e1b20a0a3b85814d4abc42944888d29e770db9fc41bf6fb0551e67

See more details on using hashes here.

File details

Details for the file HttpPy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: HttpPy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.2

File hashes

Hashes for HttpPy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 250475e550f86447c39c149c141f4ac2d27c267551966d34657b4466e04fd316
MD5 f28dc4f731dacf3247976e60ff697e1e
BLAKE2b-256 91d3a120bc7119dffc178a65fb34ae963ce5852a3dd5d7bcb2d87b07c1d8cd97

See more details on using hashes here.

Supported by

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