Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 2 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 (almost 2 years ago)
- Last Synced: 2024-10-06T16:38:31.376Z (4 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: 10
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Python AMCP Client Library
> v0.2.2[![Build Status](https://travis-ci.org/dolejska-daniel/amcp-pylib.svg?branch=master)](https://travis-ci.org/dolejska-daniel/amcp-pylib)
[![PyPI](https://img.shields.io/pypi/dm/amcp-pylib.svg)](https://pypi.org/project/amcp-pylib/)
[![PyPI](https://img.shields.io/pypi/l/amcp-pylib.svg)](https://pypi.org/project/amcp-pylib/)
[![Support Project](https://img.shields.io/badge/support_project-PayPal-blue.svg)](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)._