BRAVOClient 0.1.2__tar.gz → 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,158 @@
1
+ Metadata-Version: 2.4
2
+ Name: BRAVOClient
3
+ Version: 0.1.4
4
+ Summary: The Python API Toolkit for interacting with the Brain Recording Analysis and Visualization Online (BRAVO) Platform
5
+ Author-email: Jackson Cagle <jackson.cagle@neurology.ufl.edu>
6
+ Project-URL: Homepage, https://github.com/Fixel-Institute/BRAVO
7
+ Project-URL: Bug Tracker, https://github.com/Fixel-Institute/BRAVO/issues
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: requests>=2.28.0
15
+ Requires-Dist: zstandard>=0.25.0
16
+ Requires-Dist: numpy>=2.5.0
17
+ Requires-Dist: scipy>=1.18.0
18
+ Dynamic: license-file
19
+
20
+ # BRAVOClient
21
+
22
+ Python and MATLAB clients for the Brain Recording Analysis and Visualization Online (BRAVO) platform.
23
+
24
+ BRAVOClient provides a convenient interface for interacting with a BRAVO server from Python and MATLAB. It exposes a `BRAVOPlatformRequest` client for querying participant and study information, retrieving neural time-series and analysis data, uploading recordings, managing surveys, and accessing platform configuration defaults. The project also includes a MATLAB API client implementation for equivalent access to the same BRAVO platform services.
25
+
26
+ ## Overview
27
+
28
+ The BRAVO platform is designed for the storage, review, and analysis of brain-recording data, participant metadata, therapeutic histories, and signal-processing outputs. This SDK wraps the BRAVO REST API so that researchers and developers can programmatically access the platform without building raw HTTP requests by hand. It is available in both Python and MATLAB client implementations for cross-language research workflows.
29
+
30
+ The package includes:
31
+
32
+ - user and participant profile queries
33
+ - study creation and participant assignment
34
+ - time-series and neural activity analysis access
35
+ - therapeutic effect and chronic data queries
36
+ - survey form management and response submission
37
+ - data uploads for MAT and Medtronic JSON files
38
+ - built-in default processing configuration presets
39
+
40
+ ## Installation
41
+
42
+ ### Python
43
+
44
+ Install from PyPI:
45
+
46
+ ```bash
47
+ pip install BRAVOClient
48
+ ```
49
+
50
+ Or install directly from this repository:
51
+
52
+ ```bash
53
+ git clone https://github.com/JCagle95/BRAVOPlatformAPI
54
+ cd BRAVOPlatformAPI
55
+ pip install .
56
+ ```
57
+
58
+ ### MATLAB
59
+
60
+ To use the MATLAB client, add the `matlab` directory to your MATLAB path:
61
+
62
+ ```matlab
63
+ addpath('path/to/BRAVOPlatformAPI/matlab');
64
+ ```
65
+
66
+ Then instantiate the client:
67
+
68
+ ```matlab
69
+ requester = BRAVOPlatformRequest('YOUR_API_KEY', 'http://localhost:27286');
70
+ profile = requester.GetUserInfo();
71
+ ```
72
+
73
+ ## Requirements
74
+
75
+ ### Python
76
+
77
+ - Python 3.8+
78
+ - `requests`
79
+ - `numpy`
80
+ - `zstandard`
81
+
82
+ ### MATLAB
83
+
84
+ - MATLAB R2020b or later
85
+ - Network access to the BRAVO server
86
+ - Valid BRAVO API key
87
+
88
+ ## Quick Start
89
+
90
+ ```python
91
+ from BRAVOClient import BRAVOPlatformRequest, DefaultConfigurations
92
+
93
+ client = BRAVOPlatformRequest(
94
+ api_key="YOUR_API_KEY",
95
+ server="http://localhost:27286",
96
+ )
97
+
98
+ # Fetch the authenticated user profile
99
+ profile = client.GetUserInfo()
100
+ print(profile)
101
+
102
+ # Query participants
103
+ Participants = client.QueryParticipants()
104
+ Participant = [participant for participant in Participants if participant["Name"] == "Demo Patient"][0]
105
+
106
+ ```
107
+
108
+ The constructor automatically validates the API key by requesting profile information from the BRAVO server.
109
+
110
+ ## Querying Time-Series Analysis
111
+
112
+ The client includes default processing configuration presets for common analysis workflows:
113
+
114
+ ```python
115
+ from BRAVOClient import BRAVOPlatformRequest, DefaultConfigurations
116
+
117
+ client = BRAVOPlatformRequest(api_key="YOUR_API_KEY")
118
+
119
+ Recordings = client.QueryTimeSeriesAnalysis(Participant["Id"])
120
+ Recording = [recording for recording in Recordings if recording["Id"] == "RECORDING_UID"][0]
121
+ Data = client.QueryTimeSeriesAnalysis(Participant["Id"], Recording["Id"])
122
+
123
+ ```
124
+
125
+ This is useful for requesting processed recordings, metadata, and analysis outputs from the platform.
126
+
127
+ ## Common API Features
128
+
129
+ The client exposes methods for the most common BRAVO operations, including:
130
+
131
+ - `GetUserInfo()`
132
+ - `QueryParticipants()`
133
+ - `QueryParticipantInformation(participant_uid)`
134
+ - `UpdateParticipantInformation(participant_uid, info)`
135
+ - `ListAllStudies()`
136
+ - `CreateNewStudy(study_name)`
137
+ - `AddParticipantToStudy(study_id, participant_uid)`
138
+ - `QueryTherapyHistory(participant_uid)`
139
+ - `QueryTimeSeriesAnalysis(participant_uid, recording_uid=None, config=None, refresh=False)`
140
+ - `QueryNeuralActivitySnapshot(participant_uid, config=None)`
141
+ - `QuerySurveyForms(form_link=None, version=None)`
142
+ - `CreateSurveyForm(institute, form_name)`
143
+ - `SubmitSurveyResponse(form_uid, version, responder_code, result, date=None)`
144
+ - `UploadMATFile(participant, file, metadata={})`
145
+ - `UploadMedtronicJSON(participant, file, metadata={})`
146
+
147
+ ## License
148
+
149
+ This project is distributed under the MIT License.
150
+
151
+ ## Project URL
152
+
153
+ - Homepage: https://github.com/Fixel-Institute/BRAVO
154
+ - Issue Tracker: https://github.com/Fixel-Institute/BRAVO/issues
155
+
156
+ ## Support
157
+
158
+ If you are using this client against a BRAVO deployment, make sure the server is reachable from your environment and that your API key is valid for the target instance.
@@ -0,0 +1,139 @@
1
+ # BRAVOClient
2
+
3
+ Python and MATLAB clients for the Brain Recording Analysis and Visualization Online (BRAVO) platform.
4
+
5
+ BRAVOClient provides a convenient interface for interacting with a BRAVO server from Python and MATLAB. It exposes a `BRAVOPlatformRequest` client for querying participant and study information, retrieving neural time-series and analysis data, uploading recordings, managing surveys, and accessing platform configuration defaults. The project also includes a MATLAB API client implementation for equivalent access to the same BRAVO platform services.
6
+
7
+ ## Overview
8
+
9
+ The BRAVO platform is designed for the storage, review, and analysis of brain-recording data, participant metadata, therapeutic histories, and signal-processing outputs. This SDK wraps the BRAVO REST API so that researchers and developers can programmatically access the platform without building raw HTTP requests by hand. It is available in both Python and MATLAB client implementations for cross-language research workflows.
10
+
11
+ The package includes:
12
+
13
+ - user and participant profile queries
14
+ - study creation and participant assignment
15
+ - time-series and neural activity analysis access
16
+ - therapeutic effect and chronic data queries
17
+ - survey form management and response submission
18
+ - data uploads for MAT and Medtronic JSON files
19
+ - built-in default processing configuration presets
20
+
21
+ ## Installation
22
+
23
+ ### Python
24
+
25
+ Install from PyPI:
26
+
27
+ ```bash
28
+ pip install BRAVOClient
29
+ ```
30
+
31
+ Or install directly from this repository:
32
+
33
+ ```bash
34
+ git clone https://github.com/JCagle95/BRAVOPlatformAPI
35
+ cd BRAVOPlatformAPI
36
+ pip install .
37
+ ```
38
+
39
+ ### MATLAB
40
+
41
+ To use the MATLAB client, add the `matlab` directory to your MATLAB path:
42
+
43
+ ```matlab
44
+ addpath('path/to/BRAVOPlatformAPI/matlab');
45
+ ```
46
+
47
+ Then instantiate the client:
48
+
49
+ ```matlab
50
+ requester = BRAVOPlatformRequest('YOUR_API_KEY', 'http://localhost:27286');
51
+ profile = requester.GetUserInfo();
52
+ ```
53
+
54
+ ## Requirements
55
+
56
+ ### Python
57
+
58
+ - Python 3.8+
59
+ - `requests`
60
+ - `numpy`
61
+ - `zstandard`
62
+
63
+ ### MATLAB
64
+
65
+ - MATLAB R2020b or later
66
+ - Network access to the BRAVO server
67
+ - Valid BRAVO API key
68
+
69
+ ## Quick Start
70
+
71
+ ```python
72
+ from BRAVOClient import BRAVOPlatformRequest, DefaultConfigurations
73
+
74
+ client = BRAVOPlatformRequest(
75
+ api_key="YOUR_API_KEY",
76
+ server="http://localhost:27286",
77
+ )
78
+
79
+ # Fetch the authenticated user profile
80
+ profile = client.GetUserInfo()
81
+ print(profile)
82
+
83
+ # Query participants
84
+ Participants = client.QueryParticipants()
85
+ Participant = [participant for participant in Participants if participant["Name"] == "Demo Patient"][0]
86
+
87
+ ```
88
+
89
+ The constructor automatically validates the API key by requesting profile information from the BRAVO server.
90
+
91
+ ## Querying Time-Series Analysis
92
+
93
+ The client includes default processing configuration presets for common analysis workflows:
94
+
95
+ ```python
96
+ from BRAVOClient import BRAVOPlatformRequest, DefaultConfigurations
97
+
98
+ client = BRAVOPlatformRequest(api_key="YOUR_API_KEY")
99
+
100
+ Recordings = client.QueryTimeSeriesAnalysis(Participant["Id"])
101
+ Recording = [recording for recording in Recordings if recording["Id"] == "RECORDING_UID"][0]
102
+ Data = client.QueryTimeSeriesAnalysis(Participant["Id"], Recording["Id"])
103
+
104
+ ```
105
+
106
+ This is useful for requesting processed recordings, metadata, and analysis outputs from the platform.
107
+
108
+ ## Common API Features
109
+
110
+ The client exposes methods for the most common BRAVO operations, including:
111
+
112
+ - `GetUserInfo()`
113
+ - `QueryParticipants()`
114
+ - `QueryParticipantInformation(participant_uid)`
115
+ - `UpdateParticipantInformation(participant_uid, info)`
116
+ - `ListAllStudies()`
117
+ - `CreateNewStudy(study_name)`
118
+ - `AddParticipantToStudy(study_id, participant_uid)`
119
+ - `QueryTherapyHistory(participant_uid)`
120
+ - `QueryTimeSeriesAnalysis(participant_uid, recording_uid=None, config=None, refresh=False)`
121
+ - `QueryNeuralActivitySnapshot(participant_uid, config=None)`
122
+ - `QuerySurveyForms(form_link=None, version=None)`
123
+ - `CreateSurveyForm(institute, form_name)`
124
+ - `SubmitSurveyResponse(form_uid, version, responder_code, result, date=None)`
125
+ - `UploadMATFile(participant, file, metadata={})`
126
+ - `UploadMedtronicJSON(participant, file, metadata={})`
127
+
128
+ ## License
129
+
130
+ This project is distributed under the MIT License.
131
+
132
+ ## Project URL
133
+
134
+ - Homepage: https://github.com/Fixel-Institute/BRAVO
135
+ - Issue Tracker: https://github.com/Fixel-Institute/BRAVO/issues
136
+
137
+ ## Support
138
+
139
+ If you are using this client against a BRAVO deployment, make sure the server is reachable from your environment and that your API key is valid for the target instance.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "BRAVOClient"
7
- version = "0.1.2"
7
+ version = "0.1.4"
8
8
  authors = [
9
9
  { name="Jackson Cagle", email="jackson.cagle@neurology.ufl.edu" },
10
10
  ]
@@ -19,8 +19,9 @@ classifiers = [
19
19
 
20
20
  dependencies = [
21
21
  "requests>=2.28.0",
22
- "zstandard==0.25.0",
23
- "numpy==2.5.0",
22
+ "zstandard>=0.25.0",
23
+ "numpy>=2.5.0",
24
+ "scipy>=1.18.0",
24
25
  ]
25
26
 
26
27
  [project.urls]