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.5.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.5-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simpleargparser-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 90e85bbf46d458129c6274450367e532398e267e56f485bc683d4c84b2d9554b
MD5 546df6201f30203f6af05077accd6171
BLAKE2b-256 549ee854f99562e0c10fd287f2cfe70c75f537b75e4e093c8d0d8dbf41a15c9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simpleargparser-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 61e03301025b5a97a7f9db019f0dcdb3dd21cb4ce71157c4c56346f5f736daf0
MD5 17b20d52665b8f2208d31e7fb78feb0c
BLAKE2b-256 d8e1ad60fb47a1efda08c5a064b4a17ca0ce425b40c62b08553844ff82c9445d

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