Skip to main content

CLI program helper/framework

Project description

npycli

A library to create fast and easy cli programs.

Programs contain either one or many commands. a command is represented by the type Command.
A program with more than one Command should use the type CLI which manages many things.

Commands can be executed by using the ()/__call__ operator, by passing in a list of arguments, and type parsers that convert a str to a specific type.
ex. {bool: lambda s: s.strip().casefold() == 'true'.strip().casefold()}: Converts str to bool.

CLI will execute a specified command when using the CLI.exec bound function. Pass in entries to the function which is a list of arguments, the first being the name of a Command.

See more documentation.

See examples:

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

npycli-0.1.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

npycli-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file npycli-0.1.0.tar.gz.

File metadata

  • Download URL: npycli-0.1.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for npycli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c31d2aeb81d33ff643a16532b4c8f07ec72c1a948ef7d6f02444139ff1d0595e
MD5 e1b4065f7f4b8af3deed3139cf1fc17a
BLAKE2b-256 e36ea575ef86e5b129d1b4c632457dd0fb53ed1d34557ed4af2e5fcb2979f60b

See more details on using hashes here.

File details

Details for the file npycli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: npycli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for npycli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73b6da3ee6b2634ecaa9974c7c90e25e8bbaf895e8354e9eda9c01d3135a3508
MD5 0445c5ac1c04c0e140be452b9b055368
BLAKE2b-256 8ed2ea6463429a2f3b007d26fe0c0375b0d725c29b5082ef26e2b17e83a3be12

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page