File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- =====================
21BrainFrame Python API
32=====================
43
@@ -19,6 +18,7 @@ easy interaction with a BrainFrame server.
1918
2019 # Connect to the server
2120 api = BrainFrameAPI(" http://localhost" )
21+
2222 # Create a new IP camera stream
2323 stream_config = api.set_stream_configuration(
2424 bf_codecs.StreamConfiguration(
@@ -28,23 +28,54 @@ easy interaction with a BrainFrame server.
2828 runtime_options = {},
2929 ))
3030 api.start_analyzing(stream_config.id)
31+
3132 # Get results
3233 analysis_results = api.get_latest_zone_statuses()
3334
35+ # Build brainframe-api wheel
36+
37+ .. code-block :: bash
38+
39+ poetry build
40+
41+ The output will be in dist/. Check the README format if it is updated,
42+
43+ .. code-block :: bash
44+
45+ pip install readme-renderer
46+ python -m readme_renderer README.rst
3447
3548 Installation
36- ------------
49+ ============
3750
3851The BrainFrame Python API is available on PyPI and can be installed with pip.
3952Install the version of the library that matches the version of BrainFrame that
40- you are using. For example, if you are using BrainFrame version 0.26.1:
53+ you are using.
4154
4255.. code-block :: bash
4356
4457 pip3 install brainframe-api
4558
59+ Or local build,
60+
61+ .. code-block :: bash
62+
63+ pip3 install dist/{file name.whl}
64+
4665 Documentation
47- -------------
66+ =============
67+
68+ .. code-block :: bash
69+
70+ pip install sphinx sphinx-rtd-theme
71+ cd docs
72+ make html
73+
74+ Read the generated docs,
75+
76+ .. code-block :: bash
77+
78+ firefox _build/html/index.html
4879
4980 Documentation for this library is available on `ReadTheDocs `_.
5081
Original file line number Diff line number Diff line change 1+ # Minimal makefile for Sphinx documentation
2+
3+ # You can set these variables from the command line, and also
4+ # from the environment for the first two.
5+ SPHINXOPTS ?=
6+ SPHINXBUILD ?= sphinx-build
7+ SOURCEDIR = .
8+ BUILDDIR = _build
9+
10+ # Put it first so that "make" without argument is like "make help".
11+ help :
12+ @$(SPHINXBUILD ) -M help " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
13+
14+ .PHONY : help Makefile
15+
16+ # Catch-all target: route all unknown targets to Sphinx using the new
17+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18+ % : Makefile
19+ @$(SPHINXBUILD ) -M $@ " $( SOURCEDIR) " " $( BUILDDIR) " $(SPHINXOPTS ) $(O )
20+
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ API Methods
1212
1313.. automethod :: brainframe.api.BrainFrameAPI.get_capsules
1414
15- .. automethod :: brainframe.api.BrainFrameAPI.set_capsule
15+ .. automethod :: brainframe.api.BrainFrameAPI.load_capsule
1616
17- .. automethod :: brainframe.api.BrainFrameAPI.delete_capsule
17+ .. automethod :: brainframe.api.BrainFrameAPI.upload_and_load_capsule
18+
19+ .. automethod :: brainframe.api.BrainFrameAPI.unload_capsule
1820
1921.. automethod :: brainframe.api.BrainFrameAPI.get_capsule_option_vals
2022
@@ -34,3 +36,4 @@ Data Structures
3436
3537.. _`Introduction to Capsules` :
3638 https://openvisioncapsules.readthedocs.io/en/latest/introduction.html
39+
Original file line number Diff line number Diff line change 5151# Add any paths that contain custom static files (such as style sheets) here,
5252# relative to this directory. They are copied after the builtin static files,
5353# so a file named "default.css" will overwrite the builtin "default.css".
54- html_static_path = ['_static' ]
54+ # html_static_path = ['_static']
5555
5656# Mock out any third-party imports
5757autodoc_mock_imports = ["requests" , "numpy" , "PIL" ]
You can’t perform that action at this time.
0 commit comments