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.2.tar.gz (5.9 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.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simpleargparser-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 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.2.tar.gz
Algorithm Hash digest
SHA256 d5c6e2af45301a781bea06e03b3810873e7cab7cb689701a4be73d2e8647a4e9
MD5 516210d29b57c54192e21eb686542206
BLAKE2b-256 88afae88a1063574fd74f5171b773879c251e4a9a07b57cbbb078f183f14ce41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simpleargparser-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a758c588f7cf6003a5ef76e823e416ab9abbb1b7beb7d6e4fd149679b2b52414
MD5 68cfeca8baafbefeadf69d35a8271a11
BLAKE2b-256 72c8ba88885869b33aa6ed6d8c42e589954b388bedba279a26b3569824a34aa1

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