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-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 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
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb9de0e9a5554e59fd377b1a29b3f51d5e0e600d6a6b8822502ca8276ced8c81
|
|
| MD5 |
b07a22193e9c113e61545daa45371f49
|
|
| BLAKE2b-256 |
4e9f539ea0ede68f4cda7d7265bd951ac9bf7e1124270413e77fe2cd72542e47
|
Provenance
The following attestation bundles were made for mergeway-0.2.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.2.0.tar.gz -
Subject digest:
cb9de0e9a5554e59fd377b1a29b3f51d5e0e600d6a6b8822502ca8276ced8c81 - Sigstore transparency entry: 1437108661
- Sigstore integration time:
-
Permalink:
mergewayhq/mergeway-python@98a84baadac3ad8b10deda192e774ed45ae92a9c -
Branch / Tag:
refs/tags/v0.2.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@98a84baadac3ad8b10deda192e774ed45ae92a9c -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca7c7890fe0204981731cd2cce49a84c608afc130c744f2ede1e1ace9b63a24d
|
|
| MD5 |
7eddcf5decf095da63609904d99a2c3e
|
|
| BLAKE2b-256 |
9f0aca0cc2edd672ba2f176337ea2c4fa9c7896be020521417aeba236e587c77
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mergeway-0.2.0-py3-none-any.whl -
Subject digest:
ca7c7890fe0204981731cd2cce49a84c608afc130c744f2ede1e1ace9b63a24d - Sigstore transparency entry: 1437108675
- Sigstore integration time:
-
Permalink:
mergewayhq/mergeway-python@98a84baadac3ad8b10deda192e774ed45ae92a9c -
Branch / Tag:
refs/tags/v0.2.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@98a84baadac3ad8b10deda192e774ed45ae92a9c -
Trigger Event:
push
-
Statement type: