Skip to main content

Python binding for nil-clix: Opinionated Argument Parser

Project description

nil-clix Python Binding

Python binding for nil/clix – an Opinionated Argument Parser

Links

Installation

pip install nil-clix

Usage

from nil_clix import create_node

node = create_node()

# Add flags
node.flag("verbose", "v", "Enable verbose output")

# Add parameters
node.param("config", "c", "Path to config file", fallback="config.yml")

# Add numbers
node.number("threads", "t", "Number of threads", fallback=4)

# Add handler
def handler(options):
    if options.flag("verbose"):
        print("Verbose mode enabled")
    config = options.param("config")
    threads = options.number("threads")
    print(f"Config: {config}, Threads: {threads}")
    return 0

node.use(handler)

# Run
exit_code = node.run(["-v", "-c", "my.yml", "-t", "8"])

Documentation

For detailed API documentation and more examples, visit:

License

CC BY-NC-ND 4.0

Support

For issues, questions, or contributions, visit the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

nil_clix-1.0.8-py3-none-manylinux_2_39_x86_64.whl (173.7 kB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

nil_clix-1.0.8-py3-none-any.whl (173.5 kB view details)

Uploaded Python 3

File details

Details for the file nil_clix-1.0.8-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for nil_clix-1.0.8-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 65f7cd93287667f531a6fcb7108c22fd4b1f2e0b92864cee9ad45ec9a81135eb
MD5 efcf236aee251696cb3253034f8029ea
BLAKE2b-256 65098b1c5f33421d28f9f9e85200d00e2b6b7dcd1e97722b9b2e8116cfa00ede

See more details on using hashes here.

File details

Details for the file nil_clix-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: nil_clix-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 173.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for nil_clix-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 eac12f30f0a9fb352e4eb2ebea77466c3dd60ba63e88573a1637966150682056
MD5 f14de7c6fe3576bd5f5c8d29f3c89bbd
BLAKE2b-256 917df9aa0820f9438069e00a298324176294b4f2af28cfae86634e254a4f8b3d

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