Skip to main content

Haskell-like intervals for Python

Project description

test codecov

autoreadme

Generate READMEs with collapsable* code and corresponding output from Python.

Install

pip install autoreadme
autoreadme

Example

A typical README-edit.md file would be:

# Uses
We can cook using the following Python code:
<<cook>>

However, we can also clean:
<<clean>>

The example file (given in this repo as examples/README-edit.md) depends on two scripts. Each script should have a # ... line where the output until that moment is expected to appear:

examples/cook.py:

# Cooking
x = 2 * 8
print("This script prints something:", x)
# ...

examples/clean.py:

# Cleaning
y = 34 % 5
print("this script prints another thing.", y)
# ...

Running...

autoreadme -i examples/README-edit.md -s examples/ -o examples/README.md examples/README-edit.md

...will result in the following markdown:

# Uses

We can cook using the following Python code:

Cooking

x = 2 * 8
print("This script prints something:", x)
This script prints something: 16

However, we can also clean:

Cleaning

y = 34 % 5
print("this script prints another thing.", y)
this script prints another thing. 4

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

autoreadme-0.2101.10.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

autoreadme-0.2101.10-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file autoreadme-0.2101.10.tar.gz.

File metadata

  • Download URL: autoreadme-0.2101.10.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for autoreadme-0.2101.10.tar.gz
Algorithm Hash digest
SHA256 0ba3ff92500ea9d76485ad8e60faddfa70023c255ddae848963691e01c652c3d
MD5 e96b99c5cd32ff343e1a8c37ab6c3426
BLAKE2b-256 767c5a00eeb1802f4a1d3d9b0c5fc9a63c63681ce8278daddcc70d70774307dc

See more details on using hashes here.

File details

Details for the file autoreadme-0.2101.10-py3-none-any.whl.

File metadata

  • Download URL: autoreadme-0.2101.10-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1

File hashes

Hashes for autoreadme-0.2101.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d38a4ea25ab4f16792a2c9d06171f29ff1f91a3f4b80004497a797ae03bb0cb3
MD5 ff51405aa402edba3b5c0df94d6ae9be
BLAKE2b-256 afa60579af91b0a051fcc241ed90ed00fec8dc665e1d0eb875eccd2e28f47fdd

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