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-clias 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3ebf7bbcdf564be5e7ab332f2f236546e4188e690feb51523eeb8dec16f37c2
|
|
| MD5 |
321aa426c27834f1c6f8d5d9c7008678
|
|
| BLAKE2b-256 |
37c810054c1e178f70f2f6cea69ee8f9336acfd95eee830bf236a8722b1eb834
|
Provenance
The following attestation bundles were made for mergeway-0.1.0.tar.gz:
Publisher:
python-ci-release.yml on mergewayhq/mergeway-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mergeway-0.1.0.tar.gz -
Subject digest:
b3ebf7bbcdf564be5e7ab332f2f236546e4188e690feb51523eeb8dec16f37c2 - Sigstore transparency entry: 1437079962
- Sigstore integration time:
-
Permalink:
mergewayhq/mergeway-python@51cd5bc23cb50bbf65d8d9bf8e08a92f0a10e8ed -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mergewayhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-ci-release.yml@51cd5bc23cb50bbf65d8d9bf8e08a92f0a10e8ed -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74c42a79243559a46255830af593e13826fefb3c2b2ee42782f527abf8f04a99
|
|
| MD5 |
2055decd1aced67fce033be9d386e400
|
|
| BLAKE2b-256 |
e2ae8bde6f9a043f7472f947bdc10923674698a9e296476a3e08ab9326fbddb6
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mergeway-0.1.0-py3-none-any.whl -
Subject digest:
74c42a79243559a46255830af593e13826fefb3c2b2ee42782f527abf8f04a99 - Sigstore transparency entry: 1437079993
- Sigstore integration time:
-
Permalink:
mergewayhq/mergeway-python@51cd5bc23cb50bbf65d8d9bf8e08a92f0a10e8ed -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/mergewayhq
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-ci-release.yml@51cd5bc23cb50bbf65d8d9bf8e08a92f0a10e8ed -
Trigger Event:
push
-
Statement type: