Skip to main content

A simple typed argument parser using dataclasses and type hints. This project is largely generated by ChatGPT.

Project description

SimpleArgParser

Installation

Introduction

This is a simple command line argument parser encapsulated based on Python dataclasses and type hints, supporting:

  • Defining arguments using classes (required, optional, and arguments with default values)
  • Nested dataclasses, with argument names separated by dots
  • JSON configuration file loading (priority: command line > code input > JSON config > default value)
  • List type arguments (supports comma separation)
  • Enum types (pass in the name of the enum member, and display options in the help)
  • Custom post-processing (post_process method)

Detailed introduction is coming soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simpleargparser-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simpleargparser-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file simpleargparser-0.1.0.tar.gz.

File metadata

  • Download URL: simpleargparser-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for simpleargparser-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4547e91c04e8c390cff7ca57a77aaaad2c6d30425ae2bfbd82b8cfdf623c5494
MD5 9fc72c3f21e04ddcc177e2e4e53f2333
BLAKE2b-256 5e48098b166f0dc766daac75e8c70ce40b6755595ded84aad29f604926c34dba

See more details on using hashes here.

File details

Details for the file simpleargparser-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simpleargparser-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2c09951e1daacc0e74c9d9635d124e9423985945a928ad644319399efa7bd9e
MD5 82492aedba92c0ffd1d0f35b5634c819
BLAKE2b-256 d5df40dc04aa641f794ffd621c83243ccb5cadf74f2e83b1f7970e241fd1a3ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page