Skip to main content

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.

Metadata

Release files for argparse-to-json 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argparse-to-json 0.0.1
File Size Uploaded Provenance
argparse-to-json-0.0.1.tar.gz 3.7 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for argparse-to-json 0.0.1
File Interpreter ABI Platform
argparse_to_json-0.0.1-py3.10.egg Legacy Egg format - - Details
argparse_to_json-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / argparse-to-json-0.0.1.tar.gz

Download URL argparse-to-json-0.0.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1258e92912c4ffaa2fb46483bded5a84741b015383e79a0b86410e1b559d6691
BLAKE2b-256 checksum
How to use checksums
f14f9d31345765fc05acd63647a6269e6ec70f2820a072ad0eaf6044bf4cb4fd
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / argparse_to_json-0.0.1-py3.10.egg

Download URL argparse_to_json-0.0.1-py3.10.egg
Size 4.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
ecbebab1253337a37dab76e0bf1ac520deffd0b330986a4f21d198f150e4ed03
BLAKE2b-256 checksum
How to use checksums
c6fd54c0c76fd740488dbd12f8a2db6b0245d79b694e62f3886a6b069642898f
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / argparse_to_json-0.0.1-py3-none-any.whl

Download URL argparse_to_json-0.0.1-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6b80c9b5e6075a50ca85a86176d90937ea03b75108d1ba0c5fdb4b65f39575d
BLAKE2b-256 checksum
How to use checksums
796f42048f98d02d22b398f306e64687255b34b43fac90c86e58d44f86d2e578
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for argparse-to-json 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.1 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page