https://github.com/mpetazzoni/pygments-signalflow
Pygments lexer for the SignalFx SignalFlow language
https://github.com/mpetazzoni/pygments-signalflow
Last synced: 8 months ago
JSON representation
Pygments lexer for the SignalFx SignalFlow language
- Host: GitHub
- URL: https://github.com/mpetazzoni/pygments-signalflow
- Owner: mpetazzoni
- Created: 2016-06-17T20:16:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-23T19:08:01.000Z (almost 9 years ago)
- Last Synced: 2025-02-05T06:03:18.564Z (8 months ago)
- Language: Python
- Homepage: https://developers.signalfx.com/docs/signalflow-overview
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
pygments-signalflow
===================A Pygments_ syntax lexer for the SignalFx_ SignalFlow_ real-time streaming
analytics language... _Pygments: http://pygments.org
.. _SignalFx: https://signalfx.com
.. _SignalFlow: https://developers.signalfx.com/docs/signalflow-overviewInstallation
------------.. code::
$ 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:.. code::
$ 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`_):
.. _Prompt Toolkit: https://github.com/jonathanslenders/python-prompt-toolkit
.. code:: python
import prompt_toolkit
import pygments
import pygments_signalflow...
prompt_toolkit.shortcuts.prompt('> ',
lexer=prompt_toolkit.layout.lexers.PygmensLexer(
pygments_signalflow.SignalFlowLexer()))