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
  • 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.0a6.tar.gz (16.6 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.0a6-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bykcli_plugin-1.0.0a6.tar.gz
  • Upload date:
  • Size: 16.6 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.0a6.tar.gz
Algorithm Hash digest
SHA256 c75b1089cfaa015cdf31eeceb6ceab0b6375660c39f4da3065e061d7f0d3b0f3
MD5 bfb139567fc2e5d839a3a5333d69480b
BLAKE2b-256 8a5d23bd54c27b6621e555b617c06d2a36d1355c328d683b89a7760979d72651

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bykcli_plugin-1.0.0a6-py3-none-any.whl
Algorithm Hash digest
SHA256 618c559f87e528868f7fa5c7c177146adc56c99d922d8ff270010710e31153ad
MD5 f42832da13feab9a690d34bf1e3b0e54
BLAKE2b-256 3d277fd05e59e37206ed1e978d828106dd9d8394ecbc9a88e7a91786d159ce48

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