fastokf
fastokf parses Open Knowledge Format (OKF) concept documents into Pydantic models.
OKF documents are Markdown files with YAML frontmatter. fastokf reads them into useful, typed Python objects.
Install
This project targets Python 3.10 and newer.
uv sync
For development, install the test group too:
uv sync --group dev
Parse a document
from fastokf import parse_string
document = parse_string("""---
type: Metric
title: Revenue
tags: [finance]
generated:
by: human:finance-team
at: 2026-06-20T22:53:05Z
---
# Definition
Recognized revenue for a fiscal year.
""")
print(document.frontmatter.title) # Revenue
print(document.body)
Input sources
Parse documents from text, files, URLs, or open text streams:
from fastokf import parse_file, parse_file_object, parse_string, parse_url
parse_string(okf_text)
parse_file("knowledge/metrics/revenue.md")
with open("knowledge/metrics/revenue.md", encoding="utf-8") as file:
parse_file_object(file)
parse_url("https://example.com/knowledge/metrics/revenue.md")
parse() also accepts any of these sources directly:
from pathlib import Path
from fastokf import parse
parse(Path("knowledge/metrics/revenue.md")) # filesystem path
parse("https://example.com/revenue.md") # HTTP(S) URL
parse("---\ntype: Metric\n---\n") # document text
Development
uv run pytest
Metadata
Release files for fastokf 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fastokf-0.1.0.tar.gz | 4.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fastokf-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.8 kB
Release files / fastokf-0.1.0.tar.gz
| Download URL | fastokf-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c710f700c79dc71def9b4f5d6d9c1355b62c2540eff04b98656f21a6cbe833b
|
|
BLAKE2b-256 checksum How to use checksums |
80f1b7e92a28ebe88e52977e8648f82172aa92d551842954dfcfd2772ddf74b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fastokf-0.1.0-py3-none-any.whl
| Download URL | fastokf-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93387088acf25667efaea36c75bf7e4e5352365f044f99f982ee804962744c26
|
|
BLAKE2b-256 checksum How to use checksums |
914bbd2d18531997fd480de696edfc548b723e7fbbc06b99cffc2279f42fbcbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fastokf 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.