Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylpg-0.3.0.tar.gz (95.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylpg-0.3.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file pylpg-0.3.0.tar.gz.

File metadata

  • Download URL: pylpg-0.3.0.tar.gz
  • Upload date:
  • Size: 95.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pylpg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f7608c1a946d58ae588fbaaade61cfce4c4f0bf18f3deb60d1490787c53adf81
MD5 8864cc690cbd83fdd5f616d67deaab9d
BLAKE2b-256 3c90ba35cfec27600cd54ddcc5e0e76a5d1b7064fdb42a5f5e4538190a61e4b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylpg-0.3.0.tar.gz:

Publisher: release.yml on adrienrougny/pylpg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylpg-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pylpg-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pylpg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e581f49d58671763259017ba2801c89f7b97b4aa09c335a4ea835789dac182b
MD5 a94bac91ed3793b27146d70e9f66762d
BLAKE2b-256 29a9d3f06e84147ee0ac923a03d5d57cde41ceb4293bad22b96feabdaf4c89b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylpg-0.3.0-py3-none-any.whl:

Publisher: release.yml on adrienrougny/pylpg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

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