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.2.4.tar.gz (94.0 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.2.4-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pylpg-0.2.4.tar.gz
Algorithm Hash digest
SHA256 c3acc6f78c8235809402d253a90932632145c985de92799f27146e40cf50adc6
MD5 644442f5a3a13a3082dd057f6fa53d04
BLAKE2b-256 a4848ebc9ee69925fa7689ba0fa1a8bbe768c89f3988fce9a0fc3be58d2314eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylpg-0.2.4.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.2.4-py3-none-any.whl.

File metadata

  • Download URL: pylpg-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 15.2 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.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a877a49592194adaf1ecdd2e3fc6d0351c55579d39021de31ebd9dac50b2d8bd
MD5 837b29ea5b042b898086e00e7783cb7e
BLAKE2b-256 d95383f492413645f8dc9c9bbaac6c44dcb9b48346e904fd82a27afc293576e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylpg-0.2.4-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

0.3.0

2 files

This release

0.2.4 This release

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