Skip to main content

faithful-core

Shared foundation library. The shared, tested foundation of the Faithful Oversight tools: safe output, atomic file publishing, console handling, and the WinRM collection plumbing.

CI License: Apache-2.0

Status: pre-release. The first release is 0.1.0. Read the stability promise below before you depend on it.

What it is

faithful-core is the common base every Faithful Oversight tool builds on. It holds the code that must behave the same in every tool, so that each fix and each test lives in one place.

It has no command-line tool of its own, and it has no runtime dependencies. It uses the network only for the WinRM transport that a tool asks for.

Who uses it

The Faithful Oversight tools: pakad, toledot, mishpat, shaar, merilo, and gvul. You can use it in your own tools too. The license allows it.

What is in it

Module What it does
faithful_core.errors One base error, FaithfulError, and the four errors a tool reports to its user.
faithful_core.exitcodes The exit codes every tool uses.
faithful_core.safety Makes untrusted text safe for a terminal, a CSV file, and Markdown.
faithful_core.clock Writes times the same way on every platform, and gives a repeatable report time.
faithful_core.console Prints without letting a closed pipe or a narrow terminal change an exit code.
faithful_core.xmlsafe Parses untrusted XML with limits on size, depth, and element count.
faithful_core.files Publishes a set of files atomically, and refuses to replace a file the tool reads.
faithful_core.render Small helpers for HTML, Markdown, and JSON reports.
faithful_core.collect.names Checks server and account names. Writes install hints.
faithful_core.collect.secrets Fetches a secret from a variable, a file, a keyring, Vault, AWS, or Azure. Removes it from text.
faithful_core.collect.script Loads a PowerShell script that a tool ships as package data.
faithful_core.collect.winrm The WinRM transport settings and the collection loop.

docs/api.md describes every name.

Stability promise

  • The project follows Semantic Versioning.
  • The names listed in docs/api.md are the public interface. A breaking change to one of them needs a new major version. While the version is below 1.0.0, a minor version can break them, and the changelog says so.
  • Anything that starts with an underscore is private. It can change in any release.
  • Messages are for people. Their wording can change in any release, so do not match on it.
  • Exit code values and the FaithfulError hierarchy are part of the public interface.

Installation

pip install faithful-core

The WinRM transport needs pypsrp. It is an optional extra:

pip install "faithful-core[winrm]"

Until the first release, install the development version from GitHub:

pip install git+https://github.com/faithful-oversight/faithful-core

To work from source, see CONTRIBUTING.md.

Usage

from pathlib import Path

from faithful_core.files import write_files
from faithful_core.render import md_table
from faithful_core.safety import terminal_line

rows = [["alice", "=1+1"], ["bob", "line one\nline two"]]
report = "\n".join(md_table(("Name", "Note"), rows)) + "\n"

written = write_files(
    Path("report"),
    {"report.md": report},
    force=False,
    slug="example",
)
print(terminal_line(str(written[0])))

Documentation

Security

Please do not report security problems in public issues. See SECURITY.md.

Contributing

Contributions are welcome. Read CONTRIBUTING.md and the code of conduct first.

License

Copyright 2026 Faithful Oversight, LLC. Licensed under the Apache License, Version 2.0.

Metadata

Release files for faithful-core 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for faithful-core 0.1.0
File Size Uploaded Provenance Actions
faithful_core-0.1.0.tar.gz 117.8 kB With provenance Details for faithful_core-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for faithful-core 0.1.0
File Interpreter ABI Platform Actions
faithful_core-0.1.0-py3-none-any.whl Python 3 none any Details for faithful_core-0.1.0-py3-none-any.whl

Total release size: 152.9 kB

Release files / faithful_core-0.1.0.tar.gz

Download URL faithful_core-0.1.0.tar.gz
Size 117.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a9d6f38991635a85dde8e0e804ec38146ed405aed515f62e54f2b88473895791
BLAKE2b-256 checksum
How to use checksums
fe3d903219f78fdd4a7eeac69c978dc8d159241585fa64a40c9dbf942b9bc405
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / faithful_core-0.1.0-py3-none-any.whl

Download URL faithful_core-0.1.0-py3-none-any.whl
Size 35.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da69af97621c97ffba442e273423e79e450927d7881461de468241b1594f958f
BLAKE2b-256 checksum
How to use checksums
8dd3853579ce8b1ca92dc356be0d7de938ecc13abb135d270493668f312da262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for faithful-core 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for faithful_core-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page