osmfeatures 0.3.2__tar.gz → 0.3.3__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.
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/PKG-INFO +13 -14
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/README.md +12 -13
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/pyproject.toml +1 -1
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/.github/copilot-instructions.md +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/.github/instructions/osmgeojson-python-conventions.instructions.md +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/.gitignore +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/LICENSE +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/Makefile +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/__init__.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/_geo_agent.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/_http.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/_pagination.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/async_client.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/chunking.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/cli.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/client.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/convenience.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/geometry.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/mcp/AGENT_INSTRUCTIONS.md +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/mcp/__init__.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/mcp/_geocode.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/mcp/_mcp_session.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/mcp/_preview.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/mcp/mcp_server.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/models.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/nearest.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/output.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/py.typed +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/src/osmfeatures/retry.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/.env.example +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/README.md +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/__init__.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/conftest.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/__init__.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/conftest.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/graph_utils.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_bike_path_dijkstra_liljeholmen_to_djurgarden.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_city_cycling_infrastructure.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_cycling_trails.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_geo_agent.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_geometry_filters.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_lakeside_ice_cream_hunt.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_park_bench_finder.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_park_explorer.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_pedestrian_shortest_path.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_pedestrian_wavefront_bfs.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_restaurant_guide.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/mcp/test_geocode.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/mcp/test_mcp_server.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/mcp/test_mcp_session.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/mcp/test_preview.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_async_client.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_chunking.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_cli.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_client.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_geo_agent_client.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_nearest_within.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_output.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_pagination.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/test_retry.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/tutorial/conftest.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/tutorial/osm_features_query.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/tutorial/places_nearby.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/tutorial/places_search.py +0 -0
- {osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/tutorial/test_tutorial.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: osmfeatures
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Official client for the MapLark OSM Features API (GeoJSON, FlatGeobuf, GeoParquet, CSV)
|
|
5
5
|
Project-URL: Homepage, https://maplark.com
|
|
6
6
|
Project-URL: Repository, https://github.com/MapLark/osmfeatures-python
|
|
@@ -43,7 +43,7 @@ Description-Content-Type: text/markdown
|
|
|
43
43
|
|
|
44
44
|
# MapLark OSM Features API
|
|
45
45
|
|
|
46
|
-
Official Python client for the [MapLark OSM Features API](https://maplark.com)
|
|
46
|
+
Official Python client for the [MapLark OSM Features API](https://maplark.com) with GeoJSON, FlatGeobuf, GeoParquet, CSV formats. Hosted OSM APIs as a Service for using OSM in applications at scale.
|
|
47
47
|
|
|
48
48
|
## Contents
|
|
49
49
|
|
|
@@ -247,9 +247,7 @@ Add real geospatial intelligence to your Artificial Intelligence agents. Use Map
|
|
|
247
247
|
|
|
248
248
|
The [Maplark MCP Server](https://maplark.com/products/mcp-server) is the agent surface. Your LLM is the planner: it chooses OSM tags, a bbox or location+radius, a time, a travel mode, and the next tool. The tools compute metres, ranks, opening-hours status, and walk/bike paths. You do not compute haversine, parse `opening_hours` strings, or invent coordinates.
|
|
249
249
|
|
|
250
|
-
Results come back as summaries (ids, names, OSM tags, lon/lat scalars, `distance_m`, `openNow`) plus a `collection_id`. They never include GeoJSON coordinate arrays. Call `preview_map(collection_id)` to draw: a local page loads [OpenFreeMap](https://openfreemap.org/)
|
|
251
|
-
|
|
252
|
-
Named places go through `geocode` (Nominatim until MapLark `/v1/geocode` is public). For a large bbox, call `query_all` with `bbox_tiles` (power of 2; `1` disables tiling), not page `query` by hand. MCP `query_all` defaults to `max_features=10000` (raise it if `has_more`); the SDK default remains 55_000. Do not invent `places_near_to` or `places_open_after`. The server ships these rules as `instructions` from [`src/osmfeatures/mcp/AGENT_INSTRUCTIONS.md`](src/osmfeatures/mcp/AGENT_INSTRUCTIONS.md).
|
|
250
|
+
Results come back as summaries (ids, names, OSM tags, lon/lat scalars, `distance_m`, `openNow`) plus a `collection_id`. They never include GeoJSON coordinate arrays. Call `preview_map(collection_id)` to draw: a local page loads [OpenFreeMap](https://openfreemap.org/) in MapLibre and fetches GeoJSON from localhost, so coordinates never enter the model. Call `export_geojson` only when the user asked for a raw file: it writes GeoJSON to disk and returns a path, not coordinates.
|
|
253
251
|
|
|
254
252
|
#### Tools
|
|
255
253
|
|
|
@@ -276,7 +274,7 @@ First install [uv](https://docs.astral.sh/uv/) for one-click server start.
|
|
|
276
274
|
"maplark": {
|
|
277
275
|
"command": "uvx",
|
|
278
276
|
"args": ["--from", "osmfeatures[mcp]", "osmfeatures", "mcp"],
|
|
279
|
-
"env": { "MAPLARK_API_KEY": "
|
|
277
|
+
"env": { "MAPLARK_API_KEY": "sk-..." }
|
|
280
278
|
}
|
|
281
279
|
}
|
|
282
280
|
}
|
|
@@ -288,18 +286,17 @@ Planner rules: you pick tags, bbox or location+radius, budgets, `openNow`/`asOf`
|
|
|
288
286
|
|
|
289
287
|
| Prompt | MCP tools |
|
|
290
288
|
|------|-----|
|
|
291
|
-
| "
|
|
292
|
-
| "
|
|
293
|
-
| "
|
|
294
|
-
| "
|
|
295
|
-
| "
|
|
296
|
-
| "A
|
|
297
|
-
| "Walk from my hotel to the cafe, then the office" | `routes_path` with those stops in listed order |
|
|
289
|
+
| "Open cafes near me" | `places_nearby` or `places_search` with bbox and `openNow=true`|
|
|
290
|
+
| "Vegan restaurants open after 6pm on a walk from T Centralen to Sodermalm in Stockholm" | `geocode`, `routes_path` , `places_search`, `filter_open`, `nearest_within`, `preview_map` |
|
|
291
|
+
| "Open restaurants within 150 m of a station" | two `places_search`, then `nearest_within` |
|
|
292
|
+
| "Pubs open at 20:00 in Toronto, Canada" | `places_search` with `as_of` (no `open_now` so closed hits stay), then `filter_open`; if empty, retry with no hours |
|
|
293
|
+
| "Open cafes within a 10-minute bike ride" | `routes_isochrone` + `places_search` in a covering radius + `points_in_polygon` |
|
|
294
|
+
| "A bar crawl in Stockholm" / "cafes on a tour of Gamla Stan" | `places_search`, `filter_open` + `routes_optimized_path` (`loop=true`) |
|
|
298
295
|
| "Suggest a walk to a bar, a restaurant, and a cafe, no particular order" | `routes_optimized_path` with `loop=false` |
|
|
299
296
|
| "Is the office a 20-minute walk from the apartment?" | `routes_isochrone` from A, `point_in_polygon` for B |
|
|
300
297
|
| "Show this on a map" | `preview_map(collection_id)` after a search or route |
|
|
301
298
|
|
|
302
|
-
The same operations exist on `OSMFeaturesClient` when you are not going through an LLM (see [Places and routes](#places-and-routes)).
|
|
299
|
+
The same operations exist on `OSMFeaturesClient` when you are not going through an LLM (see [Places and routes](#places-and-routes)).
|
|
303
300
|
|
|
304
301
|
|
|
305
302
|
## Places and routes
|
|
@@ -479,3 +476,5 @@ Run one example app:
|
|
|
479
476
|
pytest tests/example_apps/test_restaurant_guide.py -v
|
|
480
477
|
```
|
|
481
478
|
|
|
479
|
+
|
|
480
|
+
Full HTTP reference: [https://maplark.com/developer](https://maplark.com/developer).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MapLark OSM Features API
|
|
2
2
|
|
|
3
|
-
Official Python client for the [MapLark OSM Features API](https://maplark.com)
|
|
3
|
+
Official Python client for the [MapLark OSM Features API](https://maplark.com) with GeoJSON, FlatGeobuf, GeoParquet, CSV formats. Hosted OSM APIs as a Service for using OSM in applications at scale.
|
|
4
4
|
|
|
5
5
|
## Contents
|
|
6
6
|
|
|
@@ -204,9 +204,7 @@ Add real geospatial intelligence to your Artificial Intelligence agents. Use Map
|
|
|
204
204
|
|
|
205
205
|
The [Maplark MCP Server](https://maplark.com/products/mcp-server) is the agent surface. Your LLM is the planner: it chooses OSM tags, a bbox or location+radius, a time, a travel mode, and the next tool. The tools compute metres, ranks, opening-hours status, and walk/bike paths. You do not compute haversine, parse `opening_hours` strings, or invent coordinates.
|
|
206
206
|
|
|
207
|
-
Results come back as summaries (ids, names, OSM tags, lon/lat scalars, `distance_m`, `openNow`) plus a `collection_id`. They never include GeoJSON coordinate arrays. Call `preview_map(collection_id)` to draw: a local page loads [OpenFreeMap](https://openfreemap.org/)
|
|
208
|
-
|
|
209
|
-
Named places go through `geocode` (Nominatim until MapLark `/v1/geocode` is public). For a large bbox, call `query_all` with `bbox_tiles` (power of 2; `1` disables tiling), not page `query` by hand. MCP `query_all` defaults to `max_features=10000` (raise it if `has_more`); the SDK default remains 55_000. Do not invent `places_near_to` or `places_open_after`. The server ships these rules as `instructions` from [`src/osmfeatures/mcp/AGENT_INSTRUCTIONS.md`](src/osmfeatures/mcp/AGENT_INSTRUCTIONS.md).
|
|
207
|
+
Results come back as summaries (ids, names, OSM tags, lon/lat scalars, `distance_m`, `openNow`) plus a `collection_id`. They never include GeoJSON coordinate arrays. Call `preview_map(collection_id)` to draw: a local page loads [OpenFreeMap](https://openfreemap.org/) in MapLibre and fetches GeoJSON from localhost, so coordinates never enter the model. Call `export_geojson` only when the user asked for a raw file: it writes GeoJSON to disk and returns a path, not coordinates.
|
|
210
208
|
|
|
211
209
|
#### Tools
|
|
212
210
|
|
|
@@ -233,7 +231,7 @@ First install [uv](https://docs.astral.sh/uv/) for one-click server start.
|
|
|
233
231
|
"maplark": {
|
|
234
232
|
"command": "uvx",
|
|
235
233
|
"args": ["--from", "osmfeatures[mcp]", "osmfeatures", "mcp"],
|
|
236
|
-
"env": { "MAPLARK_API_KEY": "
|
|
234
|
+
"env": { "MAPLARK_API_KEY": "sk-..." }
|
|
237
235
|
}
|
|
238
236
|
}
|
|
239
237
|
}
|
|
@@ -245,18 +243,17 @@ Planner rules: you pick tags, bbox or location+radius, budgets, `openNow`/`asOf`
|
|
|
245
243
|
|
|
246
244
|
| Prompt | MCP tools |
|
|
247
245
|
|------|-----|
|
|
248
|
-
| "
|
|
249
|
-
| "
|
|
250
|
-
| "
|
|
251
|
-
| "
|
|
252
|
-
| "
|
|
253
|
-
| "A
|
|
254
|
-
| "Walk from my hotel to the cafe, then the office" | `routes_path` with those stops in listed order |
|
|
246
|
+
| "Open cafes near me" | `places_nearby` or `places_search` with bbox and `openNow=true`|
|
|
247
|
+
| "Vegan restaurants open after 6pm on a walk from T Centralen to Sodermalm in Stockholm" | `geocode`, `routes_path` , `places_search`, `filter_open`, `nearest_within`, `preview_map` |
|
|
248
|
+
| "Open restaurants within 150 m of a station" | two `places_search`, then `nearest_within` |
|
|
249
|
+
| "Pubs open at 20:00 in Toronto, Canada" | `places_search` with `as_of` (no `open_now` so closed hits stay), then `filter_open`; if empty, retry with no hours |
|
|
250
|
+
| "Open cafes within a 10-minute bike ride" | `routes_isochrone` + `places_search` in a covering radius + `points_in_polygon` |
|
|
251
|
+
| "A bar crawl in Stockholm" / "cafes on a tour of Gamla Stan" | `places_search`, `filter_open` + `routes_optimized_path` (`loop=true`) |
|
|
255
252
|
| "Suggest a walk to a bar, a restaurant, and a cafe, no particular order" | `routes_optimized_path` with `loop=false` |
|
|
256
253
|
| "Is the office a 20-minute walk from the apartment?" | `routes_isochrone` from A, `point_in_polygon` for B |
|
|
257
254
|
| "Show this on a map" | `preview_map(collection_id)` after a search or route |
|
|
258
255
|
|
|
259
|
-
The same operations exist on `OSMFeaturesClient` when you are not going through an LLM (see [Places and routes](#places-and-routes)).
|
|
256
|
+
The same operations exist on `OSMFeaturesClient` when you are not going through an LLM (see [Places and routes](#places-and-routes)).
|
|
260
257
|
|
|
261
258
|
|
|
262
259
|
## Places and routes
|
|
@@ -436,3 +433,5 @@ Run one example app:
|
|
|
436
433
|
pytest tests/example_apps/test_restaurant_guide.py -v
|
|
437
434
|
```
|
|
438
435
|
|
|
436
|
+
|
|
437
|
+
Full HTTP reference: [https://maplark.com/developer](https://maplark.com/developer).
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "osmfeatures"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.3"
|
|
8
8
|
description = "Official client for the MapLark OSM Features API (GeoJSON, FlatGeobuf, GeoParquet, CSV)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{osmfeatures-0.3.2 → osmfeatures-0.3.3}/tests/example_apps/test_city_cycling_infrastructure.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|