Skip to main content

Mkdocs plugin to render protobuf messages

Project description

Mkdocs Protobuf plugin

build codecov PyPI version


Source Code: https://github.com/rymurr/mkdocs_protobuf


This plugin inserts protobuf messages into template parameters in mkdocs websites. It can be used to embed Protobuf IDL into documentation sites.

Usage

To use in mkdocs install via pip pip install mkdocs_protobuf.

Add the following to mkdocs.yml

plugins:
 - mkdocs_protobuf:
     proto_dir: /path/to/proto/files

The plugin will search for any templataes like the following: {[% proto.message.MessageName %]} and will replace the template with the protobuf message MessageName. See the tests directory for an example. The escape characters are odd as to not interfere w/ Jinja2 templating from other plugins.

Development

Setup environement

You should have Pipenv installed. Then, you can install the dependencies with:

pipenv install --dev

After that, activate the virtual environment:

pipenv shell

Run unit tests

You can run all the tests with:

make test

Alternatively, you can run pytest yourself:

pytest

Format the code

Execute the following command to apply isort and black formatting:

make format

License

This project is licensed under the terms of the Apache Software License 2.0.

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

mkdocs_protobuf-0.0.6.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

mkdocs_protobuf-0.0.6-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_protobuf-0.0.6.tar.gz.

File metadata

  • Download URL: mkdocs_protobuf-0.0.6.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for mkdocs_protobuf-0.0.6.tar.gz
Algorithm Hash digest
SHA256 9318a2c36ba3f9fb003c5c376f39473b77d68d11f72ce979b0577f28a9878bf8
MD5 a2a3e5c421910a85bb9a5f64d51d94d0
BLAKE2b-256 4ad857bfa41f3cfbefcc27009f65468cb0067d7d73794bda406e3182502d159d

See more details on using hashes here.

File details

Details for the file mkdocs_protobuf-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_protobuf-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for mkdocs_protobuf-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3d66f7ff667cee0515161b5f7ded266bc5c906b6d16e1d60cb3699113d194ec0
MD5 82baea7fd91c6e597f5860f8ff5a8a5c
BLAKE2b-256 b40b5afc406c078ee009c80776959cb1a866a86346ef10f320b47f3d9f2113ec

See more details on using hashes here.

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