Skip to main content

AMCP (Advanced Media Control Protocol) Client Library

Project description

Python AMCP Client Library

v0.2.1

Build Status PyPI PyPI Support Project

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.

Source Distribution

amcp_pylib-0.2.1.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

amcp_pylib-0.2.1-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

Details for the file amcp_pylib-0.2.1.tar.gz.

File metadata

  • Download URL: amcp_pylib-0.2.1.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for amcp_pylib-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1be56f8d0e311442a65e5360b70fa8cb3753cf87568831c5d22f1a300b57aa51
MD5 8fdc85f4da23ae0fa933f78192c93335
BLAKE2b-256 e3ba26f841f02a3b4e8bf2b502d6e12398909a09b9c6ae70aa7ac04fa9554585

See more details on using hashes here.

File details

Details for the file amcp_pylib-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: amcp_pylib-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 30.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for amcp_pylib-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 34758fcf3f1464cca24614a8cebd66a867094614d093a1a7b2dddf613d3bbfd0
MD5 f741f1d62cc73969b1cc33ab6cf55fbb
BLAKE2b-256 b031a66c78666ab5b534a30972406c090445e6d419635b03d1a2e0dbd1f5d254

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page