Draughtsman
API Blueprint Parser for Python 3. Draughtsman is a Python binding for the API Blueprint parser drafter.
Installation
$ pip install draughtsman
Draughtsman requires the drafter library installed onto your system. Consult the drafter installation instructions for further information. Using Homebrew on macOS, Drafter can be installed via:
$ brew install drafter
Usage
>>> from draughtsman import parse
>>>
>>> parse_result = parse('# My API')
>>> parse_result.api.title.defract
'My API'
Draughtsman provides a parse
function which returns a Refract
ParseResult.
See Python Refract for more
information interacting with the parse result.
CLI
Draughtsman provides a convenience shell to parse an API Blueprint and interact with the parse result.
$ python -m draughtsman example.apib
>>> parse_result
<ParseResult content=[<Category content=[]>]>
>>> parse_result.annotations
[]
>>> parse_result.api.title
<String content='My API'>