argparse2typer
Use case
- Do you ever need to work on an open source project and find that they use argparse? Nothing's wrong with argparse but you have already been falling in love with
typerCLI (you all will someday)? - Fear no more, just use
argparse2typerand all the argparse code would be parsed intotyperCLI with as little changes as possible.
Installation
- With pip:
pip install argparse2typer
Usage
- Locate the line
args = parser.parse_args()in the original script - Import the function
from argparse2typer import argparse2typer - Run the function before
parse_args:
argparse2typer(parser=parser, output_path=Path(<path>)) # <- new line
args = parser.parse_args()
- New file @
Metadata
Release files for argparse2typer 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| argparse2typer-0.0.2.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| argparse2typer-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.8 kB
Release files / argparse2typer-0.0.2.tar.gz
| Download URL | argparse2typer-0.0.2.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42b25ee2b833037b4ce549cff48491f24f5e92eb04af00aef3505b790b8db6d1
|
|
BLAKE2b-256 checksum How to use checksums |
84e6e5859cb5d8a422191161c3650f6877be58909f0eb33b2568d24b604d3c46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / argparse2typer-0.0.2-py3-none-any.whl
| Download URL | argparse2typer-0.0.2-py3-none-any.whl |
|---|---|
| Size | 16.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee1d760ef3979560109347f43e81e3c15cb592f36c3c0446a329a846e36f58bb
|
|
BLAKE2b-256 checksum How to use checksums |
dbb6e7e7844884c0d4b0952fc6f9d32ea68337f7b6d92dab1668611ec10260d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|