skillfed

pystardog

Python client for Stardog Platform Endpoints and Stardog Cloud

pystardog v0.20.0 115.9K downloads/30d#12,231 on PyPI41
Permissive license Apache-2.0 Active released

What it is and what it does

Pystardog is a Python HTTP client for the Stardog knowledge graph platform, enabling developers to query and manage RDF data stored in Stardog servers or Stardog Cloud. It wraps HTTP communication with requests and requests-toolbelt, and integrates with rdflib for RDF data handling. The package is designed for both local Stardog instances and cloud deployments, with optional cloud-specific functionality available via an extras install.

Typical usage involves establishing a connection to a Stardog endpoint, executing SPARQL queries, and processing results. The library handles authentication, request formatting, and response parsing, abstracting away low-level HTTP details. It supports Python 3.9 through 3.13 and is actively maintained.

Use it for:

  • Query a Stardog knowledge graph from a Python application to retrieve semantic data.
  • Integrate Stardog Cloud's natural language query features into Python scripts.
  • Build data pipelines that fetch RDF triples and process them with rdflib.
  • Automate SPARQL queries against a local or remote Stardog server.
  • Prototype semantic search or reasoning applications backed by Stardog.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for querying and managing Stardog knowledge graph servers and Stardog Cloud instances.

Yes. The package has low install friction, active maintenance, permissive licensing, and no known vulnerabilities. It is the official Python client for Stardog and is well-suited for anyone building applications that need to query or manage knowledge graphs on the Stardog platform.

Install

pystardog on PyPI

pip

pip install pystardog

uv

uv add pystardog

poetry

poetry add pystardog

Installing pystardog

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained with recent releases; last commit on 2026-05-18 and latest release on 2026-03-18. Supports current Python versions (3.9 through 3.13).

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most production and proprietary projects.

Quickstart

pip install pystardog

import pystardog

# Connect to a Stardog endpoint and execute a query
conn = pystardog.Connection(endpoint='http://localhost/mydb')
results = conn.query('SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 10')

Requires Python 3.9 or later; requires a running Stardog server or Stardog Cloud account to connect to.

Verify before relying

  • Exact API surface and method signatures for querying and managing Stardog endpoints.
  • Whether the package supports SPARQL Update operations or only SELECT/CONSTRUCT queries.
  • Authentication mechanism details (API key, username/password, OAuth) for Stardog Cloud.
  • Performance characteristics for large result sets or long-running queries.
  • How rdflib integration works in practice for RDF data handling.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 3 — requests, requests-toolbelt, rdflib
Maintenance actively maintained — 149 days since the last release
Last repo commit
First released
Downloads 115,945/month — #12,231 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pystardog-0.20.0-py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

stardog python clientknowledge graph query librarysemantic database pythonrdf query clientstardog cloud apisparql query pythongraph database client
knowledge-graphsemantic-websparql

More Front-Ends packages