Skip to content

Commit ecca02a

Browse files
author
wenfeng.wf
committed
Add pypi support.
1 parent 6ab56d6 commit ecca02a

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/alibabacloud_rds_openapi_mcp_server/server.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import json
22
import logging
33
import os
4-
from datetime import datetime
5-
from typing import Dict, Any, List
4+
import sys
65

6+
from typing import Dict, Any, List
77
from alibabacloud_rds20140815 import models as rds_20140815_models
88
from alibabacloud_rds20140815.client import Client as RdsClient
99
from alibabacloud_tea_openapi.models import Config
1010
from alibabacloud_vpc20160428 import models as vpc_20160428_models
1111
from alibabacloud_vpc20160428.client import Client as VpcClient
1212
from mcp.server.fastmcp import FastMCP
13-
14-
from alibabacloud_rds_openapi_mcp_server.utils import transform_to_iso_8601, transform_to_datetime, transform_perf_key
13+
current_dir = os.path.dirname(os.path.abspath(__file__))
14+
sys.path.append(current_dir)
15+
from utils import transform_to_iso_8601, transform_to_datetime, transform_perf_key
1516

1617
logger = logging.getLogger(__name__)
1718

@@ -99,8 +100,8 @@ async def describe_db_instance_performance(region_id: str, db_instance_id: str,
99100
Args:
100101
region_id: db instance region(e.g. cn-hangzhou)
101102
db_instance_id: db instance id(e.g. rm-xxx)
102-
db_type: the db instance database type(e.g. mysql\pgsql\sqlserver)
103-
perf_key: Performance Key(e.g. MemCpuUsage\QPSTPS\Sessions\COMDML\RowDML)
103+
db_type: the db instance database type(e.g. mysql,pgsql,sqlserver)
104+
perf_key: Performance Key(e.g. MemCpuUsage,QPSTPS,Sessions,COMDML,RowDML)
104105
start_time: start time(e.g. 2023-01-01 00:00)
105106
end_time: end time(e.g. 2023-01-01 00:00)
106107
"""
@@ -311,7 +312,7 @@ async def describe_available_classes(
311312
instance_charge_type (str): Instance payment type. Values: Prepaid, Postpaid, Serverless.
312313
engine (str): Database engine type. Values: MySQL, SQLServer, PostgreSQL, MariaDB.
313314
engine_version (str): Database version.
314-
dbinstance_storage_type (str): Storage type. Values: local_ssd\general_essd\cloud_essd\cloud_essd2\cloud_essd3
315+
dbinstance_storage_type (str): Storage type. Values: local_ssd,general_essd,cloud_essd,cloud_essd2,cloud_essd3
315316
category (str): Instance category. Values: Basic, HighAvailability, cluster, AlwaysOn, Finance, serverless_basic, serverless_standard, serverless_ha.
316317
dbinstance_id (str, optional): The ID of the RDS instance.
317318
order_type (str, optional): Order type. Currently only supports "BUY".
@@ -394,7 +395,7 @@ async def create_db_instance(
394395
system_db_charset (str, optional): Character set.
395396
dbinstance_net_type (str, optional): Network connection type (Internet, Intranet). Default: Internet.
396397
category (str, optional): Instance category. Default: Basic.
397-
dbinstance_storage_type (str, optional): Storage type. (e.g. local_ssd\general_essd\cloud_essd\cloud_essd2\cloud_essd3)
398+
dbinstance_storage_type (str, optional): Storage type. (e.g. local_ssd,general_essd,cloud_essd,cloud_essd2,cloud_essd3)
398399
vpc_id (str): VPC ID.
399400
vswitch_id (str): VSwitch ID.
400401
private_ip_address (str, optional): Private IP address.

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)