Skip to main content

Plugin infrastructure for bykcli

Project description

bykcli-plugin

Python Tests Coverage License

Plugin infrastructure for bykcli.

Install

pip install bykcli-plugin

Usage

Implement PluginProtocol and register your commands:

# my_plugin.py
import click
from bykcli import PluginProtocol

class MyPlugin(PluginProtocol):
    commands = {"hello": "say hello"}

    def register(self, cli: click.Group) -> None:
        @cli.command()
        @click.pass_context
        def hello(ctx):
            click.echo("Hello from my plugin!")

API

  • PluginProtocol — class-based plugin registration protocol
  • CommandContext / pass_command_context / get_app_context — command runtime context
  • PathItem / PathProvider / register_path_provider — path management
  • get_private_networks / ensure_port_available — network utilities
  • StateStore — persistent key-value storage per command

License

MIT

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

bykcli_plugin-1.0.0a5.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

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

bykcli_plugin-1.0.0a5-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file bykcli_plugin-1.0.0a5.tar.gz.

File metadata

  • Download URL: bykcli_plugin-1.0.0a5.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for bykcli_plugin-1.0.0a5.tar.gz
Algorithm Hash digest
SHA256 fd23d8db850e9e3ee4db35779dc99aed161b785f0927296030d08820a15054d5
MD5 93ee05507a397b7f8955f76024f9d9a1
BLAKE2b-256 bbded53239bd8a13e7eca65798078bc958f72e97371aa839c7ec170c2daa85af

See more details on using hashes here.

File details

Details for the file bykcli_plugin-1.0.0a5-py3-none-any.whl.

File metadata

File hashes

Hashes for bykcli_plugin-1.0.0a5-py3-none-any.whl
Algorithm Hash digest
SHA256 cc9b060f5cfa074fbdc166b462eb33a1e5e96c2b67bca147284c3cc74c223bfc
MD5 c53d1cdc533b34214accc330bb1841f6
BLAKE2b-256 6aab4791e3a6b252c76951bd434b05d00381f04a6fdb0315aa537e066e4d2dfe

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