Skip to main content

Provides a Python wrapper around the BrainFrame REST API.

Project description

BrainFrame Python API

Documentation Status Publish Packages CI Status

This library is a Python wrapper around the BrainFrame REST API. It allows for easy interaction with a BrainFrame server.

from brainframe.api import BrainFrameAPI, bf_codecs

# Connect to the server
api = BrainFrameAPI("http://localhost")

# Create a new IP camera stream
stream_config = api.set_stream_configuration(
    bf_codecs.StreamConfiguration(
        name="New Stream",
        connection_type=bf_codecs.ConnType.IP_CAMERA,
        connection_options={"url": "rtsp://192.168.1.100"},
        runtime_options={},
    ))
api.start_analyzing(stream_config.id)

# Get results
analysis_results = api.get_latest_zone_statuses()

# Build brainframe-api wheel

poetry build

The output will be in dist/. Check the README format if it is updated,

pip install readme-renderer
python -m readme_renderer README.rst

Installation

The BrainFrame Python API is available on PyPI and can be installed with pip. Install the version of the library that matches the version of BrainFrame that you are using.

pip3 install brainframe-api

Or local build,

pip3 install dist/{file name.whl}

Documentation

pip install sphinx sphinx-rtd-theme
cd docs
make html

Read the generated docs,

firefox _build/html/index.html

Documentation for this library is available on ReadTheDocs.

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

brainframe_api-0.30.5.tar.gz (29.4 kB view details)

Uploaded Source

Built Distribution

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

brainframe_api-0.30.5-py3-none-any.whl (45.6 kB view details)

Uploaded Python 3

File details

Details for the file brainframe_api-0.30.5.tar.gz.

File metadata

  • Download URL: brainframe_api-0.30.5.tar.gz
  • Upload date:
  • Size: 29.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for brainframe_api-0.30.5.tar.gz
Algorithm Hash digest
SHA256 c8adebd56e3a2e3ce2ae1df76caefba1c4894d2fdf866ce1ad1d3ff1ccd07490
MD5 87fb38bfaf0de4d930b1bd53b59448e0
BLAKE2b-256 1195d3f45620297603b84538b33be35194f2bc8f909038ecaa702e3185373696

See more details on using hashes here.

File details

Details for the file brainframe_api-0.30.5-py3-none-any.whl.

File metadata

File hashes

Hashes for brainframe_api-0.30.5-py3-none-any.whl
Algorithm Hash digest
SHA256 336033a992cdec3f90dc9e47e13d2393b296cb69846cd8b97336e45f8d34b5ac
MD5 dc7b783cc5f019ce1ea2a5b8e5ec3e76
BLAKE2b-256 24c3efe49bdf1e32f25b1c186133c7f81bf4510614c2567baf671e91cd26c3e2

See more details on using hashes here.

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