Skip to main content

Python automation wrapper for Mergeway repositories

Project description

mergeway-python

mergeway-python is a Python automation layer for Mergeway repositories. It wraps mergeway-cli, uses the CLI's JSON output as its data boundary, and can generate typed Python models from a repository's mergeway.yaml schema.

Goals

  • provide a Python-first API for Mergeway repository automation
  • keep mergeway-cli as the source of truth for reads, writes, and validation
  • generate typed dataclasses from Mergeway entity definitions
  • expose repository operations without introducing a custom persistence layer

Installation

mergeway-python requires mergeway-cli to be available on PATH.

Install the package into your Python environment:

pip install .

If you are installing from a local checkout and want editable installs while using the package:

pip install -e .

If mergeway-cli is not already available in your environment, install it using the distribution method you use for Mergeway in your organization.

Quick Example

This example is copy-paste runnable from a checkout of this repository after syncing the environment:

UV_CACHE_DIR=.cache/uv uv run python - <<'PY'
from pathlib import Path

from mergeway import Database

repo_root = Path("tests/fixtures/full")
db = Database(repo_root / "mergeway.yaml")

db.generate_classes(repo_root / "generated_models.py")

user = db.get("User", "user-alice")
posts = db.export("Post")

print(user.to_payload())
print([post.title for post in posts])
PY

Full Docs

Project details


Download files

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

Source Distribution

mergeway-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

mergeway-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file mergeway-0.1.0.tar.gz.

File metadata

  • Download URL: mergeway-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mergeway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b3ebf7bbcdf564be5e7ab332f2f236546e4188e690feb51523eeb8dec16f37c2
MD5 321aa426c27834f1c6f8d5d9c7008678
BLAKE2b-256 37c810054c1e178f70f2f6cea69ee8f9336acfd95eee830bf236a8722b1eb834

See more details on using hashes here.

Provenance

The following attestation bundles were made for mergeway-0.1.0.tar.gz:

Publisher: python-ci-release.yml on mergewayhq/mergeway-python

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

File details

Details for the file mergeway-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mergeway-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mergeway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74c42a79243559a46255830af593e13826fefb3c2b2ee42782f527abf8f04a99
MD5 2055decd1aced67fce033be9d386e400
BLAKE2b-256 e2ae8bde6f9a043f7472f947bdc10923674698a9e296476a3e08ab9326fbddb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mergeway-0.1.0-py3-none-any.whl:

Publisher: python-ci-release.yml on mergewayhq/mergeway-python

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page