Pygments lexer for SignalFlow
Project description
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-overview
Installation
------------
.. 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()))
===================
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-overview
Installation
------------
.. 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()))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file pygments_signalflow-0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: pygments_signalflow-0.3-py2.py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91d6bb65aa02e2450dc607fe19a737c7e0817b14d5a7b7b1ce6869ded17c742b |
|
MD5 | 389319725d1fc97136d3d56a95386085 |
|
BLAKE2b-256 | b68622f58d5f3dfeaa4329b0879b0bb797d1c5ea0ed537c4c06bfdfa48f5ab4a |