Protocol Pact: Universal Markdown for Shell/MCP/REST/WS
Project description
Propact 🚀 Protocol Pact via Markdown
Markdown speaks all protocols! Shell → MCP → REST/WS without conversion.
pip install propact
propact README.md # Run this file!
🚀 Quick Start
echo "Shell → MCP → REST pipeline works!"
Features
- Universal Protocol Support: Execute Shell, MCP, REST, and WebSocket protocols directly from Markdown
- Attachment Handling: Manage binary files and images within your protocol documents
- Async Execution: Full async/await support for concurrent protocol execution
- Type Safety: Full type annotations with Pydantic integration
- Modern Python: Built with Python 3.10+ and the latest best practices
Example Usage
import asyncio
from propact import ToonPact
async def main():
# Load a Protocol Pact document
pact = ToonPact("README.md")
# Execute all protocols
results = await pact.execute()
print(results)
# Execute only shell protocols
shell_results = await pact.execute(protocol=ProtocolType.SHELL)
print(shell_results)
asyncio.run(main())
Protocol Blocks
Shell Protocol
echo "Hello from shell!"
ls -la
MCP Protocol
{
"method": "tools/call",
"params": {
"name": "example_tool",
"arguments": {"input": "test"}
}
}
REST Protocol
GET https://api.example.com/data
Content-Type: application/json
WebSocket Protocol
{
"type": "subscribe",
"channel": "updates"
}
Installation
pip install propact
Or with Poetry:
poetry add propact
Development
# Clone the repository
git clone https://github.com/wronai/propact.git
cd propact
# Install development dependencies
poetry install --with dev
# Run tests
make test
# Run linting
make lint
License
Licensed under Apache-2.0.
Licensed under Apache-2.0.
Apache-2.0 © Tom Sapletta
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
propact-0.0.3.tar.gz
(13.3 kB
view details)
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
propact-0.0.3-py3-none-any.whl
(16.4 kB
view details)
File details
Details for the file propact-0.0.3.tar.gz.
File metadata
- Download URL: propact-0.0.3.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb5ccce2c00cb97d7351457335df3d06b64cd1c2ffebe7167b048b0d2ad111d
|
|
| MD5 |
73d36f896bb11399693ec53ffa9187ae
|
|
| BLAKE2b-256 |
e95c4ee120aca003910670b8e5e680fb751d41851aa33b3f2b76b52198a0fca7
|
File details
Details for the file propact-0.0.3-py3-none-any.whl.
File metadata
- Download URL: propact-0.0.3-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
682b6f2c32d50005d9249781b1368bb48914c3d06b244bde1dcb574fd70fb2a8
|
|
| MD5 |
764e947945fadcb3899c9bc8a5e14726
|
|
| BLAKE2b-256 |
e77d8a10aac291e699489c5f7c99c9486ee4011a38897f283c8fd56e23678613
|