PostmanxGithub Action Automatic Sync
This Python package automates the process of setting up GitHub Actions workflows for Postman collections. It supports both GitHub repository integration and local workflow setup, allowing for flexible usage in various scenarios.
Features
- Export Postman collections using a UID or from a local file
- Add Postman collections to GitHub repositories (new or existing)
- Create or update GitHub Actions workflows
- Set up workflows locally without GitHub interaction
- Use custom YAML templates for GitHub Actions workflows
- Support for both new and existing repositories
Installation
You can install the package using pip:
pip install postman-github-sync
Usage
After installation, you can use the package in two ways:
- As a command-line tool:
postman_github_sync [--local] [--template PATH_TO_TEMPLATE]
- As a Python module:
from postman_github_sync import main
main()
Command-line Options
--local: Set up the workflow files locally without interacting with GitHub.--template PATH_TO_TEMPLATE: Use a custom YAML template for the GitHub Actions workflow.
Environment Variables
GITHUB_TOKEN: Your GitHub personal access token (required for GitHub operations)POSTMAN_API_KEY: Your Postman API key (required for exporting collections by UID)
Examples
-
Setting up a workflow in a GitHub repository:
postman_github_sync
-
Setting up a local workflow:
postman_github_sync --local -
Using a custom template for GitHub setup:
postman_github_sync --template my_template.yml
Development
To set up the development environment:
-
Clone the repository:
git clone https://github.com/yourusername/postman_github_sync.git cd postman_github_sync
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the package in editable mode with development dependencies:
pip install -e ".[dev]"
-
Run tests:
pytest
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for postman-github-sync 0.1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| postman_github_sync-0.1.0.3.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| postman_github_sync-0.1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / postman_github_sync-0.1.0.3.tar.gz
| Download URL | postman_github_sync-0.1.0.3.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3684f8486752b262758b15ef8c99a4ca61debc0afe7f20eff31e1dee6a15248
|
|
BLAKE2b-256 checksum How to use checksums |
4f695bf4b025b02e96cce621df22b4d23abcebbf6a8c046cd5c4226559bce3aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Release files / postman_github_sync-0.1.0.3-py3-none-any.whl
| Download URL | postman_github_sync-0.1.0.3-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a87740e15ae7a41cdb372fef717ef4b9f2f13fb7ba9b9986e83f8974608c8edd
|
|
BLAKE2b-256 checksum How to use checksums |
007ae1790f177b861fe6d253d77a8fb85fc2a198b728a16f0301a50b0157a9af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|