SQL/PGQ (Property Graph Queries) for Python
Project description
sqlpgq is a Python library for working with SQL/PGQ graph queries.
Example
With the DuckPGQ extension installed, create the following social network tables.
-- Users table
CREATE TABLE users (
id INTEGER PRIMARY KEY,
name TEXT,
age INTEGER
);
-- Friendships table
CREATE TABLE friendships (
id INTEGER PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
friend_id INTEGER REFERENCES users(id),
since DATE
);
INSERT INTO users VALUES (1, 'Alice', 30), (2, 'Bob', 25), (3, 'Carol', 35);
INSERT INTO friendships VALUES (1, 1, 2, '2020-01-01'), (2, 2, 3, '2021-06-15');
Then run examples/social_network.py to see the generated SQL/PGQ graph queries.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlpgq-0.0.1.tar.gz.
File metadata
- Download URL: sqlpgq-0.0.1.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd769945304f6d197f17a530bef0e89d88ed28f16a6303fb15f4fc1043147ea7
|
|
| MD5 |
98ef415b38dc1f8b4295e345a914951a
|
|
| BLAKE2b-256 |
88db4a182e062f8667b3b5f16445b543c153727bc95aff1205774b4bb70aeb45
|
Provenance
The following attestation bundles were made for sqlpgq-0.0.1.tar.gz:
Publisher:
ci.yml on cglwn/sqlpgq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sqlpgq-0.0.1.tar.gz -
Subject digest:
bd769945304f6d197f17a530bef0e89d88ed28f16a6303fb15f4fc1043147ea7 - Sigstore transparency entry: 766392729
- Sigstore integration time:
-
Permalink:
cglwn/sqlpgq@9f4a2c22a0828d3f34057d471f74b4cc30014eab -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/cglwn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@9f4a2c22a0828d3f34057d471f74b4cc30014eab -
Trigger Event:
push
-
Statement type:
File details
Details for the file sqlpgq-0.0.1-py3-none-any.whl.
File metadata
- Download URL: sqlpgq-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe9a0b95b49734bb9b9408ee353ef97f17821728d839ab6eb2be3a829926381a
|
|
| MD5 |
f89c016d3e51e32bd02dcad121087d68
|
|
| BLAKE2b-256 |
b486b6053d5ae31d9f510f70fadd87ddb3fc2243de73a658b397c6cf1da62d7f
|
Provenance
The following attestation bundles were made for sqlpgq-0.0.1-py3-none-any.whl:
Publisher:
ci.yml on cglwn/sqlpgq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sqlpgq-0.0.1-py3-none-any.whl -
Subject digest:
fe9a0b95b49734bb9b9408ee353ef97f17821728d839ab6eb2be3a829926381a - Sigstore transparency entry: 766392747
- Sigstore integration time:
-
Permalink:
cglwn/sqlpgq@9f4a2c22a0828d3f34057d471f74b4cc30014eab -
Branch / Tag:
refs/tags/0.0.1 - Owner: https://github.com/cglwn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@9f4a2c22a0828d3f34057d471f74b4cc30014eab -
Trigger Event:
push
-
Statement type: