Skip to main content

More comfortable requests with python

Project description

HttpPy

Python based HttpPy for more comfortable requests.

Installation

PiPY

(env)$ pip install HttpPy

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 -m HttpPy -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 -m HttpPy -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.2.tar.gz (6.1 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.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: HttpPy-0.0.2.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for HttpPy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 86befd65db43266d543138f63129dbe04dc244c3e4cce4adc21c8b2c2f88f15e
MD5 42f9cfce2ece644e7de9077046f567d5
BLAKE2b-256 8318f9ac5fd0b276288282ddef51a065492d983c85ff9bac083f7861a7e00215

See more details on using hashes here.

File details

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

File metadata

  • Download URL: HttpPy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for HttpPy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c050a8252b3c850b5012040a4989dd163c31382f1a1bbd6dc9672b5155bf8513
MD5 ca1e865cbbcd224a18b3bc1b24de11e2
BLAKE2b-256 93898e3098e008cd1419501f0ca7dc648949e43da6f6e394509a5d4243bfb778

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