Client¶
-
class
vidispine.client.
Client
(url: Optional[str] = None, user: Optional[str] = None, password: Optional[str] = None)¶ Request Client
The Client object handles all API requests made to Vidispine.
-
auth
¶ Tuple of user and password to be used as Basic Auth
-
base_url
¶ The base url to be used for each request e.g. http://localhost/API
-
delete
(url: str, **kwargs: Any) → Any¶ Sends a DELETE request.
- Parameters
url – The URL endpoint you wish to query.
kwargs – Optional arguments that
_request
takes.
- Returns
ClientResponse
object. This will be the response text or the parsed JSON payload if present.- Return type
vidispine.typing.ClientResponse
-
get
(url: str, **kwargs: Any) → Any¶ Sends a GET request.
- Parameters
url – The URL endpoint you wish to query.
kwargs – Optional arguments that
_request
takes.
- Returns
ClientResponse
object. This will be the response text or the parsed JSON payload if present.- Return type
vidispine.typing.ClientResponse
-
post
(url: str, **kwargs: Any) → Any¶ Sends a POST request.
- Parameters
url – The URL endpoint you wish to query.
kwargs – Optional arguments that
_request
takes.
- Returns
ClientResponse
object. This will be the response text or the parsed JSON payload if present.- Return type
vidispine.typing.ClientResponse
-
put
(url: str, **kwargs: Any) → Any¶ Sends a PUT request.
- Parameters
url – The URL endpoint you wish to query.
kwargs – Optional arguments that
_request
takes.
- Returns
ClientResponse
object. This will be the response text or the parsed JSON payload if present.- Return type
vidispine.typing.ClientResponse
-
request
(method: str, url: str, **kwargs: Any) → Union[Dict[str, Any], str]¶ Pass-through request method
This is to be used for functionality that has not yet been implemented in the Vidispine Adapter.
- Parameters
method – The desired HTTP method to use for example GET, POST, PUT… etc.
url – The URL endpoint you wish to query.
kwargs – Optional arguments that
_request
takes.
- Returns
ClientResponse
object. This will be the response text or the parsed JSON payload if present.- Return type
vidispine.typing.ClientResponse
-
Vidispine¶
-
class
vidispine.client.
Vidispine
(url: Optional[str] = None, user: Optional[str] = None, password: Optional[str] = None)¶ The Vidispine Adapter object.
This acts as the main interface you will use to make the Vidispine requests.
-
reindex
(index: str, params: Optional[dict] = None) → Dict[str, Any]¶ Issues a reindex request to Vidispine
- Parameters
index – The index to reindex.
params – Query params to supply.
- Returns
JSON response from the request.
- Return type
vidispine.typing.BaseJson.
-
version
() → Dict[str, Any]¶ Vidispine version information.
- Returns
JSON response from the request.
- Return type
vidispine.typing.BaseJson.
-