Skip to main content

Construct RestructuredText markup and directives from Python Code.

Project description

Documentation Status!--None.svg?style=social

Welcome to rstobj Documentation

rstobj is a library that construct Restructured Text markup or directives from Python Code. rstobj is based on jinja2.


import rstobj

ltable = rstobj.directives.ListTable(
    data=[["id", "name"], [1, "Alice"], [2, "Bob"]],
rst = ltable.render()


.. list-table:: Users
    :header-rows: 1
    :stub-columns: 0

    * - id
      - name
    * - 1
      - Alice
    * - 2
      - Bob

I recommend to use this in your jinja2 template, outut.rst:

{{ ltable.render() }}


rstobj is released on PyPI, so all you need is:

$ pip install rstobj

To upgrade to latest version:

$ pip install --upgrade rstobj

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
rstobj-0.0.3-py2.py3-none-any.whl (65.5 kB) Copy SHA256 hash SHA256 Wheel py2.py3
rstobj-0.0.3.tar.gz (27.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page