sybil
Automated testing for the examples in your code and documentation.
Decision gist · record as of 2026-08-14
Yes. Sybil fills a real gap: keeping documentation examples in sync with code. It has no dependencies, low install friction, active maintenance, a permissive license, and solves a concrete problem that affects most projects with substantial documentation. The only reason not to install is if you have no documented examples to validate.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later.
- Low friction: pure Python wheel with no runtime dependencies.
- Actively maintained as of 62 days ago with recent commits.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
last release 2026-06-13 (62 days) · last repo commit 2026-07-25 · 91 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 572,260 downloads/mo, #5,946 on PyPI
Alternatives
Verify before relying
pip install sybil
from sybil import Sybil
from sybil.parsers.rest import CodeBlockParser
examples = Sybil([CodeBlockParser()], pattern='*.rst')- Whether Sybil supports all major test runners (pytest, unittest, nose) or only a subset
- Whether it can extract examples from formats beyond reStructuredText and Markdown
- Performance characteristics when running large numbers of examples
What it is and what it does
Sybil is a testing library that extracts code examples from your documentation and source files, then runs them as part of your test suite. Instead of manually keeping examples in sync with your code, Sybil parses them directly from their source (reStructuredText, Markdown, or other formats) and validates that they execute correctly. This catches documentation rot early—when an API changes, the tests fail immediately if examples become outdated.
The library integrates with standard Python test runners, so examples run alongside your unit tests with no special setup. It has no external runtime dependencies, making it lightweight to add to any project. It's designed for developers who want their documentation to be a reliable, executable specification rather than prose that drifts out of sync with the code.
Use it for
- Validate code snippets in API documentation to ensure they remain correct as the codebase evolves
- Test example scripts embedded in README or tutorial files as part of CI/CD
- Verify that code samples in docstrings and reStructuredText files actually run without errors
- Catch breaking changes early by running documented examples in your test suite
- Maintain a single source of truth for examples instead of duplicating them in tests and docs
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Sybil fills a real gap: keeping documentation examples in sync with code. It has no dependencies, low install friction, active maintenance, a permissive license, and solves a concrete problem that affects most projects with substantial documentation. The only reason not to install is if you have no documented examples to validate.
Install
sybil on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 62 days ago with recent commits. Requires Python 3.11 or later.
Requires Python 3.11 or later.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install sybil
from sybil import Sybil
from sybil.parsers.rest import CodeBlockParser
examples = Sybil([CodeBlockParser()], pattern='*.rst')
Verify before relying
- Whether Sybil supports all major test runners (pytest, unittest, nose) or only a subset
- Whether it can extract examples from formats beyond reStructuredText and Markdown
- Performance characteristics when running large numbers of examples
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 62 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 572,260 / month, #5,946 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 |
Evidence: sybil-10.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “documentation example testing”
- sybilSybil parses and executes code examples embedded in your source code…
- sybil-extrasProvides specialized evaluators and parsers that extend Sybil, a…
- xdoctestXdoctest finds and executes test code embedded in Python docstrings,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also sybil-extras · pytest-markdown-docs · math-verify · xdoctest · markdown-exec · rstcheck-core · cogapp · strictyaml · pytest-examples · codeowners