tools.tools.toolkits.citydsk_toolkit

CitySDK Toolkit for accessing city-related data from various sources.

This toolkit provides tools for interacting with the CitySDK APIs, including the Linked Data API for SPARQL queries and the Tourism API for points of interest information. These tools help agents find and process structured city information.

Examples

toolkit = CitySDKToolkit() tools = toolkit.get_tools()

tools.tools.toolkits.citydsk_toolkit.None

Attributes

Classes

CitySDKLinkedDataQueryInput

Input schema for the CitySDK Linked Data SPARQL query tool.

CitySDKToolkit

Toolkit for accessing CitySDK APIs for city-related data.

CitySDKTourismPOIInput

Input schema for querying Points of Interest from the CitySDK Tourism API.

Functions

get_tourism_pois(→ dict)

Fetches Points of Interest data from the CitySDK Tourism API.

run_citysdk_linkeddata_query(→ dict)

Executes a SPARQL query against the CitySDK Linked Data endpoint.

Module Contents

class tools.tools.toolkits.citydsk_toolkit.CitySDKLinkedDataQueryInput(/, **data: Any)

Bases: pydantic.BaseModel

Input schema for the CitySDK Linked Data SPARQL query tool.

Parameters:

query – SPARQL query to execute against the CitySDK Linked Data endpoint

query: str = None
class tools.tools.toolkits.citydsk_toolkit.CitySDKToolkit(/, **data: Any)

Bases: langchain_core.tools.base.BaseToolkit

Toolkit for accessing CitySDK APIs for city-related data.

This toolkit provides tools for working with different CitySDK APIs, including SPARQL queries for linked data and tourism POI information.

get_tools() list[langchain_core.tools.StructuredTool]

Gets the list of available CitySDK tools.

Returns:

A list of tools for working with CitySDK APIs

Return type:

List[StructuredTool]

class tools.tools.toolkits.citydsk_toolkit.CitySDKTourismPOIInput(/, **data: Any)

Bases: pydantic.BaseModel

Input schema for querying Points of Interest from the CitySDK Tourism API.

Parameters:
  • bbox – Bounding box coordinates to filter POIs geographically

  • city – City name to filter POIs by location

bbox: str | None = None
city: str | None = None
tools.tools.toolkits.citydsk_toolkit.get_tourism_pois(bbox: str | None = None, city: str | None = None) dict

Fetches Points of Interest data from the CitySDK Tourism API.

Parameters:
  • bbox – Optional bounding box to filter POIs geographically

  • city – Optional city name to filter POIs

Returns:

JSON response containing the POI data

Return type:

dict

Raises:

HTTPError – If the request fails or returns an error status code

tools.tools.toolkits.citydsk_toolkit.run_citysdk_linkeddata_query(query: str) dict

Executes a SPARQL query against the CitySDK Linked Data endpoint.

Parameters:

query – A valid SPARQL query string

Returns:

JSON response containing the query results

Return type:

dict

Raises:

HTTPError – If the request fails or returns an error status code

tools.tools.toolkits.citydsk_toolkit.citysdk_linked_data_tool
tools.tools.toolkits.citydsk_toolkit.citysdk_tourism_poi_tool