Registry / database / pystardog

pystardog

JSON →
library0.20.0pypypi✓ verified 82d ago

Python client for Stardog Knowledge Graph Platform endpoints and Stardog Cloud. Current version 0.20.0, requires Python >=3.9. Release cadence is irregular; breaking changes occur between minor versions.

pip install pystardog
INSTALL
IMPORT
SIG · PYSTARDOG
P
pystardog
databasepythonv0.20.0
Install
2.7s avg
Import
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.20.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.000s · 28MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Connection
from stardog import Connection
from pystardog import Stardog
Admin
from stardog import Admin
SelectQueryResult
from stardog import SelectQueryResult

Connect to a Stardog server and get database size. Uses environment variable for endpoint; adjust credentials as needed.

from pystardog import Stardog sd = Stardog(endpoint=os.environ.get('STARDOG_ENDPOINT', 'http://localhost:5820')) # Authentication optional # sd.set_credentials('admin', 'admin') db = sd.database('myDB') print(db.size())
Debug
Known issues
breakingIn version 0.17.0, the `Stardog` constructor changed from `Stardog(endpoint=..., ..., ssl=...)` to `Stardog(endpoint=..., ssl_config=...)`. Old `ssl` parameter is removed.
fix
Use `ssl_config=SSLConfig(...)` instead of `ssl=True/False`.
affects: >=0.17.0
breakingIn version 0.18.0, `database.query()` no longer returns raw results by default; returns `QueryResult` object. Access via `result.results`.
fix
Use `result = db.query('...'); rows = result.results`.
affects: >=0.18.0
deprecated`Stardog.database(name)` is deprecated in favor of `Stardog.databases().get(name)`.
fix
Use `sd.databases().get('myDB')` instead.
affects: >=0.20.0, <1.0
gotchaDefault timeout is 30 seconds; long-running SPARQL queries may timeout. Set custom timeout when constructing Stardog client.
fix
`Stardog(endpoint=..., timeout=120)`
affects: all
Upgrade
Version history
0.20.0latest on PyPI · released Mar 18, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
pystardog — pip install pystardog · libregistry