CFGraph
rdflib collections flattening graph
What it is and what it does
CFGraph is a specialized extension of rdflib's Graph class designed to flatten RDF collections into a more intuitive list representation. RDF uses a linked-list structure (with rdf:first and rdf:rest predicates) to represent ordered sequences, which can be cumbersome to navigate directly. CFGraph interprets these structures as Python lists, making it easier to work with collection data in RDF documents.
The package is read-only: it parses existing RDF collections but does not convert Python lists back into RDF collection syntax. It assumes collections follow standard RDF conventions for well-formedness (empty lists as rdf:nil, single elements with rdf:first/rdf:rest pairs, and blank nodes as subjects). The implementation was last updated in 2018 and is no longer maintained, so compatibility with recent Python or rdflib versions is uncertain.
Use it for:
- Parse RDF documents containing ordered collections and access them as native Python lists.
- Simplify navigation of linked-list RDF structures in semantic web data processing pipelines.
- Read RDF collections from ontologies or knowledge graphs without manual rdf:first/rdf:rest traversal.
- Integrate RDF collection flattening into rdflib-based data extraction workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
CFGraph extends rdflib's Graph to read RDF collections as flattened lists, interpreting well-formed RDF collection structures into a more accessible format.
No. The package is abandoned (last updated 2018-11-20) with no maintenance signal, high install friction from source-only distribution, and uncertain compatibility with modern Python versions. If you need RDF collection support, consider whether rdflib's native collection handling or an actively maintained alternative better serves your project's long-term stability requirements.
Install
cfgraph on PyPI
pip
pip install cfgraphuv
uv add cfgraphpoetry
poetry add cfgraphInstalling CFGraph
Before you install
High install friction due to source-only distribution. The package is abandoned (last commit 2018-11-20, no releases in 2824 days), so expect no maintenance, bug fixes, or compatibility updates for modern Python versions beyond those it was tested against.
License in practice
Licensed under Apache 2.0 (permissive), so you may use, modify, and distribute it freely in commercial and open-source projects, provided you retain the license notice.
Quickstart
pip install CFGraph
from cfgraph import CFGraph
g = CFGraph()
g.parse('data.rdf')
# Access RDF collections as lists via the graph
Requires Python 3.6+ and rdflib; package is read-only and assumes well-formed RDF collections per RDF spec conventions.
Verify before relying
- Whether the package works with modern Python versions (3.8+) despite being tested only on 3.6–3.7.
- Exact nature of 'well-formed' collection validation and error handling for malformed input.
- Performance characteristics on large RDF graphs or deeply nested collections.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,824 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 148,342/month — #11,039 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: CFGraph-0.2.1.tar.gz
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
rdflibRDFLib is a Python library for parsing,…
permissive · top 1,000 on PyPI
sparqlslurperTranslates rdflib Graph.triples() calls into…
permissive · top 15,000 on PyPI
rdflib-jsonldProvides JSON-LD parsing and serialization for…
permissive · top 15,000 on PyPI
owlrlImplements OWL2 RL Profile and RDFS inference…
unclear · top 5,000 on PyPI
pyshaclValidates RDF graphs against SHACL shape…
permissive · top 5,000 on PyPI
PyShExPyShEx parses and validates RDF data against…
permissive · top 15,000 on PyPI
SPARQLWrapperSPARQLWrapper provides a Python interface to…
unclear · top 5,000 on PyPI
pyrdfa3Parses RDFa markup embedded in HTML documents…
unclear · top 15,000 on PyPI
html5rdfParses HTML documents into tree structures…
permissive · top 5,000 on PyPI
pymanticPymantic parses and queries RDF and semantic…
permissive · top 15,000 on PyPI