pygments-signalflow
A Pygments syntax lexer for the SignalFx SignalFlow real-time streaming analytics language.
Installation
$ pip install pygments-signalflow
Usage
The pygments-signalflow
package is setup to include the proper entrypoints
so that pygmentize
can use the lexer out of the box:
$ cat example.flow data('cpu.utilization').mean().publish() $ pygmentize example.flow # This will show in fancy colors! data('cpu.utilization').mean().publish()
From source
To use the lexer from source (for example with the excellent Prompt Toolkit):
import prompt_toolkit
import pygments
import pygments_signalflow
...
prompt_toolkit.shortcuts.prompt('> ',
lexer=prompt_toolkit.layout.lexers.PygmensLexer(
pygments_signalflow.SignalFlowLexer()))