swarmauri_geostore_memory 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.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [2025] [Jacob Stewart @ Swarmauri]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ Swarmauri SDK
2
+
3
+ This package is part of the Swarmauri SDK and is distributed under the
4
+ Apache License, Version 2.0. See LICENSE for the license terms.
@@ -0,0 +1,321 @@
1
+ Metadata-Version: 2.4
2
+ Name: swarmauri_geostore_memory
3
+ Version: 0.1.0
4
+ Summary: Reference in-memory geographic point search.
5
+ License-Expression: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
8
+ Keywords: swarmauri,geospatial,radius,nearest
9
+ Author: Jacob Stewart
10
+ Author-email: jacob@swarmauri.com
11
+ Requires-Python: >=3.10,<3.15
12
+ Classifier: Development Status :: 1 - Planning
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Dist: swarmauri_base (>=0.11.1,<0.12)
19
+ Requires-Dist: swarmauri_core (>=0.11.2,<0.12)
20
+ Requires-Dist: swarmauri_metric_haversine (>=0.1.0,<0.2)
21
+ Project-URL: Repository, https://github.com/swarmauri/swarmauri-sdk
22
+ Description-Content-Type: text/markdown
23
+
24
+ # swarmauri_geostore_memory
25
+
26
+ <!-- readme-standards:begin branding -->
27
+ <p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
28
+ <p align="center"><strong>swarmauri_geostore_memory</strong></p>
29
+ <p align="center">Reference in-memory geographic point search.</p>
30
+ <p align="center">
31
+ <a href="https://pypi.org/project/swarmauri_geostore_memory/"><img alt="pypi: swarmauri_geostore_memory unpublished" src="https://img.shields.io/static/v1?label=pypi&amp;message=swarmauri_geostore_memory%20unpublished&amp;labelColor=292421&amp;color=805500"></a>
32
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/pyproject.toml"><img alt="Source version: 0.1.0" src="https://img.shields.io/static/v1?label=Source%20version&amp;message=0.1.0&amp;labelColor=292421&amp;color=994525"></a>
33
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/pyproject.toml"><img alt="Python: &gt;=3.10,&lt;3.15" src="https://img.shields.io/static/v1?label=Python&amp;message=%3E%3D3.10%2C%3C3.15&amp;labelColor=292421&amp;color=994525"></a>
34
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/pyproject.toml"><img alt="Layer: standards" src="https://img.shields.io/static/v1?label=Layer&amp;message=standards&amp;labelColor=292421&amp;color=994525"></a>
35
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&amp;message=active&amp;labelColor=292421&amp;color=24654A"></a>
36
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&amp;message=Apache-2.0&amp;labelColor=292421&amp;color=994525"></a>
37
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&amp;message=attribution&amp;labelColor=292421&amp;color=994525"></a>
38
+ </p>
39
+ <p align="center">
40
+ <a href="https://pypi.org/project/swarmauri_geostore_memory/"><img alt="pypi downloads: swarmauri_geostore_memory: unpublished" src="https://img.shields.io/static/v1?label=pypi%20downloads&amp;message=swarmauri_geostore_memory%3A%20unpublished&amp;labelColor=292421&amp;color=805500"></a>
41
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/README.md"><img alt="README hits: swarmauri_geostore_memory" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/40-standards/swarmauri_geostore_memory/README.md.svg?label=README%20hits&amp;labelColor=292421&amp;color=08704E"></a>
42
+ </p>
43
+ <p align="center">
44
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&amp;message=CI%20gate&amp;labelColor=292421&amp;color=67437E"></a>
45
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&amp;message=example%20source&amp;labelColor=292421&amp;color=67437E"></a>
46
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&amp;message=not%20certified&amp;labelColor=292421&amp;color=805500"></a>
47
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&amp;message=repository%20policy&amp;labelColor=292421&amp;color=67437E"></a>
48
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&amp;message=source%20and%20CI&amp;labelColor=292421&amp;color=67437E"></a>
49
+ </p>
50
+ <p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
51
+ <!-- readme-standards:end branding -->
52
+
53
+ ---
54
+
55
+ ## Overview
56
+
57
+ ### Summary
58
+
59
+ Reference in-memory geographic point search.
60
+
61
+ ### Why This Package
62
+
63
+ `MemoryGeoStore` provides a separately installable implementation for Swarmauri callers.
64
+
65
+ ### When to Use
66
+
67
+ The query prints harbor. Use within_radius for a meter-based inclusive search or within_bbox for a coordinate window.
68
+
69
+ ### Features
70
+
71
+ - Reference in-memory geographic point search.
72
+ - Use `MemoryGeoStore` directly from Python.
73
+
74
+ ### Non-Goals
75
+
76
+ The public surface is the component and its documented options.
77
+
78
+ ---
79
+
80
+ ## Getting Started
81
+
82
+ ### Prerequisites
83
+
84
+ Use Python 3.10 through 3.14. The source example runs in the SDK workspace.
85
+
86
+ ### Installation
87
+
88
+ #### Install with uv
89
+
90
+ <!-- readme-standards:begin installation.uv -->
91
+ `swarmauri_geostore_memory` is not declared published. From the source checkout:
92
+
93
+ ```bash
94
+ uv pip install .
95
+ ```
96
+ <!-- readme-standards:end installation.uv -->
97
+
98
+ #### Install with pip
99
+
100
+ <!-- readme-standards:begin installation.pip -->
101
+ `swarmauri_geostore_memory` is not declared published. From the source checkout:
102
+
103
+ ```bash
104
+ python -m pip install .
105
+ ```
106
+ <!-- readme-standards:end installation.pip -->
107
+
108
+ #### Install with Poetry
109
+
110
+ <!-- readme-standards:begin installation.poetry -->
111
+ `swarmauri_geostore_memory` is not declared published. From a separate Poetry project, replace the path with your checkout:
112
+
113
+ ```bash
114
+ poetry add /path/to/swarmauri_geostore_memory
115
+ ```
116
+ <!-- readme-standards:end installation.poetry -->
117
+
118
+ ### Quick Start
119
+
120
+ #### Example
121
+
122
+ <!-- readme-standards:begin example.quick-start -->
123
+ Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/docs/readme/quick_start.py).
124
+
125
+ ```python
126
+ from swarmauri_core.geo_stores import GeoPoint, GeoRecord
127
+ from swarmauri_geostore_memory import MemoryGeoStore
128
+
129
+ store = MemoryGeoStore()
130
+ store.put(GeoRecord("harbor", GeoPoint(51.5, -0.1)))
131
+ print(store.nearest(GeoPoint(51.5, -0.1), 1)[0].record.id)
132
+ ```
133
+ <!-- readme-standards:end example.quick-start -->
134
+
135
+ #### Expected Result
136
+
137
+ The example demonstrates the documented `swarmauri_geostore_memory` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
138
+
139
+ ---
140
+
141
+ ## Usage
142
+
143
+ ### Common Workflows
144
+
145
+ <!-- readme-standards:begin example.usage -->
146
+ Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/docs/readme/usage.py).
147
+
148
+ ```python
149
+ from swarmauri_core.geo_stores import GeoPoint, GeoRecord
150
+ from swarmauri_geostore_memory import MemoryGeoStore
151
+
152
+ store = MemoryGeoStore()
153
+ store.put(GeoRecord("harbor", GeoPoint(51.5, -0.1)))
154
+ print(store.nearest(GeoPoint(51.5, -0.1), 1)[0].record.id)
155
+ ```
156
+ <!-- readme-standards:end example.usage -->
157
+
158
+ Pass the store to `AgentRunner` to persist a conversation. Use `runner.load(run_id)`
159
+ to read the typed run state.
160
+
161
+ ### Configuration
162
+
163
+ Configure the component at construction. See [the source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/swarmauri_geostore_memory/MemoryGeoStore.py) for supported inputs.
164
+
165
+ ### Error Handling
166
+
167
+ Invalid inputs raise an exception before a result is returned. See the API and package regression tests for concrete cases.
168
+
169
+ ### Best Practices
170
+
171
+ Use the provided example to exercise the component with your configuration before depending on it.
172
+
173
+ ---
174
+
175
+ ## Package Boundary
176
+
177
+ ### What It Owns
178
+
179
+ Reference in-memory geographic point search.
180
+
181
+ ### Public API and Import Surfaces
182
+
183
+ Import `MemoryGeoStore` from `swarmauri_geostore_memory`.
184
+
185
+ ### Entry Points
186
+
187
+ <!-- readme-standards:begin entry-points -->
188
+ - `swarmauri.geo_stores` → `MemoryGeoStore` → `swarmauri_geostore_memory:MemoryGeoStore`
189
+ <!-- readme-standards:end entry-points -->
190
+
191
+ ### Injected Dependencies
192
+
193
+ The package manifest declares the Swarmauri collaborators used by this component.
194
+
195
+ ### Protocol Consumers
196
+
197
+ Applications can construct the component directly using the import shown above.
198
+
199
+ ### Extensions
200
+
201
+ Use the corresponding SDK interface when adding another implementation.
202
+
203
+ ---
204
+
205
+ ## Operations and Readiness
206
+
207
+ ### Operational Requirements
208
+
209
+ Configure the component as shown in the example. Match the lifetime of stored records and injected collaborators to the application.
210
+
211
+ ### Health and Observability
212
+
213
+ Use package tests and inspect exceptions from component calls.
214
+
215
+ ### Security and Resource Limits
216
+
217
+ Supply application-appropriate input sizes and access controls for your use case.
218
+
219
+ ### Compatibility
220
+
221
+ Version 0.1.0 declares Python 3.10 through 3.14.
222
+
223
+ ---
224
+
225
+ ## Verification
226
+
227
+ ### Tests
228
+
229
+ Run `uv run --package swarmauri_geostore_memory pytest` from the package directory.
230
+
231
+ ### Certification Status
232
+
233
+ Planning release.
234
+
235
+ ### Evidence
236
+
237
+ The source examples and package tests document the supported behavior.
238
+
239
+ ---
240
+
241
+ ## FAQ
242
+
243
+ ### Why
244
+
245
+ Reference in-memory geographic point search.
246
+
247
+ ### How
248
+
249
+ Run the source example under Getting Started.
250
+
251
+ ### When
252
+
253
+ Re-run the package tests after changing the backend, distance model, or embedding configuration used by your application.
254
+
255
+ ---
256
+
257
+ ## Documentation and Related Packages
258
+
259
+ ### More Documentation
260
+
261
+ See the [component source](https://github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/40-standards/swarmauri_geostore_memory).
262
+
263
+ ### Related Packages
264
+
265
+ See [swarmauri-core](https://github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/10-interfaces/swarmauri_core) for interfaces and shared types.
266
+
267
+ ### Project Links
268
+
269
+ <!-- readme-standards:begin project-links -->
270
+ - [Repository](https://github.com/swarmauri/swarmauri-sdk)
271
+ - [pypi: swarmauri_geostore_memory](https://pypi.org/project/swarmauri_geostore_memory/)
272
+ <!-- readme-standards:end project-links -->
273
+
274
+ ---
275
+
276
+ ## Contributing
277
+
278
+ ### How to Contribute
279
+
280
+ See the [contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md).
281
+
282
+ ### Development Setup
283
+
284
+ Use the SDK workspace to run package tests and the README examples.
285
+
286
+ ### Notes for Maintainers
287
+
288
+ Update both maintained examples when changing the public API.
289
+
290
+ ---
291
+
292
+ ## Governance
293
+
294
+ ### Ownership and Decision Making
295
+
296
+ The SDK maintainer review process applies.
297
+
298
+ ### Standards and Policies
299
+
300
+ See the [README policy](https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md).
301
+
302
+ ### Lifecycle and Migration
303
+
304
+ Planning version 0.1.0. Install from a checkout while the package is unpublished.
305
+
306
+ ---
307
+
308
+ ## License and Attribution
309
+
310
+ ### License
311
+
312
+ <!-- readme-standards:begin license -->
313
+ Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/LICENSE).
314
+ <!-- readme-standards:end license -->
315
+
316
+ ### Notices
317
+
318
+ <!-- readme-standards:begin notices -->
319
+ See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/NOTICE) for attribution.
320
+ <!-- readme-standards:end notices -->
321
+
@@ -0,0 +1,297 @@
1
+ # swarmauri_geostore_memory
2
+
3
+ <!-- readme-standards:begin branding -->
4
+ <p align="center"><a href="https://github.com/swarmauri/swarmauri-sdk"><img src="https://raw.githubusercontent.com/swarmauri/swarmauri-sdk/master/assets/swarmauri.brand.theme.svg" alt="Swarmauri SDK" width="300"></a></p>
5
+ <p align="center"><strong>swarmauri_geostore_memory</strong></p>
6
+ <p align="center">Reference in-memory geographic point search.</p>
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/swarmauri_geostore_memory/"><img alt="pypi: swarmauri_geostore_memory unpublished" src="https://img.shields.io/static/v1?label=pypi&amp;message=swarmauri_geostore_memory%20unpublished&amp;labelColor=292421&amp;color=805500"></a>
9
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/pyproject.toml"><img alt="Source version: 0.1.0" src="https://img.shields.io/static/v1?label=Source%20version&amp;message=0.1.0&amp;labelColor=292421&amp;color=994525"></a>
10
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/pyproject.toml"><img alt="Python: &gt;=3.10,&lt;3.15" src="https://img.shields.io/static/v1?label=Python&amp;message=%3E%3D3.10%2C%3C3.15&amp;labelColor=292421&amp;color=994525"></a>
11
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/pyproject.toml"><img alt="Layer: standards" src="https://img.shields.io/static/v1?label=Layer&amp;message=standards&amp;labelColor=292421&amp;color=994525"></a>
12
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/README.md#lifecycle-and-migration"><img alt="Lifecycle: active" src="https://img.shields.io/static/v1?label=Lifecycle&amp;message=active&amp;labelColor=292421&amp;color=24654A"></a>
13
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/static/v1?label=License&amp;message=Apache-2.0&amp;labelColor=292421&amp;color=994525"></a>
14
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/NOTICE"><img alt="Notice: attribution" src="https://img.shields.io/static/v1?label=Notice&amp;message=attribution&amp;labelColor=292421&amp;color=994525"></a>
15
+ </p>
16
+ <p align="center">
17
+ <a href="https://pypi.org/project/swarmauri_geostore_memory/"><img alt="pypi downloads: swarmauri_geostore_memory: unpublished" src="https://img.shields.io/static/v1?label=pypi%20downloads&amp;message=swarmauri_geostore_memory%3A%20unpublished&amp;labelColor=292421&amp;color=805500"></a>
18
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/README.md"><img alt="README hits: swarmauri_geostore_memory" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/pkgs/40-standards/swarmauri_geostore_memory/README.md.svg?label=README%20hits&amp;labelColor=292421&amp;color=08704E"></a>
19
+ </p>
20
+ <p align="center">
21
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="README standards: CI gate" src="https://img.shields.io/static/v1?label=README%20standards&amp;message=CI%20gate&amp;labelColor=292421&amp;color=67437E"></a>
22
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/tests/unit/test_readme_sources.py"><img alt="Tests: example source" src="https://img.shields.io/static/v1?label=Tests&amp;message=example%20source&amp;labelColor=292421&amp;color=67437E"></a>
23
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/README.md#certification-status"><img alt="Certification: not certified" src="https://img.shields.io/static/v1?label=Certification&amp;message=not%20certified&amp;labelColor=292421&amp;color=805500"></a>
24
+ <a href="https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"><img alt="Governance: repository policy" src="https://img.shields.io/static/v1?label=Governance&amp;message=repository%20policy&amp;labelColor=292421&amp;color=67437E"></a>
25
+ <a href="https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"><img alt="Evidence: source and CI" src="https://img.shields.io/static/v1?label=Evidence&amp;message=source%20and%20CI&amp;labelColor=292421&amp;color=67437E"></a>
26
+ </p>
27
+ <p align="center"><a href="#overview">Overview</a> · <a href="#installation">Installation</a> · <a href="#quick-start">Quick Start</a> · <a href="#usage">Usage</a> · <a href="#public-api-and-import-surfaces">API</a> · <a href="#contributing">Contributing</a> · <a href="#governance">Governance</a> · <a href="#license">License</a></p>
28
+ <!-- readme-standards:end branding -->
29
+
30
+ ---
31
+
32
+ ## Overview
33
+
34
+ ### Summary
35
+
36
+ Reference in-memory geographic point search.
37
+
38
+ ### Why This Package
39
+
40
+ `MemoryGeoStore` provides a separately installable implementation for Swarmauri callers.
41
+
42
+ ### When to Use
43
+
44
+ The query prints harbor. Use within_radius for a meter-based inclusive search or within_bbox for a coordinate window.
45
+
46
+ ### Features
47
+
48
+ - Reference in-memory geographic point search.
49
+ - Use `MemoryGeoStore` directly from Python.
50
+
51
+ ### Non-Goals
52
+
53
+ The public surface is the component and its documented options.
54
+
55
+ ---
56
+
57
+ ## Getting Started
58
+
59
+ ### Prerequisites
60
+
61
+ Use Python 3.10 through 3.14. The source example runs in the SDK workspace.
62
+
63
+ ### Installation
64
+
65
+ #### Install with uv
66
+
67
+ <!-- readme-standards:begin installation.uv -->
68
+ `swarmauri_geostore_memory` is not declared published. From the source checkout:
69
+
70
+ ```bash
71
+ uv pip install .
72
+ ```
73
+ <!-- readme-standards:end installation.uv -->
74
+
75
+ #### Install with pip
76
+
77
+ <!-- readme-standards:begin installation.pip -->
78
+ `swarmauri_geostore_memory` is not declared published. From the source checkout:
79
+
80
+ ```bash
81
+ python -m pip install .
82
+ ```
83
+ <!-- readme-standards:end installation.pip -->
84
+
85
+ #### Install with Poetry
86
+
87
+ <!-- readme-standards:begin installation.poetry -->
88
+ `swarmauri_geostore_memory` is not declared published. From a separate Poetry project, replace the path with your checkout:
89
+
90
+ ```bash
91
+ poetry add /path/to/swarmauri_geostore_memory
92
+ ```
93
+ <!-- readme-standards:end installation.poetry -->
94
+
95
+ ### Quick Start
96
+
97
+ #### Example
98
+
99
+ <!-- readme-standards:begin example.quick-start -->
100
+ Source: [docs/readme/quick_start.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/docs/readme/quick_start.py).
101
+
102
+ ```python
103
+ from swarmauri_core.geo_stores import GeoPoint, GeoRecord
104
+ from swarmauri_geostore_memory import MemoryGeoStore
105
+
106
+ store = MemoryGeoStore()
107
+ store.put(GeoRecord("harbor", GeoPoint(51.5, -0.1)))
108
+ print(store.nearest(GeoPoint(51.5, -0.1), 1)[0].record.id)
109
+ ```
110
+ <!-- readme-standards:end example.quick-start -->
111
+
112
+ #### Expected Result
113
+
114
+ The example demonstrates the documented `swarmauri_geostore_memory` source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.
115
+
116
+ ---
117
+
118
+ ## Usage
119
+
120
+ ### Common Workflows
121
+
122
+ <!-- readme-standards:begin example.usage -->
123
+ Source: [docs/readme/usage.py](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/docs/readme/usage.py).
124
+
125
+ ```python
126
+ from swarmauri_core.geo_stores import GeoPoint, GeoRecord
127
+ from swarmauri_geostore_memory import MemoryGeoStore
128
+
129
+ store = MemoryGeoStore()
130
+ store.put(GeoRecord("harbor", GeoPoint(51.5, -0.1)))
131
+ print(store.nearest(GeoPoint(51.5, -0.1), 1)[0].record.id)
132
+ ```
133
+ <!-- readme-standards:end example.usage -->
134
+
135
+ Pass the store to `AgentRunner` to persist a conversation. Use `runner.load(run_id)`
136
+ to read the typed run state.
137
+
138
+ ### Configuration
139
+
140
+ Configure the component at construction. See [the source](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/swarmauri_geostore_memory/MemoryGeoStore.py) for supported inputs.
141
+
142
+ ### Error Handling
143
+
144
+ Invalid inputs raise an exception before a result is returned. See the API and package regression tests for concrete cases.
145
+
146
+ ### Best Practices
147
+
148
+ Use the provided example to exercise the component with your configuration before depending on it.
149
+
150
+ ---
151
+
152
+ ## Package Boundary
153
+
154
+ ### What It Owns
155
+
156
+ Reference in-memory geographic point search.
157
+
158
+ ### Public API and Import Surfaces
159
+
160
+ Import `MemoryGeoStore` from `swarmauri_geostore_memory`.
161
+
162
+ ### Entry Points
163
+
164
+ <!-- readme-standards:begin entry-points -->
165
+ - `swarmauri.geo_stores` → `MemoryGeoStore` → `swarmauri_geostore_memory:MemoryGeoStore`
166
+ <!-- readme-standards:end entry-points -->
167
+
168
+ ### Injected Dependencies
169
+
170
+ The package manifest declares the Swarmauri collaborators used by this component.
171
+
172
+ ### Protocol Consumers
173
+
174
+ Applications can construct the component directly using the import shown above.
175
+
176
+ ### Extensions
177
+
178
+ Use the corresponding SDK interface when adding another implementation.
179
+
180
+ ---
181
+
182
+ ## Operations and Readiness
183
+
184
+ ### Operational Requirements
185
+
186
+ Configure the component as shown in the example. Match the lifetime of stored records and injected collaborators to the application.
187
+
188
+ ### Health and Observability
189
+
190
+ Use package tests and inspect exceptions from component calls.
191
+
192
+ ### Security and Resource Limits
193
+
194
+ Supply application-appropriate input sizes and access controls for your use case.
195
+
196
+ ### Compatibility
197
+
198
+ Version 0.1.0 declares Python 3.10 through 3.14.
199
+
200
+ ---
201
+
202
+ ## Verification
203
+
204
+ ### Tests
205
+
206
+ Run `uv run --package swarmauri_geostore_memory pytest` from the package directory.
207
+
208
+ ### Certification Status
209
+
210
+ Planning release.
211
+
212
+ ### Evidence
213
+
214
+ The source examples and package tests document the supported behavior.
215
+
216
+ ---
217
+
218
+ ## FAQ
219
+
220
+ ### Why
221
+
222
+ Reference in-memory geographic point search.
223
+
224
+ ### How
225
+
226
+ Run the source example under Getting Started.
227
+
228
+ ### When
229
+
230
+ Re-run the package tests after changing the backend, distance model, or embedding configuration used by your application.
231
+
232
+ ---
233
+
234
+ ## Documentation and Related Packages
235
+
236
+ ### More Documentation
237
+
238
+ See the [component source](https://github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/40-standards/swarmauri_geostore_memory).
239
+
240
+ ### Related Packages
241
+
242
+ See [swarmauri-core](https://github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/10-interfaces/swarmauri_core) for interfaces and shared types.
243
+
244
+ ### Project Links
245
+
246
+ <!-- readme-standards:begin project-links -->
247
+ - [Repository](https://github.com/swarmauri/swarmauri-sdk)
248
+ - [pypi: swarmauri_geostore_memory](https://pypi.org/project/swarmauri_geostore_memory/)
249
+ <!-- readme-standards:end project-links -->
250
+
251
+ ---
252
+
253
+ ## Contributing
254
+
255
+ ### How to Contribute
256
+
257
+ See the [contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md).
258
+
259
+ ### Development Setup
260
+
261
+ Use the SDK workspace to run package tests and the README examples.
262
+
263
+ ### Notes for Maintainers
264
+
265
+ Update both maintained examples when changing the public API.
266
+
267
+ ---
268
+
269
+ ## Governance
270
+
271
+ ### Ownership and Decision Making
272
+
273
+ The SDK maintainer review process applies.
274
+
275
+ ### Standards and Policies
276
+
277
+ See the [README policy](https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md).
278
+
279
+ ### Lifecycle and Migration
280
+
281
+ Planning version 0.1.0. Install from a checkout while the package is unpublished.
282
+
283
+ ---
284
+
285
+ ## License and Attribution
286
+
287
+ ### License
288
+
289
+ <!-- readme-standards:begin license -->
290
+ Licensed under `Apache-2.0`. See [LICENSE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/LICENSE).
291
+ <!-- readme-standards:end license -->
292
+
293
+ ### Notices
294
+
295
+ <!-- readme-standards:begin notices -->
296
+ See [NOTICE](https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/NOTICE) for attribution.
297
+ <!-- readme-standards:end notices -->
@@ -0,0 +1,85 @@
1
+ [project]
2
+ name = "swarmauri_geostore_memory"
3
+ version = "0.1.0"
4
+ description = "Reference in-memory geographic point search."
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ requires-python = ">=3.10,<3.15"
8
+ authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
9
+ keywords = ["swarmauri", "geospatial", "radius", "nearest"]
10
+ classifiers = [
11
+ "Development Status :: 1 - Planning",
12
+ "Programming Language :: Python :: 3.10",
13
+ "Programming Language :: Python :: 3.11",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Programming Language :: Python :: 3.14",
17
+ ]
18
+ dependencies = ["swarmauri_core>=0.11.2,<0.12", "swarmauri_base>=0.11.1,<0.12", "swarmauri_metric_haversine>=0.1.0,<0.2"]
19
+ license-files = ["LICENSE", "NOTICE"]
20
+
21
+ [project.urls]
22
+ Repository = "https://github.com/swarmauri/swarmauri-sdk"
23
+
24
+ [project.entry-points."swarmauri.geo_stores"]
25
+ MemoryGeoStore = "swarmauri_geostore_memory:MemoryGeoStore"
26
+
27
+ [tool.uv.sources]
28
+ swarmauri_core = { workspace = true }
29
+ swarmauri_base = { workspace = true }
30
+ swarmauri_metric_haversine = { workspace = true }
31
+
32
+ [tool.readme_standards]
33
+ policy = "package-guide-v1"
34
+ readme = "README.md"
35
+ brand = "swarmauri"
36
+ brand_catalog = "../../../tools/readme/brands.toml"
37
+ repository = "https://github.com/swarmauri/swarmauri-sdk"
38
+ ref = "master"
39
+ package_path = "pkgs/40-standards/swarmauri_geostore_memory"
40
+ layer = "standards"
41
+ lifecycle = "active"
42
+ license_file = "LICENSE"
43
+ notice_file = "NOTICE"
44
+
45
+ [tool.readme_standards.distributions.pypi]
46
+ name = "swarmauri_geostore_memory"
47
+ published = false
48
+
49
+ [tool.readme_standards.examples.quick_start]
50
+ source = "docs/readme/quick_start.py"
51
+ test = "tests/unit/test_readme_sources.py"
52
+ language = "python"
53
+ expected_exit_code = 0
54
+
55
+ [tool.readme_standards.examples.usage]
56
+ source = "docs/readme/usage.py"
57
+ test = "tests/unit/test_readme_sources.py"
58
+ language = "python"
59
+ expected_exit_code = 0
60
+
61
+ [tool.readme_standards.statuses.readme]
62
+ label = "CI gate"
63
+ url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
64
+
65
+ [tool.readme_standards.statuses.tests]
66
+ label = "example source"
67
+ url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/tests/unit/test_readme_sources.py"
68
+
69
+ [tool.readme_standards.statuses.certification]
70
+ label = "not certified"
71
+ url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/pkgs/40-standards/swarmauri_geostore_memory/README.md#certification-status"
72
+
73
+ [tool.readme_standards.statuses.governance]
74
+ label = "repository policy"
75
+ url = "https://github.com/swarmauri/swarmauri-sdk/blob/master/tools/readme/POLICY.md"
76
+
77
+ [tool.readme_standards.statuses.evidence]
78
+ label = "source and CI"
79
+ url = "https://github.com/swarmauri/swarmauri-sdk/actions/workflows/readme-standards.yml"
80
+ [build-system]
81
+ requires = ["poetry-core>=2.0"]
82
+ build-backend = "poetry.core.masonry.api"
83
+
84
+ [dependency-groups]
85
+ dev = ["pytest>=8.0", "ruff>=0.9.9", "readme-standards==0.1.6; python_version >= \"3.11\""]
@@ -0,0 +1,55 @@
1
+ from math import isfinite
2
+ from typing import Literal
3
+
4
+ from pydantic import Field, PrivateAttr, SerializeAsAny
5
+ from swarmauri_base.ComponentBase import ComponentBase
6
+ from swarmauri_base.geo_stores import GeoStoreBase
7
+ from swarmauri_base.metrics.MetricBase import MetricBase
8
+ from swarmauri_core.geo_stores import GeoBounds, GeoHit, GeoPoint, GeoRecord
9
+ from swarmauri_metric_haversine import HaversineMetric
10
+
11
+
12
+ @ComponentBase.register_type(GeoStoreBase, "MemoryGeoStore")
13
+ class MemoryGeoStore(GeoStoreBase):
14
+ """Reference point store using a configurable metric in meters."""
15
+
16
+ type: Literal["MemoryGeoStore"] = "MemoryGeoStore"
17
+ metric: SerializeAsAny[MetricBase] = Field(default_factory=HaversineMetric)
18
+ _records: dict[str, GeoRecord] = PrivateAttr(default_factory=dict)
19
+
20
+ def put(self, record: GeoRecord) -> None:
21
+ self._records[record.id] = record
22
+
23
+ def get(self, record_id: str) -> GeoRecord | None:
24
+ return self._records.get(record_id)
25
+
26
+ def delete(self, record_id: str) -> None:
27
+ self._records.pop(record_id, None)
28
+
29
+ def _ranked(self, origin: GeoPoint) -> list[GeoHit]:
30
+ hits = (
31
+ GeoHit(record, self.metric.distance(origin, record.point))
32
+ for record in self._records.copy().values()
33
+ )
34
+ return sorted(hits, key=lambda hit: (hit.distance_m, hit.record.id))
35
+
36
+ def nearest(self, origin: GeoPoint, limit: int) -> list[GeoHit]:
37
+ if limit < 0:
38
+ raise ValueError("limit must be non-negative")
39
+ return self._ranked(origin)[:limit] if limit else []
40
+
41
+ def within_radius(self, origin: GeoPoint, radius_m: float) -> list[GeoHit]:
42
+ if not isfinite(radius_m) or radius_m < 0:
43
+ raise ValueError("radius_m must be finite and non-negative")
44
+ return [
45
+ hit for hit in self._ranked(origin) if hit.distance_m <= radius_m
46
+ ]
47
+
48
+ def within_bbox(self, bounds: GeoBounds) -> list[GeoRecord]:
49
+ return [
50
+ record
51
+ for record in sorted(
52
+ self._records.copy().values(), key=lambda item: item.id
53
+ )
54
+ if bounds.contains(record.point)
55
+ ]
@@ -0,0 +1,10 @@
1
+ from importlib.metadata import PackageNotFoundError, version
2
+
3
+ from .MemoryGeoStore import MemoryGeoStore
4
+
5
+ try:
6
+ __version__ = version("swarmauri_geostore_memory")
7
+ except PackageNotFoundError:
8
+ __version__ = "0.1.0"
9
+
10
+ __all__ = ["MemoryGeoStore"]