A Python Object Graph Mapper for labeled property graph databases
Project description
pylpg
A Python Object Graph Mapper for labeled property graph databases.
Features
- Simple model definition using Python type annotations
- Multi-backend: Neo4j, FalkorDB, FalkorDBLite (embedded)
- Session-based persistence with node binding
- Transactional batch operations (Neo4j)
- Node hydration from raw query results
Installation
pip install pylpg[neo4j] # Neo4j
pip install pylpg[falkordb] # FalkorDB
pip install pylpg[falkordblite] # FalkorDBLite (embedded, no server)
Quick example
import pylpg.node
import pylpg.relationship
import pylpg.session
import pylpg.backend.neo4j
class Person(pylpg.node.Node):
name: str
age: int | None = None
class Knows(pylpg.relationship.Relationship):
__type__ = "KNOWS"
since: str | None = None
backend = pylpg.backend.neo4j.Neo4jBackend(
hostname="localhost",
username="neo4j",
password="password",
)
with pylpg.session.Session(backend) as session:
alice = Person(name="Alice", age=30)
bob = Person(name="Bob")
session.save(alice)
session.save(bob)
rel = Knows(source=alice, target=bob, since="2024")
session.save(rel)
Documentation
Full documentation is available at https://adrienrougny.github.io/pylpg/.
License
GPLv3. See LICENSE for details.
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 pylpg-0.1.0.tar.gz.
File metadata
- Download URL: pylpg-0.1.0.tar.gz
- Upload date:
- Size: 90.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a35d3bb3591672b332d189b0a58a9370e81c394cb6347a787984b04fc088cc7
|
|
| MD5 |
ebeabfe2e312bdad69c63310492fd7ec
|
|
| BLAKE2b-256 |
cbaf4660a13830a2e03839ee52462418126427965d569ac05f48b7160bf7563f
|
Provenance
The following attestation bundles were made for pylpg-0.1.0.tar.gz:
Publisher:
release.yml on adrienrougny/pylpg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylpg-0.1.0.tar.gz -
Subject digest:
4a35d3bb3591672b332d189b0a58a9370e81c394cb6347a787984b04fc088cc7 - Sigstore transparency entry: 1206451360
- Sigstore integration time:
-
Permalink:
adrienrougny/pylpg@6760a9513fc925ecc299cde887aabfd314a082bf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/adrienrougny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6760a9513fc925ecc299cde887aabfd314a082bf -
Trigger Event:
push
-
Statement type:
File details
Details for the file pylpg-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pylpg-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 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 |
de662e3e83d2b1d63127349b10f25dc9a6d9e442f63ff5c79903e787e6596798
|
|
| MD5 |
c371c279d10f4e5193d163bbd4ac8810
|
|
| BLAKE2b-256 |
cad22e0a8949faf046738ad0041988f0a95e6c72015f99a9dfe29a8cff99c805
|
Provenance
The following attestation bundles were made for pylpg-0.1.0-py3-none-any.whl:
Publisher:
release.yml on adrienrougny/pylpg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pylpg-0.1.0-py3-none-any.whl -
Subject digest:
de662e3e83d2b1d63127349b10f25dc9a6d9e442f63ff5c79903e787e6596798 - Sigstore transparency entry: 1206451370
- Sigstore integration time:
-
Permalink:
adrienrougny/pylpg@6760a9513fc925ecc299cde887aabfd314a082bf -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/adrienrougny
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6760a9513fc925ecc299cde887aabfd314a082bf -
Trigger Event:
push
-
Statement type: