crowdio-sdk 0.3.0__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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CROWDio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.4
2
+ Name: crowdio-sdk
3
+ Version: 0.3.0
4
+ Summary: CROWDio SDK for distributed Python task execution
5
+ Author: CROWDio Team
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://crowdio-21.github.io/Docs/docs/
8
+ Project-URL: Repository, https://github.com/Crowdio-21
9
+ Project-URL: Issues, https://github.com/your-org/CROWDio/issues
10
+ Keywords: distributed-computing,sdk,websocket,checkpointing,mobile-crowd-computing,python,volunteer-computing,edge-computing,task-scheduling,resource-management,data-processing,machine-learning,ai,iot,mobile-devices,cloud-computing,serverless-computing,parallel-computing,high-performance-computing
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: websockets>=12.0
24
+ Provides-Extra: image
25
+ Requires-Dist: Pillow>=10.0.0; extra == "image"
26
+ Dynamic: license-file
27
+
28
+ # CROWDio SDK
29
+
30
+ CROWDio SDK provides client-side tools for submitting distributed Python workloads to a CROWDio foreman.
31
+
32
+ ## Included Packages
33
+
34
+ - `developer_sdk`: public client APIs, decorators, and image utility helpers.
35
+ - `common`: shared protocol and serialization utilities used by the SDK runtime.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install crowdio-sdk
41
+ ```
42
+
43
+ Install optional image processing dependencies:
44
+
45
+ ```bash
46
+ pip install "crowdio-sdk[image]"
47
+ ```
48
+
49
+ ## Quick Start
50
+
51
+ ```python
52
+ import asyncio
53
+ from developer_sdk import crowdio_connect, crowdio_map, crowdio_disconnect
54
+
55
+
56
+ def square(x):
57
+ return x * x
58
+
59
+
60
+ async def main():
61
+ await crowdio_connect("localhost", 9000)
62
+ results = await crowdio_map(square, [1, 2, 3, 4])
63
+ print(results)
64
+ await crowdio_disconnect()
65
+
66
+
67
+ asyncio.run(main())
68
+ ```
69
+
70
+ ## Notes
71
+
72
+ - The package requires a reachable CROWDio foreman endpoint.
73
+ - Image utilities under `developer_sdk.image_utils` require Pillow (install with `[image]` extra).
@@ -0,0 +1,46 @@
1
+ # CROWDio SDK
2
+
3
+ CROWDio SDK provides client-side tools for submitting distributed Python workloads to a CROWDio foreman.
4
+
5
+ ## Included Packages
6
+
7
+ - `developer_sdk`: public client APIs, decorators, and image utility helpers.
8
+ - `common`: shared protocol and serialization utilities used by the SDK runtime.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install crowdio-sdk
14
+ ```
15
+
16
+ Install optional image processing dependencies:
17
+
18
+ ```bash
19
+ pip install "crowdio-sdk[image]"
20
+ ```
21
+
22
+ ## Quick Start
23
+
24
+ ```python
25
+ import asyncio
26
+ from developer_sdk import crowdio_connect, crowdio_map, crowdio_disconnect
27
+
28
+
29
+ def square(x):
30
+ return x * x
31
+
32
+
33
+ async def main():
34
+ await crowdio_connect("localhost", 9000)
35
+ results = await crowdio_map(square, [1, 2, 3, 4])
36
+ print(results)
37
+ await crowdio_disconnect()
38
+
39
+
40
+ asyncio.run(main())
41
+ ```
42
+
43
+ ## Notes
44
+
45
+ - The package requires a reachable CROWDio foreman endpoint.
46
+ - Image utilities under `developer_sdk.image_utils` require Pillow (install with `[image]` extra).
@@ -0,0 +1,68 @@
1
+ """
2
+ Common utilities for CrowdCompute
3
+
4
+ Exports:
5
+ - Protocol messages and types
6
+ - Serialization utilities
7
+ - Worker type detection and code instrumentation for mobile
8
+ """
9
+
10
+ # Protocol exports
11
+ from .protocol import (
12
+ Message,
13
+ MessageType,
14
+ CheckpointType,
15
+ RecoveryStatus,
16
+ create_worker_ready_message,
17
+ create_submit_job_message,
18
+ create_assign_task_message,
19
+ create_assign_task_message_with_metadata,
20
+ create_resume_task_message,
21
+ create_resume_task_message_with_metadata,
22
+ create_task_result_message,
23
+ )
24
+
25
+ # Code instrumentation exports for mobile workers
26
+ from .code_instrumenter import (
27
+ WorkerType,
28
+ detect_worker_capabilities,
29
+ instrument_for_mobile,
30
+ prepare_code_for_mobile_resume,
31
+ generate_mobile_checkpoint_wrapper,
32
+ CheckpointInstrumenter,
33
+ ResumeInstrumenter,
34
+ )
35
+
36
+ # Serialization exports
37
+ from .serializer import (
38
+ serialize_function,
39
+ deserialize_function_for_PC,
40
+ get_runtime_info,
41
+ )
42
+
43
+ __all__ = [
44
+ # Protocol
45
+ "Message",
46
+ "MessageType",
47
+ "CheckpointType",
48
+ "RecoveryStatus",
49
+ "create_worker_ready_message",
50
+ "create_submit_job_message",
51
+ "create_assign_task_message",
52
+ "create_assign_task_message_with_metadata",
53
+ "create_resume_task_message",
54
+ "create_resume_task_message_with_metadata",
55
+ "create_task_result_message",
56
+ # Code instrumentation
57
+ "WorkerType",
58
+ "detect_worker_capabilities",
59
+ "instrument_for_mobile",
60
+ "prepare_code_for_mobile_resume",
61
+ "generate_mobile_checkpoint_wrapper",
62
+ "CheckpointInstrumenter",
63
+ "ResumeInstrumenter",
64
+ # Serialization
65
+ "serialize_function",
66
+ "deserialize_function_for_PC",
67
+ "get_runtime_info",
68
+ ]