Skip to main content

Add your description here

Project description

structured-tutorials

image image image image image

structured-tutorials allows you to write tutorials that can be rendered as documentation and run on your system to verify correctness.

With structured-tutorials you to specify steps in a configuration file. A Sphinx plugin allows you to render those commands in your project documentation. A command-line tool can load the configuration file and run it on your local system.

Please see the official documentation for more detailed information.

Installation / Setup

Install structured-tutorials:

pip install structured-tutorials

and configure Sphinx:

extensions = [
    # ... other extensions
    "structured_tutorials.sphinx",
]

# Optional: Root directory for tutorials (default: location of conf.py)
#structured_tutorials_root = DOC_ROOT / "tutorials"

Your first (trivial) tutorial

To create your first tutorial, create it in docs/tutorial.yaml (or elsewhere, if you configured structured_tutorials_root in conf.py):

parts:
  - commands:
      - command: structured-tutorial --help
        doc:
          output: |
            usage: structured-tutorial [-h] path
            ...

Run the tutorial

Run the tutorial with:

$ structured-tutorial docs/tutorials/quickstart/tutorial.yaml
usage: structured-tutorial [-h] path
...

Render tutorial in Sphinx:

Configure the tutorial that is being displayed - this will not show any output:

.. structured-tutorial:: quickstart/tutorial.yaml

.. structured-tutorial-part::

TODO

  • Test file existence or something like that
  • Platform independent "echo" step (useful for debugging/testing)
  • Run in vagrant

License

This project is licensed under the MIT License. See LICENSE file for details.

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

structured_tutorials-0.3.0.tar.gz (218.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

structured_tutorials-0.3.0-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file structured_tutorials-0.3.0.tar.gz.

File metadata

  • Download URL: structured_tutorials-0.3.0.tar.gz
  • Upload date:
  • Size: 218.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.1","id":"xia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for structured_tutorials-0.3.0.tar.gz
Algorithm Hash digest
SHA256 733f81b477c01432c4992f4acbfd5cc08152e6ff3453f77bd4354fc2bb835bb1
MD5 5cdfbf66c2c719c38f12b8a8b541aa6a
BLAKE2b-256 63ea3c51fdd3da4760dfc33462884c23395d0d9af62830d1ad2db34ca412a6fc

See more details on using hashes here.

File details

Details for the file structured_tutorials-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: structured_tutorials-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.1","id":"xia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for structured_tutorials-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d473b981cf9247ba16929eef693d979282ac374adf70966048c1114b5e75d5ad
MD5 6a4490eeccb38f1e95200c6d6263c925
BLAKE2b-256 71a099c3cb56650da80cdf35738042fc1ad0abdf51ac58bbf37ec6b0ea8b8d29

See more details on using hashes here.

Supported by

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