Skip to content

Requesting help to get started using the API to control the configuration #3727

Closed Answered by aler9
helarsen asked this question in Questions
Discussion options

You must be logged in to vote

Hello, if want a ready-to-use client library for interacting with MediaMTX, you can generate one by using openapi-generator.

Download the MediaMTX API definitions here:
https://github.com/bluenviron/mediamtx/blob/main/apidocs/openapi.yaml

Then install openapi-generator:

sudo pip install openapi-generator-cli

then generate the library:

openapi-generator-cli generate -i openapi.yaml -g python

then take a look at the README.md that was just generated. It provides ready-to-use code:

import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:9997
# See configuration.py for a list of all suppor…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@helarsen
Comment options

Answer selected by helarsen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants