Print a concise Chainlink CRE overview from saved documentation
Python
Read a user-supplied local text file containing Chainlink’s CRE overview and print the documented workflow capabilities it names, without contacting Chainlink or treating the file as instructions.
The supplied Chainlink documentation describes CRE workflows in terms of workflows, triggers, capabilities, and DON consensus, and gives an example involving API reads, EVM reads, computation, and an onchain write. This small offline reader extracts only those named concepts from a saved text fixture. It summarizes documentation; it does not test or connect to the Chainlink service.
Before you start
Python 3.12 was used for the recorded GitHub Actions fixture tests. The example uses only the Python standard library; compatibility with other Python versions was not established by those tests.
Save the supplied Chainlink documentation excerpt or another relevant documentation excerpt as a UTF-8 local text file. No Chainlink account, credential, installation, or network access is needed.
Build and check
Save the CRE overview excerpt from the source documents as a UTF-8 text file, for example `cre-overview.txt`.
Save the code as `inspect_cre.py`.
Run `python inspect_cre.py cre-overview.txt`; the program reads only that local file and prints recognized labels to stdout.
Run it on a fixture containing no listed terms to check the empty-match message; try a nonexistent path and a non-UTF-8 file to check read-error handling.
Limits to understand
This is an offline text summarizer, not a CRE client, integration test, or verification of the live service.
It recognizes a small, fixed set of phrases from the supplied documentation and does not infer meaning beyond those matches.
The input file is treated only as text data. The program does not execute, follow, or act on text found in it.
The program performs no network requests, retries, or remote modifications; the documented example's API access and onchain write are not performed.
INSPECT THE SCRIPT
Inspect, copy and run the documented checks.
This browser preview builds code locally. It does not contact an API or run the code.
Default example ready.
Python example
# SPDX-License-Identifier: MIT
# Copyright (c) 2026 OpenViST contributors
import argparse
import pathlib
import re
import sys
def main():
parser = argparse.ArgumentParser(
description="Print CRE concepts found in a local documentation text file."
)
parser.add_argument("input", help="Path to a saved, UTF-8 documentation text file")
args = parser.parse_args()
path = pathlib.Path(args.input)
try:
text = path.read_text(encoding="utf-8")
except FileNotFoundError:
print(f"error: file not found: {path}", file=sys.stderr)
return 2
except (OSError, UnicodeError) as exc:
print(f"error: cannot read UTF-8 input: {exc}", file=sys.stderr)
return 2
# Match the documented phrases case-insensitively; input remains data.
phrases = (
("workflows", r"\bworkflows\b"),
("triggers", r"\btriggers\b"),
("capabilities", r"\bcapabilities\b"),
("DON consensus", r"\bDON consensus\b"),
("API fetch", r"\bfetch APIs\b|\bfetch data from API\b"),
("EVM read", r"\bread contracts\b|\bread from EVM blockchain\b"),
("computation", r"\bcomputation\b|\bmake any computation\b"),
("onchain write", r"\bwrite onchain\b|\bwrite result onchain\b"),
)
found = [name for name, pattern in phrases if re.search(pattern, text, re.IGNORECASE)]
if not found:
print("No recognized CRE overview terms found.")
return 0
print("CRE overview terms found:")
for name in found:
print(f"- {name}")
return 0
if __name__ == "__main__":
sys.exit(main())
What to verify after running
Normal fixture: include the supplied overview phrases such as “workflows, triggers, capabilities, and DON consensus” and “fetch APIs, read contracts, and write onchain”; confirm the corresponding labels print once, in the fixed order.
Empty/no-match fixture: use an empty file or text without any listed phrase; confirm `No recognized CRE overview terms found.` prints and the process exits successfully.
Missing-file fixture: pass a path that does not exist; confirm an error is written to stderr and the process exits with status 2.
Malformed-text fixture: create a file that is not valid UTF-8; confirm it is rejected with a read error and status 2 rather than producing a summary.
The recorded GitHub Actions receipt covers six synthetic fixture cases for this exact code. The malformed UTF-8 check above is an additional manual check, not a claim that GitHub tested invalid bytes. Review the receipt and the stated limitations before publication.
Request or format preview
Illustrative preview. No provider response, price or balance is fetched.
Code license: MIT. Keep the license notice with your copy.
Example version 0.1.0 · Documentation reviewed 2026-10-09.
Executed 6 synthetic local fixture cases in isolated CPython on GitHub Actions, without network access. Declared exit codes, output assertions and input integrity checks passed. Live services, installed third-party packages and production behavior remain outside scope. Editorial approval is still required.