Skip to main content

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.

Metadata

Release files for brainframe-api 0.30.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brainframe-api 0.30.5
File Size Uploaded
brainframe_api-0.30.5.tar.gz 29.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for brainframe-api 0.30.5
File Interpreter ABI Platform
brainframe_api-0.30.5-py3-none-any.whl Python 3 none any Details

Total release size: 75.1 kB

Release files / brainframe_api-0.30.5.tar.gz

Download URL brainframe_api-0.30.5.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c8adebd56e3a2e3ce2ae1df76caefba1c4894d2fdf866ce1ad1d3ff1ccd07490
BLAKE2b-256 checksum
How to use checksums
1195d3f45620297603b84538b33be35194f2bc8f909038ecaa702e3185373696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / brainframe_api-0.30.5-py3-none-any.whl

Download URL brainframe_api-0.30.5-py3-none-any.whl
Size 45.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
336033a992cdec3f90dc9e47e13d2393b296cb69846cd8b97336e45f8d34b5ac
BLAKE2b-256 checksum
How to use checksums
24c3efe49bdf1e32f25b1c186133c7f81bf4510614c2567baf671e91cd26c3e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page