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 (commands, files to create, ...) in a YAML file. A Sphinx plugin allows you to render them in your project documentation. A command-line tool can load the YAML 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.4.0.tar.gz (253.2 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.4.0-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: structured_tutorials-0.4.0.tar.gz
  • Upload date:
  • Size: 253.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","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.4.0.tar.gz
Algorithm Hash digest
SHA256 d8d39e679b3c0713a8a91fb91f1d8ddfa1b2a441fb87d59339c6fc20da550431
MD5 2e50160767be1081cb4c8bf485e758d8
BLAKE2b-256 dcaf117faea51454e39cf0ae6b57ed2e47067e606a2e93e92ed71ddfd822354e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: structured_tutorials-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98d289e4833fd30159d4165a7b23fffb5956171fab7cf7ce6c6d7bfe46e6322f
MD5 fd0b697b69c0c64e2edb5d1a7c073982
BLAKE2b-256 e0d746f799db5fef86af84710a37299bd885900b62a955cd3a631716963b332c

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