latzero 0.1.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.
latzero-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: latzero
3
+ Version: 0.1.0
4
+ Summary: Zero-latency, zero-fuss shared memory for Python — dynamic, encrypted, and insanely fast.
5
+ Home-page: https://github.com/latzero/latzero
6
+ Author: BRAHMAI
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: cryptography
20
+ Requires-Dist: psutil
21
+ Dynamic: author
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: requires-dist
27
+ Dynamic: requires-python
28
+ Dynamic: summary
29
+
30
+ # 🧠 latzero
31
+
32
+ **Tagline:** Zero-latency, zero-fuss shared memory for Python — dynamic, encrypted, and insanely fast.
33
+
34
+ ## 🚀 Overview
35
+
36
+ **latzero** is a Python package designed to make **inter-process communication (IPC)** and **shared-memory data exchange** effortless. Unlike traditional shared memory systems that require fixed buffer sizes and manual serialization, latzero enables developers to:
37
+
38
+ - Create **dynamic shared-memory pools** accessible by multiple processes or clients.
39
+ - Pass **any pickleable object** directly — no manual encoding/decoding.
40
+ - Enable **optional encryption + authentication** for secure multi-process collaboration.
41
+
42
+ latzero is ideal for AI workloads, distributed systems, and low-latency microservices that need real-time shared state management.
43
+
44
+ ## 🧩 Core Features
45
+
46
+ | Feature | Description |
47
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
48
+ | **Dynamic Shared Memory Pools** | No predefined memory size. Pools expand and contract dynamically as new data arrives. |
49
+ | **Multi-Client Access** | Multiple processes/clients can connect to the same pool simultaneously and share data in real time. |
50
+ | **Auto Cleanup** | Data can have optional timeouts (`auto_clean=5`), automatically clearing entries after specified seconds. |
51
+ | **Encryption & Authentication** | Pools can be protected with passwords. If `encryption=True`, the password becomes the encryption key. |
52
+ | **Data-Type Preservation** | Stored data retains its type (`int`, `str`, `dict`, etc.) across clients. |
53
+ | **Self-Destructing Pools** | Pools live only as long as one or more connected processes are active. When all disconnect, the pool is automatically destroyed. |
54
+ | **Pickle-Based Serialization** | Any pickleable Python object can be stored and retrieved seamlessly. |
55
+ | **Event Sync** *(Future)* | Hooks for client events like `on_connect`, `on_disconnect`, `on_update` for real-time sync logic. |
56
+
57
+ ## ⚙️ Installation
58
+
59
+ ```bash
60
+ pip install latzero
61
+ ```
62
+
63
+ ## ⚙️ API Usage
64
+
65
+ ### Pool Creation
66
+
67
+ ```python
68
+ from latzero import SharedMemoryPool
69
+
70
+ pool_manager = SharedMemoryPool()
71
+ pool_manager.create(
72
+ name="myPool",
73
+ auth=True,
74
+ auth_key="super_secret",
75
+ encryption=True
76
+ )
77
+ ```
78
+
79
+ ### Connecting to a Pool
80
+
81
+ ```python
82
+ ipc = pool_manager.connect(
83
+ name="myPool",
84
+ auth_key="super_secret"
85
+ )
86
+ ```
87
+
88
+ ### Set and Get Operations
89
+
90
+ ```python
91
+ ipc.set("key", value, auto_clean=5)
92
+ result = ipc.get("key")
93
+ ```
94
+
95
+ ### Type-Safe Example
96
+
97
+ ```python
98
+ ipc.set("number", 42)
99
+ ipc.set("text", "yo bro")
100
+ ipc.set("data", {"a": 1, "b": 2})
101
+
102
+ print(ipc.get("number")) # 42 (int)
103
+ print(ipc.get("text")) # "yo bro" (str)
104
+ print(ipc.get("data")) # {"a": 1, "b": 2} (dict)
105
+ ```
106
+
107
+ ## 🛠️ System Architecture
108
+
109
+ ### Core Components
110
+
111
+ 1. **Memory Controller** - Manages shared memory segments dynamically.
112
+ 2. **Pool Registry** - Tracks all active pools via metadata.
113
+ 3. **Encryption Layer** - AES-GCM encryption for secure reads/writes.
114
+ 4. **Data Layer (Pickle Serializer)** - Automatic serialization with zlib compression.
115
+ 5. **IPC Protocol** - Uses `multiprocessing.shared_memory` for communication.
116
+ 6. **Auto-Reclaim Daemon** - Monitors idle pools and clears them when unused.
117
+
118
+ ## 🔒 Security Model
119
+
120
+ | Concern | Mechanism |
121
+ | ------------------- | --------------------------------------------------------------------- |
122
+ | Unauthorized access | Password-based authentication |
123
+ | Data leakage | AES-256 encryption when `encryption=True` |
124
+ | Data tampering | Integrity checked using HMAC |
125
+ | Memory persistence | Pools are ephemeral; memory is released after last client disconnects |
126
+
127
+ ## ⚡ Performance Targets
128
+
129
+ | Metric | Target |
130
+ | ---------------------- | ---------------------------------- |
131
+ | Read latency | < 1ms |
132
+ | Write latency | < 2ms |
133
+ | Max concurrent clients | 128+ |
134
+ | Memory scaling | Dynamic up to available system RAM |
135
+ | Pool cleanup delay | < 100ms post last disconnect |
136
+
137
+ ## Examples
138
+
139
+ Check the `examples/` directory for usage demos:
140
+
141
+ - `simple_pool.py` - Basic pool operations
142
+ - `encrypted_pool.py` - Secure pool with encryption
143
+ - `multi_client_demo.py` - Concurrent multi-client access
144
+
145
+ ## Dependencies
146
+
147
+ - `multiprocessing.shared_memory`
148
+ - `cryptography` (for AES)
149
+ - `pickle`, `zlib`
150
+ - `threading`, `multiprocessing`
151
+ - `psutil` (for process detection)
152
+
153
+ ## 🧭 Roadmap
154
+
155
+ - **Phase 1:** Core shared memory pools + pickle serialization
156
+ - **Phase 2:** Auth + encryption
157
+ - **Phase 3:** Dynamic memory expansion + auto-clean
158
+ - **Phase 4:** Performance optimization + PyPI release
159
+ - **Phase 5:** Real-time event hooks, WebSocket bridges
160
+
161
+ ## 🧃 Use Cases
162
+
163
+ - AI agents sharing memory
164
+ - Game servers syncing states
165
+ - Local caching for microservices
166
+ - High-speed analytics
167
+ - Multi-agent orchestration
168
+
169
+ ## 🧠 TL;DR
170
+
171
+ `latzero` makes **shared-memory IPC as easy as Redis**, without the network overhead. Fast, simple, encrypted, ephemeral — a *zero-latency* memory layer for Python devs.
@@ -0,0 +1,142 @@
1
+ # 🧠 latzero
2
+
3
+ **Tagline:** Zero-latency, zero-fuss shared memory for Python — dynamic, encrypted, and insanely fast.
4
+
5
+ ## 🚀 Overview
6
+
7
+ **latzero** is a Python package designed to make **inter-process communication (IPC)** and **shared-memory data exchange** effortless. Unlike traditional shared memory systems that require fixed buffer sizes and manual serialization, latzero enables developers to:
8
+
9
+ - Create **dynamic shared-memory pools** accessible by multiple processes or clients.
10
+ - Pass **any pickleable object** directly — no manual encoding/decoding.
11
+ - Enable **optional encryption + authentication** for secure multi-process collaboration.
12
+
13
+ latzero is ideal for AI workloads, distributed systems, and low-latency microservices that need real-time shared state management.
14
+
15
+ ## 🧩 Core Features
16
+
17
+ | Feature | Description |
18
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
19
+ | **Dynamic Shared Memory Pools** | No predefined memory size. Pools expand and contract dynamically as new data arrives. |
20
+ | **Multi-Client Access** | Multiple processes/clients can connect to the same pool simultaneously and share data in real time. |
21
+ | **Auto Cleanup** | Data can have optional timeouts (`auto_clean=5`), automatically clearing entries after specified seconds. |
22
+ | **Encryption & Authentication** | Pools can be protected with passwords. If `encryption=True`, the password becomes the encryption key. |
23
+ | **Data-Type Preservation** | Stored data retains its type (`int`, `str`, `dict`, etc.) across clients. |
24
+ | **Self-Destructing Pools** | Pools live only as long as one or more connected processes are active. When all disconnect, the pool is automatically destroyed. |
25
+ | **Pickle-Based Serialization** | Any pickleable Python object can be stored and retrieved seamlessly. |
26
+ | **Event Sync** *(Future)* | Hooks for client events like `on_connect`, `on_disconnect`, `on_update` for real-time sync logic. |
27
+
28
+ ## ⚙️ Installation
29
+
30
+ ```bash
31
+ pip install latzero
32
+ ```
33
+
34
+ ## ⚙️ API Usage
35
+
36
+ ### Pool Creation
37
+
38
+ ```python
39
+ from latzero import SharedMemoryPool
40
+
41
+ pool_manager = SharedMemoryPool()
42
+ pool_manager.create(
43
+ name="myPool",
44
+ auth=True,
45
+ auth_key="super_secret",
46
+ encryption=True
47
+ )
48
+ ```
49
+
50
+ ### Connecting to a Pool
51
+
52
+ ```python
53
+ ipc = pool_manager.connect(
54
+ name="myPool",
55
+ auth_key="super_secret"
56
+ )
57
+ ```
58
+
59
+ ### Set and Get Operations
60
+
61
+ ```python
62
+ ipc.set("key", value, auto_clean=5)
63
+ result = ipc.get("key")
64
+ ```
65
+
66
+ ### Type-Safe Example
67
+
68
+ ```python
69
+ ipc.set("number", 42)
70
+ ipc.set("text", "yo bro")
71
+ ipc.set("data", {"a": 1, "b": 2})
72
+
73
+ print(ipc.get("number")) # 42 (int)
74
+ print(ipc.get("text")) # "yo bro" (str)
75
+ print(ipc.get("data")) # {"a": 1, "b": 2} (dict)
76
+ ```
77
+
78
+ ## 🛠️ System Architecture
79
+
80
+ ### Core Components
81
+
82
+ 1. **Memory Controller** - Manages shared memory segments dynamically.
83
+ 2. **Pool Registry** - Tracks all active pools via metadata.
84
+ 3. **Encryption Layer** - AES-GCM encryption for secure reads/writes.
85
+ 4. **Data Layer (Pickle Serializer)** - Automatic serialization with zlib compression.
86
+ 5. **IPC Protocol** - Uses `multiprocessing.shared_memory` for communication.
87
+ 6. **Auto-Reclaim Daemon** - Monitors idle pools and clears them when unused.
88
+
89
+ ## 🔒 Security Model
90
+
91
+ | Concern | Mechanism |
92
+ | ------------------- | --------------------------------------------------------------------- |
93
+ | Unauthorized access | Password-based authentication |
94
+ | Data leakage | AES-256 encryption when `encryption=True` |
95
+ | Data tampering | Integrity checked using HMAC |
96
+ | Memory persistence | Pools are ephemeral; memory is released after last client disconnects |
97
+
98
+ ## ⚡ Performance Targets
99
+
100
+ | Metric | Target |
101
+ | ---------------------- | ---------------------------------- |
102
+ | Read latency | < 1ms |
103
+ | Write latency | < 2ms |
104
+ | Max concurrent clients | 128+ |
105
+ | Memory scaling | Dynamic up to available system RAM |
106
+ | Pool cleanup delay | < 100ms post last disconnect |
107
+
108
+ ## Examples
109
+
110
+ Check the `examples/` directory for usage demos:
111
+
112
+ - `simple_pool.py` - Basic pool operations
113
+ - `encrypted_pool.py` - Secure pool with encryption
114
+ - `multi_client_demo.py` - Concurrent multi-client access
115
+
116
+ ## Dependencies
117
+
118
+ - `multiprocessing.shared_memory`
119
+ - `cryptography` (for AES)
120
+ - `pickle`, `zlib`
121
+ - `threading`, `multiprocessing`
122
+ - `psutil` (for process detection)
123
+
124
+ ## 🧭 Roadmap
125
+
126
+ - **Phase 1:** Core shared memory pools + pickle serialization
127
+ - **Phase 2:** Auth + encryption
128
+ - **Phase 3:** Dynamic memory expansion + auto-clean
129
+ - **Phase 4:** Performance optimization + PyPI release
130
+ - **Phase 5:** Real-time event hooks, WebSocket bridges
131
+
132
+ ## 🧃 Use Cases
133
+
134
+ - AI agents sharing memory
135
+ - Game servers syncing states
136
+ - Local caching for microservices
137
+ - High-speed analytics
138
+ - Multi-agent orchestration
139
+
140
+ ## 🧠 TL;DR
141
+
142
+ `latzero` makes **shared-memory IPC as easy as Redis**, without the network overhead. Fast, simple, encrypted, ephemeral — a *zero-latency* memory layer for Python devs.
@@ -0,0 +1,3 @@
1
+ from .core.pool import SharedMemoryPool
2
+
3
+ __all__ = ['SharedMemoryPool']
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: latzero
3
+ Version: 0.1.0
4
+ Summary: Zero-latency, zero-fuss shared memory for Python — dynamic, encrypted, and insanely fast.
5
+ Home-page: https://github.com/latzero/latzero
6
+ Author: BRAHMAI
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: cryptography
20
+ Requires-Dist: psutil
21
+ Dynamic: author
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: requires-dist
27
+ Dynamic: requires-python
28
+ Dynamic: summary
29
+
30
+ # 🧠 latzero
31
+
32
+ **Tagline:** Zero-latency, zero-fuss shared memory for Python — dynamic, encrypted, and insanely fast.
33
+
34
+ ## 🚀 Overview
35
+
36
+ **latzero** is a Python package designed to make **inter-process communication (IPC)** and **shared-memory data exchange** effortless. Unlike traditional shared memory systems that require fixed buffer sizes and manual serialization, latzero enables developers to:
37
+
38
+ - Create **dynamic shared-memory pools** accessible by multiple processes or clients.
39
+ - Pass **any pickleable object** directly — no manual encoding/decoding.
40
+ - Enable **optional encryption + authentication** for secure multi-process collaboration.
41
+
42
+ latzero is ideal for AI workloads, distributed systems, and low-latency microservices that need real-time shared state management.
43
+
44
+ ## 🧩 Core Features
45
+
46
+ | Feature | Description |
47
+ | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
48
+ | **Dynamic Shared Memory Pools** | No predefined memory size. Pools expand and contract dynamically as new data arrives. |
49
+ | **Multi-Client Access** | Multiple processes/clients can connect to the same pool simultaneously and share data in real time. |
50
+ | **Auto Cleanup** | Data can have optional timeouts (`auto_clean=5`), automatically clearing entries after specified seconds. |
51
+ | **Encryption & Authentication** | Pools can be protected with passwords. If `encryption=True`, the password becomes the encryption key. |
52
+ | **Data-Type Preservation** | Stored data retains its type (`int`, `str`, `dict`, etc.) across clients. |
53
+ | **Self-Destructing Pools** | Pools live only as long as one or more connected processes are active. When all disconnect, the pool is automatically destroyed. |
54
+ | **Pickle-Based Serialization** | Any pickleable Python object can be stored and retrieved seamlessly. |
55
+ | **Event Sync** *(Future)* | Hooks for client events like `on_connect`, `on_disconnect`, `on_update` for real-time sync logic. |
56
+
57
+ ## ⚙️ Installation
58
+
59
+ ```bash
60
+ pip install latzero
61
+ ```
62
+
63
+ ## ⚙️ API Usage
64
+
65
+ ### Pool Creation
66
+
67
+ ```python
68
+ from latzero import SharedMemoryPool
69
+
70
+ pool_manager = SharedMemoryPool()
71
+ pool_manager.create(
72
+ name="myPool",
73
+ auth=True,
74
+ auth_key="super_secret",
75
+ encryption=True
76
+ )
77
+ ```
78
+
79
+ ### Connecting to a Pool
80
+
81
+ ```python
82
+ ipc = pool_manager.connect(
83
+ name="myPool",
84
+ auth_key="super_secret"
85
+ )
86
+ ```
87
+
88
+ ### Set and Get Operations
89
+
90
+ ```python
91
+ ipc.set("key", value, auto_clean=5)
92
+ result = ipc.get("key")
93
+ ```
94
+
95
+ ### Type-Safe Example
96
+
97
+ ```python
98
+ ipc.set("number", 42)
99
+ ipc.set("text", "yo bro")
100
+ ipc.set("data", {"a": 1, "b": 2})
101
+
102
+ print(ipc.get("number")) # 42 (int)
103
+ print(ipc.get("text")) # "yo bro" (str)
104
+ print(ipc.get("data")) # {"a": 1, "b": 2} (dict)
105
+ ```
106
+
107
+ ## 🛠️ System Architecture
108
+
109
+ ### Core Components
110
+
111
+ 1. **Memory Controller** - Manages shared memory segments dynamically.
112
+ 2. **Pool Registry** - Tracks all active pools via metadata.
113
+ 3. **Encryption Layer** - AES-GCM encryption for secure reads/writes.
114
+ 4. **Data Layer (Pickle Serializer)** - Automatic serialization with zlib compression.
115
+ 5. **IPC Protocol** - Uses `multiprocessing.shared_memory` for communication.
116
+ 6. **Auto-Reclaim Daemon** - Monitors idle pools and clears them when unused.
117
+
118
+ ## 🔒 Security Model
119
+
120
+ | Concern | Mechanism |
121
+ | ------------------- | --------------------------------------------------------------------- |
122
+ | Unauthorized access | Password-based authentication |
123
+ | Data leakage | AES-256 encryption when `encryption=True` |
124
+ | Data tampering | Integrity checked using HMAC |
125
+ | Memory persistence | Pools are ephemeral; memory is released after last client disconnects |
126
+
127
+ ## ⚡ Performance Targets
128
+
129
+ | Metric | Target |
130
+ | ---------------------- | ---------------------------------- |
131
+ | Read latency | < 1ms |
132
+ | Write latency | < 2ms |
133
+ | Max concurrent clients | 128+ |
134
+ | Memory scaling | Dynamic up to available system RAM |
135
+ | Pool cleanup delay | < 100ms post last disconnect |
136
+
137
+ ## Examples
138
+
139
+ Check the `examples/` directory for usage demos:
140
+
141
+ - `simple_pool.py` - Basic pool operations
142
+ - `encrypted_pool.py` - Secure pool with encryption
143
+ - `multi_client_demo.py` - Concurrent multi-client access
144
+
145
+ ## Dependencies
146
+
147
+ - `multiprocessing.shared_memory`
148
+ - `cryptography` (for AES)
149
+ - `pickle`, `zlib`
150
+ - `threading`, `multiprocessing`
151
+ - `psutil` (for process detection)
152
+
153
+ ## 🧭 Roadmap
154
+
155
+ - **Phase 1:** Core shared memory pools + pickle serialization
156
+ - **Phase 2:** Auth + encryption
157
+ - **Phase 3:** Dynamic memory expansion + auto-clean
158
+ - **Phase 4:** Performance optimization + PyPI release
159
+ - **Phase 5:** Real-time event hooks, WebSocket bridges
160
+
161
+ ## 🧃 Use Cases
162
+
163
+ - AI agents sharing memory
164
+ - Game servers syncing states
165
+ - Local caching for microservices
166
+ - High-speed analytics
167
+ - Multi-agent orchestration
168
+
169
+ ## 🧠 TL;DR
170
+
171
+ `latzero` makes **shared-memory IPC as easy as Redis**, without the network overhead. Fast, simple, encrypted, ephemeral — a *zero-latency* memory layer for Python devs.
@@ -0,0 +1,8 @@
1
+ README.md
2
+ setup.py
3
+ latzero/__init__.py
4
+ latzero.egg-info/PKG-INFO
5
+ latzero.egg-info/SOURCES.txt
6
+ latzero.egg-info/dependency_links.txt
7
+ latzero.egg-info/requires.txt
8
+ latzero.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ cryptography
2
+ psutil
@@ -0,0 +1 @@
1
+ latzero
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
latzero-0.1.0/setup.py ADDED
@@ -0,0 +1,32 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ setup(
7
+ name="latzero",
8
+ version="0.1.0",
9
+ author="BRAHMAI",
10
+ description="Zero-latency, zero-fuss shared memory for Python — dynamic, encrypted, and insanely fast.",
11
+ long_description=long_description,
12
+ long_description_content_type="text/markdown",
13
+ url="https://github.com/latzero/latzero",
14
+ packages=find_packages(),
15
+ classifiers=[
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.7",
22
+ "Programming Language :: Python :: 3.8",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ ],
27
+ python_requires=">=3.7",
28
+ install_requires=[
29
+ "cryptography",
30
+ "psutil",
31
+ ],
32
+ )