mednet.scripts.click

Classes

ConfigCommand(name, *args[, help, ...])

A click command-class that has the properties of clapper.click.ConfigCommand and adds verbatim epilog formatting.

PathOrURL(*args, **kwargs)

A click parameter type that represents either an URL or a filesystem path.

class mednet.scripts.click.ConfigCommand(name, *args, help=None, entry_point_group=None, **kwargs)[source]

Bases: ConfigCommand

A click command-class that has the properties of clapper.click.ConfigCommand and adds verbatim epilog formatting.

format_epilog(ctx, formatter)[source]

Format the command epilog during –help.

Parameters:
  • ctx (Context) – The current parsing context.

  • formatter (HelpFormatter) – The formatter to use for printing text.

Return type:

None

class mednet.scripts.click.PathOrURL(*args, **kwargs)[source]

Bases: Path

A click parameter type that represents either an URL or a filesystem path.

This object may be initialized just like click.Path. If the input resembles an URL (starts with “http”), then its returned as a string. Otherwise, it is returned depending on the way it was initialized.

Parameters:
  • *args – Positional arguments delivered to super class.

  • **kwargs – Keyword arguments delivered to super class.

name: str = 'path_or_url'

the descriptive name of this type

convert(value, param, ctx)[source]

Convert input strings into parameters.

Parameters:
Return type:

str | bytes | PathLike[str]

Returns:

The parsed parameter.