Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kylef/pygments-apiblueprint

An API Blueprint Lexer for Pygments
https://github.com/kylef/pygments-apiblueprint

api-blueprint

Last synced: 10 days ago
JSON representation

An API Blueprint Lexer for Pygments

Awesome Lists containing this project

README

        

# Pygments API Blueprint

## Installation

```shell
$ pip install pygments-apiblueprint
```

## Usage

Once installed, the Pygments API Blueprint lexer is instantly available to
Pygments.

```python
from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments_apiblueprint import APIBlueprintLexer

source = '''
# GET /

+ Response 200 (application/json)
+ Attributes
+ name: `pygments-apiblueprint`
'''

lexer = APIBlueprintLexer()
formatter = HtmlFormatter(linenos='table', cssclass='highlight')
result = highlight(source, lexer, formatter)

print(result)
```

## Example

![](pygments_apiblueprint.png)