semvec/pypi-packages huggingface dataset:
sqltodsltranslator-mcp 0.1.1
A service to convert MySQL SQL queries to Elasticsearch DSL using MCP framework
Requires Python: >=3.13

# SQL to Elasticsearch DSL Translator

## 项目简介

SQL to Elasticsearch DSL Translator 是一个基于 MCP (Model Conversion Platform) 框架构建的服务，可以将 MySQL SQL 查询语句转换为 Elasticsearch DSL (Domain Specific Language) 查询。

该工具支持常见的 SQL 操作，包括：
- SELECT 查询
- WHERE 条件过滤
- GROUP BY 聚合
- ORDER BY 排序
- LIMIT 限制结果数量
- 函数操作（COUNT, AVG, SUM等）
- UNION 和 MINUS 操作

这个转换器可以帮助熟悉 SQL 语法但不熟悉 Elasticsearch DSL 的开发者快速构建 Elasticsearch 查询。

整个项目全是基于 ai 的自主生成。
支持版本: Elasticsearch 7.17

## 部署指南

### 环境要求
- Python 3.13 或更高版本
- pip 或 poetry 用于依赖管理

### 安装步骤

1. 克隆项目代码：
   ```bash
   git clone <repository-url>
   cd SqlToDslTranslator-MCP
   ```

2. 安装依赖：
   ```bash
   # 使用 pip
   pip install -e .
   
   # 或使用 poetry
   poetry install
   ```

3. 运行服务：
   ```bash
   python -m SqlToDslTranslator_MCP
   ```

## 使用示例

### 基本查询转换

将简单的 SQL 查询转换为 Elasticsearch DSL：

```python
from src.SqlToDslTranslator_MCP.server import SQLToESDSLConverter

# 创建转换器实例
converter = SQLToESDSLConverter()

sql = "SELECT id, name, age FROM users WHERE age > 18 ORDER BY age LIMIT 10"
dsl = converter.convert(sql)
print(dsl)
```

### 聚合查询

支持 GROUP BY 和聚合函数：

```python
sql = "SELECT department, COUNT(*) as count FROM employees GROUP BY department"
dsl = converter.convert(sql)
print(dsl)
```

### 复杂条件查询

支持多种条件和函数：

```python
sql = "SELECT name, ROUND(age/10)*10 as age_group, COUNT(*) FROM users WHERE status = 'active' GROUP BY ROUND(age/10)*10 HAVING COUNT(*) > 5"
dsl = converter.convert(sql)
print(dsl)
```

### 通过MCP工具使用

作为MCP工具使用时，可以直接调用convert函数：

```python
from src.SqlToDslTranslator_MCP.server import convert

result = convert("SELECT COUNT(*) FROM logs WHERE level = 'ERROR'")
print(result)
```

### 命令行使用

也可以通过命令行工具进行转换：

```bash
echo "SELECT COUNT(*) FROM logs WHERE level = 'ERROR'" | python -m SqlToDslTranslator_MCP
```
asg-scaling-manager 0.1.0
CLI library to manage AWS ASG desired/min/max capacity by tag filters
Requires Python: >=3.9
Keywords: aws, autoscaling, asg, cli, eks

# ASG Scaling Manager

Manage AWS Auto Scaling Group capacities by tag filters with a simple, reliable CLI.

## Quick Install

```bash
pip install asg-scaling-manager
```

## Usage

```bash
# Get help
asg-sm --help

# Scale ASGs tagged with eks:cluster-name=my-cluster to 6 instances total
asg-sm --tag-value my-cluster --desired 6 --dry-run

# Apply changes with optional per-ASG max cap
asg-sm --tag-value my-cluster --desired 8 --max-size 5 --region eu-west-1

# Scale down to zero (sets min/max/desired to 0)
asg-sm --tag-value my-cluster --desired 0
```

## Features

- **Tag-based filtering**: Target ASGs by `eks:cluster-name` (default) or custom tags
- **Smart distribution**: Evenly distributes desired capacity across matched ASGs
- **Safety first**: Dry-run mode to preview changes
- **EKS optimized**: Defaults to `eks:cluster-name` tag for easy EKS cluster management
- **Flexible caps**: Optional per-ASG max size limits

## Examples

```bash
# Preview scaling for production cluster
asg-sm --tag-value prod-cluster --desired 12 --dry-run

# Scale with name filter and custom tag
asg-sm --tag-key team --tag-value payments --name-contains web --desired 4

# Emergency scale down
asg-sm --tag-value staging --desired 0
```

## Notes

- **Default tag**: Uses `eks:cluster-name` by default (perfect for EKS clusters)
- **Desired vs max-size**: `--desired` is total across all ASGs, `--max-size` is per-ASG cap
- **AWS auth**: Uses `--profile` and/or `--region` for AWS credentials
- **Dry-run**: Always test with `--dry-run` first

## Alternative Installation

```bash
# Isolated install (recommended for CLIs)
pipx install asg-scaling-manager

# Development install
git clone https://github.com/grzes-94/asg-scaling-manage
cd asg-scaling-manage
pip install -e .
```
pyhistory 2.3.0
PyHistory maintains history entries in distributed work environment,   which allows many developers to add/remove history entries between releases without conflicts.

# PyHistory

[![PyPI version](https://badge.fury.io/py/pyhistory.svg?icon=si%3Apython)](https://badge.fury.io/py/pyhistory)
[![PyPI Downloads](https://static.pepy.tech/badge/pyhistory)](https://pepy.tech/projects/pyhistory)

App to maintain history file for your project.

* Free software: BSD license
* Source: <https://github.com/beregond/pyhistory>
* PyPI: <https://pypi.python.org/pypi/pyhistory>
* ReadTheDocs: <https://pyhistory.readthedocs.io/en/latest/>

PyHistory maintains history entries in distributed work environment, which
allows many developers to add/remove history entries between releases without
conflicts.

## Installation

```bash
pip install pyhistory
```

## Features

(All commands can start either with `pyhistory` or shortcut - `pyhi`.)

* Add history entry:

  ```bash
  pyhi add 'New feature'
  pyhi add Something
  ```

* List history entries:

  ```bash
  $ pyhi list

  * New feature
  * Something
  ```

* Update your history file with entries for given release:

  ```bash
  $ cat HISTORY.rst
  my project
  ==========

  0.4.1 (2015-08-04)
  ++++++++++++++++++

  * Added PyHistory to project.
  * Improved codebase.
  * Other features.
  ```

  ```bash
  $ pyhi update 0.4.2
  $ cat HISTORY.rst
  my project
  ==========

  0.4.2 (2015-08-05)
  ++++++++++++++++++

  * Bug fixes
  * Change in API
  * Removed old features

  0.4.1 (2015-08-04)
  ++++++++++++++++++

  * Added PyHistory to project
  * Improved codebase
  * Other features
  ```

* Delete selected entries:

  ```bash
  $ pyhi delete

  1. New feature
  2. Something
  3. Another one
  4. Wrong one

  (Delete by choosing entries numbers.)

  $ pyhi delete 2 4
  $ pyhi list

  * New feature
  * Another one
  ```

* Clear all history:

  ```bash
  $ pyhi clear
  Do you really want to remove all entries? [y/N]: y
  ```

  Or without prompt:

  ```bash
  pyhi clear --yes
  ```

## Config file

(``setup.cfg`` has precedence over ``pyproject.toml`` for backward compatibility!)

You can adjust Pyhistory behaviour to your needs by adding config to ``pyproject.toml`` file:

```toml
  [tool.pyhistory]
  history_dir = "some_dir"  # 'history' by default
  history_file = "myhistory.md"  # 'HISTORY.rst' by default
  at_line = 42  # by default history will be injected after first headline
```

You can also add config to ``setup.cfg`` file. Just put ``pyhistory`` section in there:

```ini
  [pyhistory]
  history_dir = some_dir
  history_file = myhistory.rst
  at_line = 42
```

## Differences in formatting

If you are using markdown format you must note that:

* Lines are not wrapped, setting for line length is ignored
* There is extra config for markdown formatting - `md_header_level` (default is 2) and it sets amount of `#` in headline for version