Convert argparse.ArgumentParser to json compatible with JSON Form
Project description
argparse-to-json
Convert Python argparse parsers to json compatible with JSON Form.
Usage
import argparse
from argparse_to_json import convert_parser_to_json
parser = argparse.ArgumentParser()
parser.add_argument('input')
json_schema = convert_parser_to_json(parser)
See the example folder for a Flask app that renders forms for command line interfaces using JSON Form. You can run the example as follows:
pip install flask
FLASK_APP=app.py
flask run
Why?
Because maybe I wanted to have a simple way to create GUIs for my Python CLI's.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argparse-to-json-0.0.1.tar.gz.
File metadata
- Download URL: argparse-to-json-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1258e92912c4ffaa2fb46483bded5a84741b015383e79a0b86410e1b559d6691
|
|
| MD5 |
ff5edd9a984f188a24099767ff991e80
|
|
| BLAKE2b-256 |
f14f9d31345765fc05acd63647a6269e6ec70f2820a072ad0eaf6044bf4cb4fd
|
File details
Details for the file argparse_to_json-0.0.1-py3.10.egg.
File metadata
- Download URL: argparse_to_json-0.0.1-py3.10.egg
- Upload date:
- Size: 4.8 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecbebab1253337a37dab76e0bf1ac520deffd0b330986a4f21d198f150e4ed03
|
|
| MD5 |
ade0b8a67ca637992492478bf61bc705
|
|
| BLAKE2b-256 |
c6fd54c0c76fd740488dbd12f8a2db6b0245d79b694e62f3886a6b069642898f
|
File details
Details for the file argparse_to_json-0.0.1-py3-none-any.whl.
File metadata
- Download URL: argparse_to_json-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6b80c9b5e6075a50ca85a86176d90937ea03b75108d1ba0c5fdb4b65f39575d
|
|
| MD5 |
893f54e242f24d23699c48696c985110
|
|
| BLAKE2b-256 |
796f42048f98d02d22b398f306e64687255b34b43fac90c86e58d44f86d2e578
|