https://github.com/dolejska-daniel/amcp-pylib
Python client library for CasparCG's AMCP (Advanced Media Control Protocol).
https://github.com/dolejska-daniel/amcp-pylib
amcp caspar casparcg casparcg-client casparcg-connection library python python3
Last synced: 3 months ago
JSON representation
Python client library for CasparCG's AMCP (Advanced Media Control Protocol).
- Host: GitHub
- URL: https://github.com/dolejska-daniel/amcp-pylib
- Owner: dolejska-daniel
- License: mit
- Created: 2019-10-22T15:39:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T01:17:13.000Z (over 2 years ago)
- Last Synced: 2025-04-13T12:18:10.044Z (3 months ago)
- Topics: amcp, caspar, casparcg, casparcg-client, casparcg-connection, library, python, python3
- Language: Python
- Homepage: https://pypi.org/project/amcp-pylib/
- Size: 97.7 KB
- Stars: 11
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Python AMCP Client Library
> v0.2.2[](https://travis-ci.org/dolejska-daniel/amcp-pylib)
[](https://pypi.org/project/amcp-pylib/)
[](https://pypi.org/project/amcp-pylib/)
[](https://www.paypal.me/dolejskad)## Introduction
Welcome to the AMCP client library repository for Python!
The goal of this library is to provide simple and understandable interface for communication with CasparCG server.## Installation
```
pip install amcp_pylib
```## Usage examples
Below you can see various usage examples.### Connecting to server
```python
from amcp_pylib.core import Clientclient = Client()
client.connect("caspar-server.local", 6969) # defaults to 127.0.0.1, 5250
```Built-in support for `asyncio` module:
```python
import asyncio
from amcp_pylib.core import ClientAsyncclient = ClientAsync()
asyncio.new_event_loop().run_until_complete(client.connect("caspar-server.local", 6969))
```### Sending commands
```python
from amcp_pylib.core import Client
from amcp_pylib.module.query import VERSION, BYEclient = Client()
client.connect()response = client.send(VERSION(component="server"))
print(response)response = client.send(BYE())
print(response)
``````shell
```
All supported protocol commands are listed and documented on CasparCG's [wiki pages](https://github.com/CasparCG/help/wiki/AMCP-Protocol#table-of-contents).
_Some commands may not be supported yet (in that case, please create issue (or pull ;) request)._