skillfed

CFGraph

rdflib collections flattening graph

cfgraph v0.2.1 148.3K downloads/30d#11,039 on PyPI0
Permissive license Apache 2.0 Abandoned released

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 cfgraph

uv

uv add cfgraph

poetry

poetry add cfgraph

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Topic :: Software Development :: Libraries

Tags

rdf collections flatteningrdflib graph extensionrdf list parsingsemantic web collectionsrdf collection readerrdflib utilities
rdfsemantic-webabandoned

More Libraries packages