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

pip install simpleArgParser

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. Please also refer to examples/example.py.

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.4.tar.gz (6.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.4-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simpleargparser-0.1.4.tar.gz
  • Upload date:
  • Size: 6.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.4.tar.gz
Algorithm Hash digest
SHA256 7cabf583950e75fb206811ce804dc678d4e3f15e26f6d5bf98fdc3e308ddb4bf
MD5 b52cd1d0764f7d50cd899a76a4c389a8
BLAKE2b-256 837e5cf9fbc8798692a7e474f3db918e6d12623340e80296ecad9ff2bd9c0bbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simpleargparser-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f19f7d43400e5dc3727c66fea210d339c32a3a80f4235474f06dcbdc47269ec7
MD5 84b1556ba03cf21216d095e6171181fc
BLAKE2b-256 caeb629d55431d53b8763ef1e0878ead9879543ebc9a733dd221c1117fb3f4f7

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