NiklasTiede / TinyHTTPie

TinyHTTPie is the Product of the Multi-Part Series "The Evolution of a Script".

Home Page:https://the-coding-lab.com/2021/1-the-evolution-of-a-script/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TinyHTTPie

This repository contains the code to the multi-part series "The Evolution of a Script".

Each branch contains the code of the HTTP client tinyhttp at a different stage of its development. But don't forget that this repository is meant to be a tutorial about python packaging, so if you just need an awesome http client, use HTTPie 😃

Contents

  1. A Simple Script
  2. Sys Module
  3. Argparse Module
  4. Distribution via install.sh
  5. Distribution via setup.py
  6. Testing and CI
  7. Documentation
  8. Publishing at PyPI
  9. Publishing at Anaconda

The version of tinHTTPie within this main branch is the most advanced version.

Installation

Can be easily downloaded, built and installed via pip.

pip install git+https://github.com/NiklasTiede/tinyHTTPie

Example

Some GET requests from the command line.

tihttp -H google.com
Cache-Control: private, max-age=0
Content-Encoding: gzip
Content-Length: 5649
Content-Type: text/html; charset=ISO-8859-1
Date: Sat, 20 Feb 2021 17:08:42 GMT
...tihttp -B http://jsonplaceholder.typicode.com/todos?id=1
[
  {
    "userId": 1,
    "id": 1,
    "title": "delectus aut autem",
    "completed": false
  }
]

I hope you will find something useful for yourself, I'm thankful for every pull request regarding bugs, typos etc. 😃

About

TinyHTTPie is the Product of the Multi-Part Series "The Evolution of a Script".

https://the-coding-lab.com/2021/1-the-evolution-of-a-script/

License:MIT License


Languages

Language:Python 78.7%Language:Shell 21.3%