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.2.0.tar.gz (214.8 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.2.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: structured_tutorials-0.2.0.tar.gz
  • Upload date:
  • Size: 214.8 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.2.0.tar.gz
Algorithm Hash digest
SHA256 34dd244252cc844a6f02750dd955fff0890f3715ccf63e6917cf580d7625ec3f
MD5 23cff7488cefa0f9eb9f9b7d5a0ccdc5
BLAKE2b-256 050df3f497a5f690d31dff3496ac0253e0db31bdd41308cf6eb69b33c920f382

See more details on using hashes here.

File details

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

File metadata

  • Download URL: structured_tutorials-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6a064528898a057e118b75954d4ee8b13fc0f07bc593b9425786cfa1b89f8cf
MD5 a5aff7cd88c6177351af9a232b988fb5
BLAKE2b-256 c0e5f4a326334347249d07c3045e437cec6976778bfc7b94d6b7c015047933fa

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