Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![RDFLib logo](_static/RDFlib.png)

# RDFLib

RDFLib is a pure Python package for working with [RDF](http://www.w3.org/RDF/). It contains:
Expand Down
9 changes: 9 additions & 0 deletions docs/upgrade7to8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Upgrading from version 7 to 8

!!! warning "In Development"
This page is in development and will only be completed with the release of RDFLib v8.

## Python version

RDFLib 7 requires Python 3.9 or later.

11 changes: 1 addition & 10 deletions examples/custom_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,7 @@
asking for `rdf:type` triples.
Here the custom eval function is added manually, normally you would use
setuptools and entry_points to do it:
i.e. in your setup.py::
```python
entry_points = {
'rdf.plugins.sparqleval': [
'myfunc = mypackage:MyFunction',
],
}
```
entry points to do it. See the [Plugins Usage Documentation](/plugins/).
"""

from pathlib import Path
Expand Down
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ nav:

- Changes:
- Changelog: changelog.md
- Upgrading v7 to 8: upgrade7to8.md
- Upgrading v6 to 7: upgrade6to7.md
- Upgrading v5 to 6: upgrade5to6.md
- Upgrading v4 to 5: upgrade4to5.md
Expand All @@ -43,6 +44,7 @@ nav:
- Container: apidocs/rdflib.container.md
- Collection: apidocs/rdflib.collection.md
- Paths: apidocs/rdflib.paths.md
- Plugin: apidocs/rdflib.plugin.md
- Util: apidocs/rdflib.util.md
- Plugins:
- Parsers: apidocs/rdflib.plugins.parsers.md
Expand All @@ -68,7 +70,7 @@ theme:
# Choose color: https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#primary-color
palette:
- media: "(prefers-color-scheme: light)"
primary: indigo
primary: blue grey
scheme: default
toggle:
icon: material/weather-night
Expand Down
23 changes: 3 additions & 20 deletions rdflib/plugin.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
"""Plugin support for rdf.

There are a number of plugin points for rdf: parser, serializer,
"""There are a number of plugin points for rdf: parser, serializer,
store, query processor, and query result. Plugins can be registered
either through setuptools entry_points or by calling
either automatically through entry points or by calling
rdf.plugin.register directly.

If you have a package that uses a setuptools based `setup.py` you can add the
following to your setup:

```python
entry_points = {
'rdf.plugins.parser': [
'nt = rdf.plugins.parsers.ntriples:NTParser',
],
'rdf.plugins.serializer': [
'nt = rdf.plugins.serializers.NTSerializer:NTSerializer',
],
}
```

See the [setuptools dynamic discovery of services and plugins](http://peak.telecommunity.com/DevCenter/setuptools#dynamic-discovery-of-services-and-plugins)
for moreinformation.
For more details, see the [Plugins Usage Documentation](/plugins/).
"""

from __future__ import annotations
Expand Down
6 changes: 2 additions & 4 deletions rdflib/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""
Default plugins for rdflib.
This is a namespace package and contains the default plugins for
rdflib.
Default plugins for RDFLib.
This is a namespace package and contains the default plugins for RDFLib.
"""
3 changes: 1 addition & 2 deletions rdflib/plugins/parsers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
"""

"""Modules for parsing serialized RDF such as Turtle, JSON-LD etc.
"""
2 changes: 2 additions & 0 deletions rdflib/plugins/serializers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Modules for serializing RDFLib graphs into XML, HexTuples, N3, Turtle etc.
"""
1 change: 1 addition & 0 deletions rdflib/plugins/shared/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Modules shared by serializers & parsers. Currently only JSON-LD code."""
2 changes: 0 additions & 2 deletions rdflib/plugins/sparql/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""SPARQL implementation for RDFLib
!!! example "New in version 4.0"
"""

from importlib.metadata import entry_points
Expand Down
2 changes: 1 addition & 1 deletion rdflib/plugins/stores/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""
This package contains modules for additional RDFLib stores
Modules for additional RDFLib stores
"""
Loading