Skip to main content

A small argument parser for dedicated environments with support for env and file based arguments

Project description

Pargs

[!WARNING] This is not yet production ready, please wait for the 1.0.0 release

A small python extensible argument system.

Supported sources

Native supported sources are command arguments, file (json and toml) and environment variables. You can glue them together with the MultiParser and give them priorities, to control which arguments may overwrite each other.

Syntax

Simple example:

from pargs import configure

@dataclass
class Config:
    url: str
    secret: str
    use_tls: bool = True
    log_level: int = 2
...
def main():
    config = configure(Config)

Comparison

Compared to the argparse module provided in the standard library, this provides much fewer features. This allows for a very small runtime-footprint (>10x faster).

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

pargs_sfe-0.1.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pargs_sfe-0.1.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pargs_sfe-0.1.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.9

File hashes

Hashes for pargs_sfe-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e8407ddc708e70e52eb1d456a1da508bd4bf3c58e14b417928a1ee872694eb47
MD5 58edcc77266b25e7e588022ca7c334c7
BLAKE2b-256 d7ab08a227c2f7c4c5024a98c704ec4122b9f8fec9db7b262e9d99d09369d3f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pargs_sfe-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.9

File hashes

Hashes for pargs_sfe-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b58378d62c4071b42cef53128b01e818404e510a5c748da380555a4a0203abf
MD5 f98807748c4f942be329690110a0e599
BLAKE2b-256 2dc94d6855c98f23f378158bb4e15bf4dff2f0969fcff04d8470b67f14cff6f0

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