Skip to main content

Validate Python code blocks in Markdown README files.

Project description

readme-example-tester

ci test codecov PyPI pyversions Current version on PyPI

Validate fenced Python code blocks in Markdown files, with a small CLI that is handy for README checks in local development and CI.

Install

pip install readme-example-tester

Usage

$ readme-example-tester README.md
README.md: validated 2 Python code block(s)

If a fenced Python block contains invalid syntax, the command exits with a non-zero status and prints the failing line:

$ readme-example-tester README.md
README.md:27: '(' was never closed

Python API

from readme_example_tester import ReadmeTestCase

assert hasattr(ReadmeTestCase, "__name__")

Development

Project setup and local checks live in CONTRIBUTING.md.

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

readme_example_tester-0.0.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

readme_example_tester-0.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file readme_example_tester-0.0.1.tar.gz.

File metadata

  • Download URL: readme_example_tester-0.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for readme_example_tester-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f23d1dc3de7a597407ee94f654dc4b73f5978aadc9449bca5d854812506ff3f9
MD5 0915fb305c37ebabb22ae36c0222f3a2
BLAKE2b-256 d4f828effbb179972d42876f0d0a04ca9e7249f26cfe1d33034c59e416b119c0

See more details on using hashes here.

File details

Details for the file readme_example_tester-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for readme_example_tester-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3c23576d17456ef280e9e0aab91813c04fc478eeef2b3b8a1e8ff2199519cc1
MD5 f40c348772c9125c0ff4848fe77f31f6
BLAKE2b-256 8c4683b71547b7f5c2b4f453d5234960712351b6cd7423ac034267fe3a0dd76c

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