aidlabsdk 2.0.1__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.
- aidlabsdk-2.0.1/LICENSE.md +17 -0
- aidlabsdk-2.0.1/MANIFEST.in +4 -0
- aidlabsdk-2.0.1/PKG-INFO +38 -0
- aidlabsdk-2.0.1/README.md +1 -0
- aidlabsdk-2.0.1/aidlab/__init__.py +12 -0
- aidlabsdk-2.0.1/aidlab/activity_type.py +25 -0
- aidlabsdk-2.0.1/aidlab/aidlab_manager.py +45 -0
- aidlabsdk-2.0.1/aidlab/aidlabsdk-linux-gnu.so +0 -0
- aidlabsdk-2.0.1/aidlab/aidlabsdk-linux-gnueabihf.so +0 -0
- aidlabsdk-2.0.1/aidlab/aidlabsdk.dll +0 -0
- aidlabsdk-2.0.1/aidlab/aidlabsdk.dylib +0 -0
- aidlabsdk-2.0.1/aidlab/body_position.py +23 -0
- aidlabsdk-2.0.1/aidlab/data_type.py +29 -0
- aidlabsdk-2.0.1/aidlab/device.py +1115 -0
- aidlabsdk-2.0.1/aidlab/device_delegate.py +386 -0
- aidlabsdk-2.0.1/aidlab/wear_state.py +16 -0
- aidlabsdk-2.0.1/aidlabsdk.egg-info/PKG-INFO +38 -0
- aidlabsdk-2.0.1/aidlabsdk.egg-info/SOURCES.txt +21 -0
- aidlabsdk-2.0.1/aidlabsdk.egg-info/dependency_links.txt +1 -0
- aidlabsdk-2.0.1/aidlabsdk.egg-info/requires.txt +2 -0
- aidlabsdk-2.0.1/aidlabsdk.egg-info/top_level.txt +1 -0
- aidlabsdk-2.0.1/setup.cfg +4 -0
- aidlabsdk-2.0.1/setup.py +33 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
Copyright (c) 2016-2024 Aidlab
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
The above copyright notice and this permission notice shall be included in all
|
|
10
|
+
copies or substantial portions of the Software.
|
|
11
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
12
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
13
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
14
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
15
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
16
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
17
|
+
SOFTWARE.
|
aidlabsdk-2.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: aidlabsdk
|
|
3
|
+
Version: 2.0.1
|
|
4
|
+
Summary: Comprehensive SDK for integrating Aidlab's and Aidmed One's biofeedback and biosignal processing functionalities into your applications.
|
|
5
|
+
Home-page: https://www.aidlab.com
|
|
6
|
+
Author: Aidlab
|
|
7
|
+
Author-email: contact@aidlab.com
|
|
8
|
+
License: MIT License
|
|
9
|
+
Copyright (c) 2016-2024 Aidlab
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
25
|
+
|
|
26
|
+
Keywords: biofeedback,aidlab,aidmed,wearable technology,fitness,data analysis,healthcare,biomedical,chest strap,sdk,signals,biosignals,heart rate,ecg
|
|
27
|
+
Platform: UNKNOWN
|
|
28
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
29
|
+
Classifier: Intended Audience :: Developers
|
|
30
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
31
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
+
Classifier: Programming Language :: Python :: 3
|
|
33
|
+
Requires-Python: >=3.9
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
License-File: LICENSE.md
|
|
36
|
+
|
|
37
|
+
Aidlab SDK simplifies the communication process with Aidlab and Aidmed One. The SDK also provides algorithms to manipulate received data so you don’t have to reinvent the wheel.
|
|
38
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Aidlab SDK simplifies the communication process with Aidlab and Aidmed One. The SDK also provides algorithms to manipulate received data so you don’t have to reinvent the wheel.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Aidlab Python SDK
|
|
3
|
+
"""
|
|
4
|
+
from .aidlab_manager import AidlabManager
|
|
5
|
+
from .data_type import DataType
|
|
6
|
+
from .device import Device
|
|
7
|
+
from .device_delegate import DeviceDelegate
|
|
8
|
+
from .wear_state import WearState
|
|
9
|
+
from .body_position import BodyPosition
|
|
10
|
+
from .activity_type import ActivityType
|
|
11
|
+
|
|
12
|
+
__all__ = ["AidlabManager", "Device", "DeviceDelegate", "DataType", "WearState", "BodyPosition", "ActivityType"]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Created by Jakub Domaszewicz on 16.03.2024.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from enum import IntEnum
|
|
6
|
+
|
|
7
|
+
class ActivityType(IntEnum):
|
|
8
|
+
"""
|
|
9
|
+
Enumerates the possible types of activities that can be recognized by the device.
|
|
10
|
+
|
|
11
|
+
Attributes:
|
|
12
|
+
UNKNOWN (0): The activity is unknown or not recognized.
|
|
13
|
+
AUTOMOTIVE (1): The user is in a vehicle, such as a car, bus, or train.
|
|
14
|
+
WALKING (2): The user is walking.
|
|
15
|
+
RUNNING (4): The user is running.
|
|
16
|
+
CYCLING (8): The user is cycling.
|
|
17
|
+
STILL (16): The user is still, i.e. not moving.
|
|
18
|
+
|
|
19
|
+
"""
|
|
20
|
+
UNKNOWN = 0
|
|
21
|
+
AUTOMOTIVE = 1
|
|
22
|
+
WALKING = 2
|
|
23
|
+
RUNNING = 4
|
|
24
|
+
CYCLING = 8
|
|
25
|
+
STILL = 16
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Part of the Aidlab Python SDK, providing the core functionality for scanning compatible devices.
|
|
3
|
+
|
|
4
|
+
To customise logging, configure the standard Python logging system in your
|
|
5
|
+
application, for example:
|
|
6
|
+
|
|
7
|
+
logging.getLogger("aidlab.aidlab_manager").setLevel(logging.INFO)
|
|
8
|
+
|
|
9
|
+
Created by Szymon Gesicki on 09.05.2020.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import logging
|
|
13
|
+
from bleak import BleakScanner
|
|
14
|
+
from .device import Device
|
|
15
|
+
|
|
16
|
+
logger = logging.getLogger(__name__)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class AidlabManager:
|
|
20
|
+
"""
|
|
21
|
+
The central class of the Aidlab SDK for scanning compatible devices.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
async def scan(self, timeout: int = 10) -> list[Device]:
|
|
25
|
+
"""
|
|
26
|
+
Scans for compatible devices.
|
|
27
|
+
|
|
28
|
+
:param timeout: The time in seconds to scan for devices.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
logger.info("Scanning for devices (timeout: %d seconds)...", timeout)
|
|
32
|
+
|
|
33
|
+
devices = await BleakScanner.discover(timeout)
|
|
34
|
+
|
|
35
|
+
# Container for compatible MAC addresses
|
|
36
|
+
compatible_devices: list[Device] = []
|
|
37
|
+
|
|
38
|
+
for device in devices:
|
|
39
|
+
# Name "Aidlab" is applicable for both Aidlab and Aidmed One
|
|
40
|
+
if (device.name == "Aidlab 2" or device.name == "Aidlab") and device.address:
|
|
41
|
+
compatible_devices.append(Device(device))
|
|
42
|
+
|
|
43
|
+
logger.info("Finished scanning. Found %d devices.", len(compatible_devices))
|
|
44
|
+
|
|
45
|
+
return compatible_devices
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Created by Jakub Domaszewicz on 17.12.2023.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from enum import IntEnum
|
|
6
|
+
|
|
7
|
+
class BodyPosition(IntEnum):
|
|
8
|
+
"""
|
|
9
|
+
Enumerates the possible positions of a body when lying on a bed with a device.
|
|
10
|
+
Each value represents a specific orientation of the body relative to the bed.
|
|
11
|
+
|
|
12
|
+
Attributes:
|
|
13
|
+
UNKNOWN (0): The body's position is unknown or not recognized.
|
|
14
|
+
PRONE (1): The body is lying face down on its stomach.
|
|
15
|
+
SUPINE (2): The body is lying face up on its back.
|
|
16
|
+
LEFT_SIDE (3): The body is lying on its left side.
|
|
17
|
+
RIGHT_SIDE (4): The body is lying on its right side.
|
|
18
|
+
"""
|
|
19
|
+
UNKNOWN = 0
|
|
20
|
+
PRONE = 1
|
|
21
|
+
SUPINE = 2
|
|
22
|
+
LEFT_SIDE = 3
|
|
23
|
+
RIGHT_SIDE = 4
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Created by Szymon Gesicki on 07.11.2021.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from enum import IntEnum
|
|
6
|
+
|
|
7
|
+
class DataType(IntEnum):
|
|
8
|
+
"""
|
|
9
|
+
Data types that can be received from Aidlab and Aidmed One.
|
|
10
|
+
See the documentation to learn more about each data type.
|
|
11
|
+
"""
|
|
12
|
+
ECG = 0
|
|
13
|
+
RESPIRATION = 1
|
|
14
|
+
SKIN_TEMPERATURE = 2
|
|
15
|
+
MOTION = 3
|
|
16
|
+
# BATTERY = 4 # Enabled by default since SDK 1.6.0
|
|
17
|
+
ACTIVITY = 5
|
|
18
|
+
ORIENTATION = 6
|
|
19
|
+
STEPS = 7
|
|
20
|
+
HEART_RATE = 8
|
|
21
|
+
# HEALTH_THERMOMETER = 9 # No longer in use. Use SKIN_TEMPERATURE instead.
|
|
22
|
+
SOUND_VOLUME = 10
|
|
23
|
+
RR = 11
|
|
24
|
+
PRESSURE = 12 # Supported since Firmware 3.0.0. No longer available as characteristic.
|
|
25
|
+
SOUND_FEATURES = 13
|
|
26
|
+
RESPIRATION_RATE = 14
|
|
27
|
+
BODY_POSITION = 15
|
|
28
|
+
EDA = 16
|
|
29
|
+
GPS = 17
|