Skip to main content

API Blueprint (https://apiblueprint.org/) parser in pure Python

Project description

# plueprint
[API Blueprint](https://github.com/apiaryio/api-blueprint) parser written in Python.
It uses [Markdown](https://pythonhosted.org/Markdown) well-known package to do
initial DOM parsing.

### Installing
```
pip install plueprint
```

### Using
As a library:
```Python
from markdown import Markdown
m = Markdown(extensions=["plueprint"])
m.set_output_format("apiblueprint")
api = m.convert("""
FORMAT: 1A

# The Simplest API
This is one of the simplest APIs written in the **API Blueprint**.

# /message

## GET
+ Response 200 (text/plain)

Hello World!
""")
print(api)
```
As a script:
```
python -m plueprint "Real World API.md"
python -m plueprint "Real World API.md" -o "api.pickle"
```

### Notes
To suppress warnings about parsed documents, set `plueprint.entities.report_warnings` to `False`.

Released under New BSD license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plueprint-0.4.1.tar.gz (16.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page