This library is a Python wrapper around the BrainFrame REST API. It allows for easy interaction with a BrainFrame server.
frombrainframe.apiimportBrainFrameAPI, bf_codecs# Connect to the serverapi=BrainFrameAPI("http://localhost")
# Create a new IP camera streamstream_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 resultsanalysis_results=api.get_latest_zone_statuses()# Build brainframe-api wheel
poetry buildThe output will be in dist/. Check the README format if it is updated,
pip install readme-renderer
python -m readme_renderer README.rstThe 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-apiOr local build,
pip3 install dist/{file name.whl}pip install sphinx sphinx-rtd-theme
cd docs
make htmlRead the generated docs,
firefox _build/html/index.htmlDocumentation for this library is available on ReadTheDocs.