mapsi-langchain
LangChain tools for Mapsi geospatial APIs. One package covers LangChain, CrewAI, AutoGen, and LangGraph.
Install
pip install mapsi-langchain
Get your API key at mapsi.dev/console/api-keys (free tier: 1,000 calls/day).
LangChain
from mapsi_langchain import get_tools
from langchain.agents import initialize_agent, AgentType
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o")
agent = initialize_agent(
get_tools("your-mapsi-api-key"),
llm,
agent=AgentType.OPENAI_FUNCTIONS,
)
agent.run("Find the 3 nearest hospitals to 51.5074, -0.1278 and route to the closest one")
CrewAI
from mapsi_langchain import get_tools
from crewai import Agent
geo_agent = Agent(
role="Geospatial Analyst",
goal="Answer location questions using real map data",
tools=get_tools("your-mapsi-api-key"),
)
AutoGen / LangGraph
Both accept standard LangChain tools — pass get_tools("your-key") directly.
OpenAI Agents SDK (function calling)
from mapsi_langchain.openai_tools import MAPSI_TOOLS
import openai
response = openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Geocode 10 Downing Street London"}],
tools=MAPSI_TOOLS,
)
Available Tools
| Tool class | Tool name | What it does |
|---|---|---|
GeocodeTool |
mapsi_geocode |
Address → lat/lon |
ReverseGeocodeTool |
mapsi_reverse_geocode |
lat/lon → address |
RouteTool |
mapsi_route |
Turn-by-turn directions |
IsochroneTool |
mapsi_isochrone |
Reachability polygon |
PlacesSearchTool |
mapsi_places_search |
Nearby POI search |
Full API reference: mapsi.dev/docs
License
MIT
Metadata
Release files for mapsi-langchain 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mapsi_langchain-1.0.0.tar.gz | 4.0 kB | Without provenance | Details for mapsi_langchain-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mapsi_langchain-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mapsi_langchain-1.0.0-py3-none-any.whl |
Total release size: 8.4 kB
Release files / mapsi_langchain-1.0.0.tar.gz
| Download URL | mapsi_langchain-1.0.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d47642718b2a816ef1141045b721a93032ad43e5a3d4404cc9e0947def60645
|
|
BLAKE2b-256 checksum How to use checksums |
c53ef699c1af206f2440cd326529be53a84eb49ebe5f411a2a48f7955d337021
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / mapsi_langchain-1.0.0-py3-none-any.whl
| Download URL | mapsi_langchain-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66c2a7f43961789f745f14e1e7bb296ba99b934e7a35d00574d6d9fa2864215b
|
|
BLAKE2b-256 checksum How to use checksums |
51df2683c6c3150bdec074b58717940fd2f57d0f5de0a2819941356382577450
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for mapsi-langchain 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.