Skip to main content

mkdocs-macros-sparqld

mkdocs-macros pluglet that runs sparqld during mkdocs build / mkdocs serve and expands SPARQL macros into rendered pages.

Full documentation: MkDocs integration

Install

pip install mkdocs-macros-sparqld

The pluglet requires a POSIX environment because it uses sh to start the server. Install sparqld 0.1.9 or later on PATH, or point extra.sparqld.binary at the executable. Until 0.1.9 is released, build the binary from the sparqld source checkout.

Configuration

Register the pluglet with mkdocs-macros:

plugins:
  - macros:
      modules: [mkdocs_macros_sparqld]

The pluglet reads sparqld.toml next to mkdocs.yml. If the file is missing, the pluglet creates it with directory = "docs". It uses the file's source settings and uses docs/ if the file omits directory. It starts a temporary HTTP server on a free port on localhost. The server loads the dataset once.

Optional overrides under extra.sparqld:

extra:
  sparqld:
    directory: data                    # overrides sparqld.toml for MkDocs
    binary: target/debug/sparqld       # default: sparqld on PATH

If you set extra.sparqld.directory, the pluglet uses it to seed a new sparqld.toml. An existing file keeps its contents.

Macros and filters

  • Use sparql('SELECT …') to run a SPARQL query.
  • Use stored_sparql('path/from/mkdocs/root.rq') to run a query file relative to the MkDocs project root.
  • Apply the sparql_table filter to render SELECT bindings as a Markdown table.
  • Read the local endpoint port from the sparqld_port variable.
{{ stored_sparql('docs/queries/names.rq') | sparql_table }}

License

Apache-2.0 OR MIT

Metadata

Release files for mkdocs-macros-sparqld 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-macros-sparqld 0.3.1
File Size Uploaded Provenance Actions
mkdocs_macros_sparqld-0.3.1.tar.gz 12.5 kB Without provenance Details for mkdocs_macros_sparqld-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-macros-sparqld 0.3.1
File Interpreter ABI Platform Actions
mkdocs_macros_sparqld-0.3.1-py3-none-any.whl Python 3 none any Details for mkdocs_macros_sparqld-0.3.1-py3-none-any.whl

Total release size: 33.9 kB

Release files / mkdocs_macros_sparqld-0.3.1.tar.gz

Download URL mkdocs_macros_sparqld-0.3.1.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5359f924d1a1610007d1d82acf81181f987c091531f9e2994abfb7b40d6f5526
BLAKE2b-256 checksum
How to use checksums
c33b14259f45f493ec58ccee9ffd8b4fc1913a66006dd8d534ad845d7ef65702
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.8 Linux/6.8.0-149-generic

Release files / mkdocs_macros_sparqld-0.3.1-py3-none-any.whl

Download URL mkdocs_macros_sparqld-0.3.1-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bad9ae974ce84dd632abba4fadc8c3af2c39bcc1133c36514d7607aa2f9ae2a1
BLAKE2b-256 checksum
How to use checksums
231525c6c4381d0fa896f04851f95bf70872daec52e021a83e17b00ff53ecdfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.8 Linux/6.8.0-149-generic

Security for mkdocs-macros-sparqld 0.3.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page