AMCP (Advanced Media Control Protocol) Client Library
Project description
Python AMCP Client Library
v0.2.1
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
from amcp_pylib.core import Client client = Client() client.connect("caspar-server.local", 6969) # defaults to 127.0.0.1, 5250
Built-in support for asyncio
module:
import asyncio from amcp_pylib.core import ClientAsync client = ClientAsync() asyncio.new_event_loop().run_until_complete(client.connect("caspar-server.local", 6969))
Sending commands
from amcp_pylib.core import Client from amcp_pylib.module.query import VERSION, BYE client = Client() client.connect() response = client.send(VERSION(component="server")) print(response) response = client.send(BYE()) print(response)
<SuccessResponse(data=['2.0.7.e9fc25a Stable'], code=201, code_description='VERSION')> <InfoResponse( data=['SERVER SENT NO RESPONSE'], code=0, code_description='EMPTY')>
All supported protocol commands are listed and documented on CasparCG's wiki pages. Some commands may not be supported yet (in that case, please create issue (or pull ;) request).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size amcp_pylib-0.2.2-py3-none-any.whl (30.6 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size amcp_pylib-0.2.2.tar.gz (22.3 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for amcp_pylib-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a864249b8beaf49d4658020f174e564c20173b5e9f3c272388d2dc2da781846a |
|
MD5 | b852aa27af436b8a18615043174215f4 |
|
BLAKE2-256 | 6d29e6f78ef3e717c2cd553fc03861f6053738402cccf420facc6ff74b2cadc1 |