LogoLogo
  • About
  • Installation
  • Update & migration
  • Configuration
    • Hostname
    • TLS / HTTPS
    • Database
    • Logging
    • API Security
    • Storage
      • Disk
      • In-memory
      • S3
    • RTMP
    • SRT
    • FFmpeg
    • Sessions
    • Metrics
    • Router
    • Debug
  • API Swagger-Documentation
  • API Clients
  • Web-Interface
  • Guides
    • Beginner
    • RTMP
    • SRT
    • Filesystems
  • General
    • Prometheus metrics
  • API
    • Login
    • Config
    • Log
    • Filesystem
      • Disk
      • In-memory
      • S3
    • Metrics
    • Sessions
    • Profiling
    • Ping
  • API / FFmpeg
    • Process
      • Command
      • Metadata
      • State
      • Probe
      • Report
    • Skills
    • Widget (Website)
  • API / RTMP
    • RTMP
  • API / SRT
    • SRT
  • Development
    • Architecture
    • Coding
    • Custom Docker images
    • Benchmark
    • Support
Powered by GitBook
On this page
  • Golang
  • Example
  • Repository
  • Python3
  • Install
  • Example
  • Repository

Was this helpful?

Export as PDF

API Clients

Golang

Example

import "github.com/datarhei/core-client-go/v16"

client, err := coreclient.New(coreclient.Config{
    Address: "https://example.com:8080",
    Username: "foo",
    Password: "bar",
})
if err != nil {
    ...
}

processes, err := client.ProcessList(coreclient.ProcessListOptions{})
if err != nil {
    ...
}

Repository

Python3

Install

pip install https://github.com/datarhei/core-client-python/archive/refs/heads/main.tar.gz

Example

from core_client import Client

client = Client(
    base_url="https://example.com:8080",
    username="foo",
    password="bar"
)
client.login()

process_list = client.v3_process_get_list()
for process in processes:
    print(process.id)
import asyncio
from core_client import AsyncClient

client = AsyncClient(
    base_url="https://example.com:8080",
    username="foo",
    password="bar"
)
client.login()

process_list = await client.v3_process_get_list()
for process in processes:
    print(process.id)

Repository

PreviousAPI Swagger-DocumentationNextWeb-Interface

Last updated 2 years ago

Was this helpful?

GitHub - datarhei/core-client-go: An API client library for datarhei Core in GoGitHub
GitHub - datarhei/core-client-python: An API client library for datarhei Core in Python3.GitHub
Logo
Logo