Skip to content

ContentGardeningStudio/http-request-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

http-request-cli

Minimal example project that exposes two command-line interfaces for performing simple HTTP requests:

  • http-argparse: implemented with the standard library argparse
  • http-typer: implemented with typer (built on Click)

Both CLIs offer similar functionality so you can compare:

  • Project structure
  • Developer ergonomics
  • Help output and UX

Installation (editable)

uv pip install -e .
# or
pip install -e .

Usage

Argparse version:

http-argparse https://httpbin.org/get -H "X-Demo: argparse"

Typer version:

http-typer request https://httpbin.org/get -H "X-Demo: typer"

This repository is intentionally small and focused so it can be used in blog posts, talks, or training material comparing argparse and typer.

About

http-request-cli example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages