artificialbrains-sdk 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

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.
ab_sdk/client.py CHANGED
@@ -13,7 +13,7 @@ Usage example::
13
13
 
14
14
  from ab_sdk import ABClient
15
15
 
16
- client = ABClient("https://brains.example.com/api", api_key="your_key")
16
+ client = ABClient("https://app.artificialbrains.ai/api", api_key="your_key")
17
17
  run = client.start("my_project")
18
18
  # ... attach sensors, run loop ...
19
19
  client.stop("my_project")
@@ -52,8 +52,7 @@ class ABClient:
52
52
 
53
53
  Base URL:
54
54
  - Provide either:
55
- * https://artificialbrains.app/api
56
- * http://localhost:3000/api
55
+ * https://app.artificialbrains.ai/api
57
56
  If you pass a host without `/api`, the client will append `/api` automatically.
58
57
  """
59
58
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: artificialbrains_sdk
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: ArtificialBrains Python SDK
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: Other/Proprietary License
@@ -34,11 +34,9 @@ protocol.
34
34
  sensor data
35
35
  - **Generic spike decoders** that convert brain output spikes into
36
36
  actuator deltas using flexible mapping rules and decoding schemes
37
- commands; includes a ready to use bipolar split decoder
38
- - **Deviation and reward plugins** for computing error signals and
39
- global/per‑layer rewards
37
+ commands; includes four ready to use decoders
40
38
  - **Feedback error generator** to build correction spikes from
41
- deviations
39
+ deviations (for sensory-motor feedback)
42
40
  - **Reward modulation** helper mirroring biological-brains behaviour around rewards for learning rules
43
41
 
44
42
  The SDK abstracts away the networking details and allows you to
@@ -49,7 +47,7 @@ focus on your controller and learning logic.
49
47
  ### Install from PyPI (recommended)
50
48
 
51
49
  ```bash
52
- pip install artificialbrains_sdk
50
+ pip install artificialbrains-sdk
53
51
  ```
54
52
 
55
53
  This installs the official, versioned ArtificialBrains Python SDK.
@@ -69,7 +67,7 @@ pip install git+https://github.com/artificial-brains-inc/artificial_brains_sdk_p
69
67
 
70
68
  ### Requirements
71
69
 
72
- This SDK requires Python **3.8** or newer. It depends on the
70
+ This SDK requires Python **3.12** or newer. It depends on the
73
71
  following third party libraries:
74
72
 
75
73
  - [`python‑socketio` ≥ 5.16.0](https://pypi.org/project/python-socketio/), released on
@@ -102,12 +100,25 @@ The typical workflow when using this SDK is:
102
100
 
103
101
  ```python
104
102
  from ab_sdk import ABClient
105
- client = ABClient("https://artificialbrains.app/api/", api_key="my_secret")
103
+ client = ABClient("https://app.artificialbrains.ai/api/", api_key="my_secret")
104
+ client.sync_policies(PROJECT_ID, policies_dir="policies")
106
105
 
107
106
  # start a run for project 'project_id' -- you'll find it in your project.
108
107
  run = client.start("rproject_id")
109
108
  ```
110
109
 
110
+ An .env file for the SDK would need the following information:
111
+ ``` python
112
+ # Copy this file to `.env` and fill in your own values
113
+ # API key for the Artificial Brains service
114
+ API_KEY=YOUR_API_KEY
115
+ # Project identifier to start a run (the backend expects a numeric or string ID) Genesis: 691cb6bc14e402b5ee225c21
116
+ PROJECT_ID=YOUR_PROJECT_ID
117
+ # Your namespace and URL (leave them as they are unless you have an assigned environments)
118
+ SOCKET_NAMESPACE=/ab
119
+ AB_BASE_URL=https://app.artificialbrains.ai/api
120
+ ```
121
+
111
122
  2. Attach sensor providers and start streaming inputs:
112
123
 
113
124
  ```python
@@ -221,10 +232,10 @@ The decoder produces **per-timestep actuator deltas**, leaving all
221
232
  integration, physics, and control semantics to the user’s controller.
222
233
 
223
234
 
224
- 4. (Optional) Sync the project contract and scaffold learning policies:
235
+ 4. (Optional but recommended) Sync the project contract and scaffold learning policies, before initialization:
225
236
 
226
237
  ```python
227
- client.sync_policies("robot_arm", policies_dir="policies")
238
+ client.sync_policies(PROJECT_ID, policies_dir="policies")
228
239
  ```
229
240
 
230
241
  This creates reward and deviation policy files that can be customized
@@ -1,5 +1,5 @@
1
1
  ab_sdk/__init__.py,sha256=tYSMwbFzqsiZ7Bp7mYy2kQ0rX9I1NwM6wS1hEGYuze4,1831
2
- ab_sdk/client.py,sha256=DDpJSAZOuoQ9wc_7cnM6-_u0Q5B3YdriDfgUD3w8AHk,10174
2
+ ab_sdk/client.py,sha256=TvANQpuEgjDYn51tIcXtGijHrqFUVXKPGXjKMRbWflc,10144
3
3
  ab_sdk/contract_scaffold.py,sha256=4zcsWhd9axxMu--FZ7U8B8u4QLUwluifyvqac2apDno,8930
4
4
  ab_sdk/endpoints.py,sha256=yc4h_E8vQA9TmWF0sW2GprgE0QnS3eBetH13ogeuw4E,2102
5
5
  ab_sdk/input_streamer.py,sha256=fRPlBimaTDBsm1gz9cdoYanVbmwYTBXSyI9IrXslXiM,6847
@@ -9,7 +9,7 @@ ab_sdk/plugins/__init__.py,sha256=veHfKqvymY8YPN9HF4E1S4pwRUcVVJHDAyBZptbLNlA,18
9
9
  ab_sdk/plugins/decoder.py,sha256=vHAubiAPOaOg3J006TLjn4qAoLIu2Lz2D2kjz421odc,10148
10
10
  ab_sdk/plugins/deviation.py,sha256=QLKOqOSa9HIj3Z3bO6oR79wY1Lni_P-j3GAGM7UYKVs,2019
11
11
  ab_sdk/plugins/reward.py,sha256=E5IsV29N6juyfIQ7ZksDa8JSxAAbVflaJOtLplilAD4,1796
12
- artificialbrains_sdk-0.1.0.dist-info/METADATA,sha256=WjkBvIZfbl1NmfHrBHfr_RFQLUbqrCRQDgAj76RLoqU,11788
13
- artificialbrains_sdk-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
14
- artificialbrains_sdk-0.1.0.dist-info/top_level.txt,sha256=Ttsz2oF0qRh68OI9w3mu_LKkv2I_YvOWr3kudSpckpM,7
15
- artificialbrains_sdk-0.1.0.dist-info/RECORD,,
12
+ artificialbrains_sdk-0.1.2.dist-info/METADATA,sha256=kBo5QySU83Hxgv6JeJriRWQAb0aoF75OOhM3FHMOo0o,12338
13
+ artificialbrains_sdk-0.1.2.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
14
+ artificialbrains_sdk-0.1.2.dist-info/top_level.txt,sha256=Ttsz2oF0qRh68OI9w3mu_LKkv2I_YvOWr3kudSpckpM,7
15
+ artificialbrains_sdk-0.1.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5