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 😃
- A Simple Script
- Sys Module
- Argparse Module
- Distribution via install.sh
- Distribution via setup.py
- Testing and CI
- Documentation
- Publishing at PyPI
- Publishing at Anaconda
The version of tinHTTPie within this main branch is the most advanced version.
Can be easily downloaded, built and installed via pip
.
pip install git+https://github.com/NiklasTiede/tinyHTTPie
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. 😃