$npx skillfedfor your agent

rdflib

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.

Worth itPyPI Python ModulesReleased Feb 202622.0M downloads / moBSD-3-ClausePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — rdflib-7.6.0-py3-none-any.whl
v7.6.0 · released 2026-02-13 · Python >=3.8.1 · 2 runtime deps: isodate, pyparsing

Yes. RDFLib is a mature, actively maintained library with low install friction, no known vulnerabilities, and permissive licensing. It is the standard Python tool for RDF and semantic web work. Install it if you need to parse, query, or generate RDF data or work with SPARQL endpoints.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low friction installation with only two runtime dependencies (isodate, pyparsing).
  • The project is actively maintained with a recent release and 2494 GitHub stars, indicating stable, well-supported code.

License · maintenance · safety

BSD-3-Clause (permissive) — BSD-3-Clause is a permissive open-source license that allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

last release 2026-02-13 (182 days) · last repo commit 2026-08-12 · 2,494 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 21,995,534 downloads/mo, #987 on PyPI

Verify before relying

pip install rdflib

from rdflib import Graph, URIRef, Literal
from rdflib.namespace import FOAF, XSD

g = Graph()
g.add((URIRef("http://example.com/person/nick"), FOAF.givenName, Literal("Nick", datatype=XSD.string)))
print(g.serialize(format="turtle"))
  • Performance characteristics when working with very large RDF graphs or remote SPARQL endpoints
  • Availability and stability of optional store backends (Berkeley DB, RDF4J) mentioned in documentation
Same gist for agents: .md · .json

What it is and what it does

RDFLib is a pure Python library for working with RDF (Resource Description Framework), the W3C standard for representing linked data. It provides parsers and serializers for multiple RDF formats (RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, Trig, JSON-LD, HexTuples), a Graph interface for manipulating RDF triples, and a SPARQL 1.1 query engine. The library abstracts RDF data as collections of Subject-Predicate-Object triples and includes built-in namespace definitions for common ontologies like FOAF, RDFS, and XSD.

Typical use involves creating a Graph object, populating it with triples (either by parsing external RDF documents or programmatically adding URIRefs and Literals), querying it with SPARQL or graph traversal methods, and serializing the result back to a chosen format. Store implementations allow graphs to be backed by in-memory storage, persistent disk storage, or remote SPARQL endpoints. The library is designed to be pythonic, treating graphs as Python collections and namespaces as objects.

Use it for

  • Parse and query linked data from DBpedia, Wikidata, or other RDF sources for data integration tasks
  • Build and manipulate OWL ontologies programmatically for knowledge representation projects
  • Execute SPARQL queries against local or remote RDF triple stores for semantic search and reasoning
  • Convert between RDF serialization formats (e.g., RDF/XML to Turtle) for data pipeline workflows
  • Validate RDF graphs or extract structured metadata from semantic web documents

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

RDFLib is a mature, actively maintained library with low install friction, no known vulnerabilities, and permissive licensing. It is the standard Python tool for RDF and semantic web work. Install it if you need to parse, query, or generate RDF data or work with SPARQL endpoints.

Install

rdflib on PyPI

Before you install

Low friction installation with only two runtime dependencies (isodate, pyparsing). The project is actively maintained with a recent release and 2494 GitHub stars, indicating stable, well-supported code.

License in practice

BSD-3-Clause is a permissive open-source license that allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

Quickstart

pip install rdflib

from rdflib import Graph, URIRef, Literal
from rdflib.namespace import FOAF, XSD

g = Graph()
g.add((URIRef("http://example.com/person/nick"), FOAF.givenName, Literal("Nick", datatype=XSD.string)))
print(g.serialize(format="turtle"))

Verify before relying

  • Performance characteristics when working with very large RDF graphs or remote SPARQL endpoints
  • Availability and stability of optional store backends (Berkeley DB, RDF4J) mentioned in documentation

Package facts

LicenseBSD-3-Clause permissive
Python supportSupports the current Python release >=3.8.1
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
isodatepyparsing
MaintenanceActively maintained 182 days since the last release
Last repo commit
First released
Downloads21,995,534 / month, #987 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Evidence: rdflib-7.6.0-py3-none-any.whl

Tags

Capabilities
RDF parsing and serializationsemantic web Python librarySPARQL query executiongraph data structureslinked data processingRDF triple storeontology manipulation
Topics
semantic-webrdf-sparqllinked-data

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “RDF parsing and serialization”

  • rdflibRDFLib is a Python library for parsing, querying, and serializing RDF…
  • rdflib-jsonldProvides JSON-LD parsing and serialization for RDFLib graphs,…
  • PyShexCParses Shape Expression Compact (ShExC) syntax into Python objects…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also CFGraph · owlrl · pymantic · pyoxigraph · pyrdfa3 · rdflib-jsonld · SPARQLWrapper · owlready2 · prov · pyshacl