Skip to main content

Python automation wrapper for Mergeway repositories

Project description

mergeway-python

mergeway-python is a Python automation layer for Mergeway repositories. The published PyPI package is mergeway. 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. For the broader Mergeway toolset, see the main website: https://mergewayhq.github.io/

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 mergeway

If you are working from a local checkout and want an editable install:

pip install -e .

If mergeway-cli is not already available in your environment, install it by following the official installation guide: https://mergewayhq.github.io/cli/getting-started/installation/

Quick Example

This example assumes you already have a Mergeway repository on disk:

from pathlib import Path

from mergeway import Database

repo_root = Path("/path/to/mergeway-repo")
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])

Full Docs

Contributing

Please see CONTRIBUTING.md

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.2.0.tar.gz (12.8 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.2.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mergeway-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cb9de0e9a5554e59fd377b1a29b3f51d5e0e600d6a6b8822502ca8276ced8c81
MD5 b07a22193e9c113e61545daa45371f49
BLAKE2b-256 4e9f539ea0ede68f4cda7d7265bd951ac9bf7e1124270413e77fe2cd72542e47

See more details on using hashes here.

Provenance

The following attestation bundles were made for mergeway-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: mergeway-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca7c7890fe0204981731cd2cce49a84c608afc130c744f2ede1e1ace9b63a24d
MD5 7eddcf5decf095da63609904d99a2c3e
BLAKE2b-256 9f0aca0cc2edd672ba2f176337ea2c4fa9c7896be020521417aeba236e587c77

See more details on using hashes here.

Provenance

The following attestation bundles were made for mergeway-0.2.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