MCPcopy Create free account
hub / github.com/tiny-pilot/tinypilot / version_get

Function version_get

app/api.py:406–423  ·  view source on GitHub ↗

Retrieves the current installed version of TinyPilot. Returns: On success, a JSON data structure with the following properties: version: str. Example: { "version": "1.2.3-16+7a6c812", } Returns error object on failure.

()

Source from the content-addressed store, hash-verified

404@api_blueprint.route('/version', methods=['GET'])
405@required_auth(auth.Role.OPERATOR)
406def version_get():
407 """Retrieves the current installed version of TinyPilot.
408
409 Returns:
410 On success, a JSON data structure with the following properties:
411 version: str.
412
413 Example:
414 {
415 "version": "1.2.3-16+7a6c812",
416 }
417
418 Returns error object on failure.
419 """
420 try:
421 return json_response.success({'version': version.local_version()})
422 except version.Error as e:
423 return json_response.error(e), 500
424
425
426@api_blueprint.route('/latestRelease', methods=['GET'])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected