This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Part 1 - Import modules | |
| import asyncio | |
| import logging | |
| from typing import Dict, TypedDict | |
| from google.adk.agents import LlmAgent | |
| from google.adk.sessions import InMemorySessionService | |
| from google.adk.runners import Runner | |
| from google.genai import types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # client.py | |
| import asyncio | |
| from fastmcp import Client | |
| from fastmcp.client.elicitation import ElicitResult | |
| from google import genai | |
| from google.genai import types | |
| async def send_to_gemini(flight_status_result: str, user_query: str = None): | |
| """Send flight status result to Gemini for analysis.""" | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # server.py | |
| from fastmcp import FastMCP, Context | |
| from dataclasses import dataclass | |
| import httpx | |
| import os | |
| from datetime import datetime, timedelta | |
| import pytz | |
| mcp = FastMCP("Flight Status Server") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import asyncio | |
| from google import genai | |
| from mcp import ClientSession | |
| from mcp.client.streamable_http import streamablehttp_client | |
| import warnings | |
| warnings.filterwarnings("ignore") | |
| MCP_SERVER_URL = "http://127.0.0.1:8080/mcp/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from fastmcp import FastMCP | |
| mcp = FastMCP("Employee Server") | |
| @mcp.tool() | |
| def get_employees() -> list: | |
| return [ | |
| {"id": 1, "name": "Alice", "role": "Engineer"}, | |
| {"id": 2, "name": "Bob", "role": "Designer"}, | |
| {"id": 3, "name": "Charlie", "role": "Manager"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM docker.io/python:alpine | |
| WORKDIR /content | |
| RUN apk add curl | |
| RUN echo '<!DOCTYPE html><html><head><title>Hello</title></head><body><h1>Hello, world!</h1></body></html>' > index.html | |
| CMD ["python3", "-m", "http.server", "80", "--bind", "0.0.0.0"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import os | |
| import requests | |
| import pytz | |
| from datetime import datetime, timedelta | |
| from typing import Any, Callable, Set, Dict, List, Optional | |
| from mcp.server.fastmcp import FastMCP | |
| # Create MCP server | |
| mcp = FastMCP("Flight Server") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| apiVersion: kro.run/v1alpha1 | |
| kind: Application | |
| metadata: | |
| name: site-1 | |
| spec: | |
| name: site-1 | |
| mysqlPassword: cGFzc3dvcmQ= # (base64-encoded password) | |
| storageClass: local-path | |
| ingress: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: kro.run/v1alpha1 | |
| kind: ResourceGraphDefinition | |
| metadata: | |
| name: wp-app | |
| spec: | |
| schema: | |
| apiVersion: v1alpha1 | |
| kind: Application | |
| spec: | |
| name: string | default="wordpress" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder