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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for simpleargparser-0.1.6.tar.gz
Algorithm Hash digest
SHA256 3eb4dcaf77bc0384f4084e6da8a90a73e444973a78f1ba37db1230796b605ff2
MD5 cd41c12ac745a00b09dc54f72e2ef0c7
BLAKE2b-256 317fb9184299960bc923ad8fae40695cc663c86951ad9c90537a21d4ddc95f4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simpleargparser-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 41fc79d585d4037a627ea03f11595df35711c83e8a42dae02ecad3df95dba05d
MD5 1dcb287338eb9ffe68c6e7436213839c
BLAKE2b-256 a8595b10f74cf774acdb3bee3c3d403062f5171fd59a5802f1badd512f392be8

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