Skip to main content

AMCP (Advanced Media Control Protocol) Client Library

Project description

Python AMCP Client Library

v0.3.0

CI PyPI PyPI PyPI - Python Version 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

AMCP PyLib supports Python 3.9 and newer.

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()

# with command syntax of "VERSION {[component:string]}"
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=[],                       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.3.0b1.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amcp_pylib-0.3.0b1-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

Details for the file amcp_pylib-0.3.0b1.tar.gz.

File metadata

  • Download URL: amcp_pylib-0.3.0b1.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for amcp_pylib-0.3.0b1.tar.gz
Algorithm Hash digest
SHA256 d54ae243438591529705eb669fa2c9e538392812f65d52f9ff2ace84e15add04
MD5 c362f90c842faf9c1682b023fe00016a
BLAKE2b-256 5bb644861ba495b630befce321646f082c9514dc010f562d8ebc274bc2f3653d

See more details on using hashes here.

Provenance

The following attestation bundles were made for amcp_pylib-0.3.0b1.tar.gz:

Publisher: python-publish.yml on dolejska-daniel/amcp-pylib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file amcp_pylib-0.3.0b1-py3-none-any.whl.

File metadata

  • Download URL: amcp_pylib-0.3.0b1-py3-none-any.whl
  • Upload date:
  • Size: 33.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for amcp_pylib-0.3.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 472ce7a55865c03c0344a64f58401a8c63d7bcb9c90d125917fec59ada58c8e7
MD5 e78964932ff9537593b08633a84a1c20
BLAKE2b-256 41c0edb708984cf85aa5ad053c84c168d3aa6d5a329b9f7283bdcdf9bdb02915

See more details on using hashes here.

Provenance

The following attestation bundles were made for amcp_pylib-0.3.0b1-py3-none-any.whl:

Publisher: python-publish.yml on dolejska-daniel/amcp-pylib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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