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

Uploaded Python 3

File details

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

File metadata

  • Download URL: simpleargparser-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 b418e492e3c4c915c46f38f6d1c5e1f789fdb233f3fc04ff1991fe50e3dc5428
MD5 49375553c6bce19fac9d4faf032c3604
BLAKE2b-256 80be5d89629e97fc390a97cd5e7efeea2aee8bb20500a02d446a55d7181a9f53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simpleargparser-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1766ea302431be637eb6c796be29aa38a7b926c029a6d3977f1746d37266202f
MD5 16b17d7d7e41fd2e963a05533eac6343
BLAKE2b-256 a2b5c2716ddbb15c74116b39fee0e5fff653b171253b6065edb6acb896c060e2

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