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.
[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.1.1.tar.gz
(12.3 kB
view hashes)
Built Distribution
Close
Hashes for plueprint-0.1.1.macosx-10.10-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcbdc26d75e0ec2535f991719d496d23382cf5439ae54e4f1a381640cdc08845 |
|
MD5 | 2a8084a4209765acf905d107f3467b6a |
|
BLAKE2b-256 | e7f1c0e066ead74c7dea0a38d293b85a882d32d43cd15771ea50e122f2708812 |