-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: @metricq_command as a standardized click command
- Loading branch information
Showing
15 changed files
with
753 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
CLI | ||
=== | ||
|
||
This module provides CLI utilities and decorators for MetricQ applications, including custom parameter types for choices, durations, timestamps, templates, and metrics. | ||
|
||
The main focus of this module is to standardize the CLI interfaces of different programs. | ||
|
||
To use this part of the package you need to install additional dependencies. You can install the dependencies using the following command: | ||
|
||
.. code-block:: bash | ||
pip install "metricq[cli]" | ||
.. | ||
Decorators | ||
---------- | ||
|
||
.. automodule:: metricq.cli.decorator | ||
:members: metricq_command, metricq_metric_option, metricq_server_option, metricq_token_option, | ||
|
||
|
||
Parameter | ||
--------- | ||
For you convenience, we provide a set of custom parameter types that you can use as custom types in your click option definitions. | ||
|
||
.. automodule:: metricq.cli.params | ||
:members: | ||
:exclude-members: get_metavar, convert, name | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ API Reference | |
client-common | ||
exceptions | ||
misc | ||
cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from .decorator import ( | ||
metricq_command, | ||
metricq_metric_option, | ||
metricq_server_option, | ||
metricq_token_option, | ||
) | ||
from .params import ( | ||
ChoiceParam, | ||
CommandLineChoice, | ||
DurationParam, | ||
MetricParam, | ||
TemplateStringParam, | ||
TimestampParam, | ||
) | ||
|
||
__all__ = [ | ||
"ChoiceParam", | ||
"CommandLineChoice", | ||
"DurationParam", | ||
"TemplateStringParam", | ||
"TimestampParam", | ||
"MetricParam", | ||
"metricq_command", | ||
"metricq_metric_option", | ||
"metricq_server_option", | ||
"metricq_token_option", | ||
] |
Oops, something went wrong.