semvec/pypi-packages huggingface dataset:
dreamlake 0.2.4
ML experiment tracking and data storage
License: MIT
Requires Python: >=3.9
Keywords: machine-learning, experiment-tracking, mlops, data-storage

# Dreamlake

A simple and flexible SDK for ML experiment tracking and data storage.

## Features

- **Three Usage Styles**: Decorator, context manager, or direct instantiation
- **Dual Operation Modes**: Remote (API server) or local (filesystem)
- **Auto-creation**: Automatically creates namespace, workspace, and folder hierarchy
- **Upsert Behavior**: Updates existing sessions or creates new ones
- **Simple API**: Minimal configuration, maximum flexibility

## Installation

<table>
<tr>
<td>Using uv (recommended)</td>
<td>Using pip</td>
</tr>
<tr>
<td>

```shell
uv add dreamlake
```

</td>
<td>

```shell
pip install dreamlake
```

</td>
</tr>
</table>

## Quick Start

### Remote Mode (with API Server)

```python
from dreamlake import Session

with Session(
    name="my-experiment",
    workspace="my-workspace",
    remote="https://cu3thurmv3.us-east-1.awsapprunner.com",
    api_key="your-jwt-token"
) as session:
    print(f"Session ID: {session.id}")
```

### Local Mode (Filesystem)

```python
from dreamlake import Session

with Session(
    name="my-experiment",
    workspace="my-workspace",
    local_path=".dreamlake"
) as session:
    pass  # Your code here
```

See [examples/](examples/) for more complete examples.

## Development Setup

### Installing Dev Dependencies

To contribute to Dreamlake or run tests, install the development dependencies:

<table>
<tr>
<td>Using uv (recommended)</td>
<td>Using pip</td>
</tr>
<tr>
<td>

```shell
uv sync --extra dev
```

</td>
<td>

```shell
pip install -e ".[dev]"
```

</td>
</tr>
</table>

This installs:
- `pytest>=8.0.0` - Testing framework
- `pytest-asyncio>=0.23.0` - Async test support
- `sphinx>=7.2.0` - Documentation builder
- `sphinx-rtd-theme>=2.0.0` - Read the Docs theme
- `sphinx-autobuild>=2024.0.0` - Live preview for documentation
- `myst-parser>=2.0.0` - Markdown support for Sphinx
- `ruff>=0.3.0` - Linter and formatter
- `mypy>=1.9.0` - Type checker

### Running Tests

<table>
<tr>
<td>Using uv</td>
<td>Using pytest directly</td>
</tr>
<tr>
<td>

```shell
uv run pytest
```

</td>
<td>

```shell
pytest
```

</td>
</tr>
</table>

### Building Documentation

Documentation is built using Sphinx with Read the Docs theme.

<table>
<tr>
<td>Build docs</td>
<td>Live preview</td>
<td>Clean build</td>
</tr>
<tr>
<td>

```shell
uv run python -m sphinx -b html docs docs/_build/html
```

</td>
<td>

```shell
uv run sphinx-autobuild docs docs/_build/html
```

</td>
<td>

```shell
rm -rf docs/_build
```

</td>
</tr>
</table>

The live preview command starts a local server and automatically rebuilds when files change.

Alternatively, you can use the Makefile from within the docs directory:

```shell
cd docs
make html          # Build HTML documentation
make clean         # Clean build files
```

For maintainers, to build and publish a new release: `uv build && uv publish`
PySingBoxConverter 0.5.2.dev0
SingBox converter, Python
License: MIT
Keywords: singbox converter clash subconverter

# SingBox Converter

The code are refactored from [Toperlock/sing-box-subscribe](https://github.com/Toperlock/sing-box-subscribe) See [Documentation](https://github.com/Toperlock/sing-box-subscribe/blob/main/instructions/README.md).

## How to install

```bash
pip install PySingBoxConverter
```

## Use in commandline

#### Create a `providers.json` from [`providers-example.json`](https://raw.githubusercontent.com/dzhuang/sing-box-converter/main/src/singbox_converter/providers-example.json):

```bash
cp providers-example.json providers.json

vi providers.json
```

#### Then run

```bash
singbox_convert -t 1 -o config1.json
```

## Use in python code systematically

```python
from singbox_converter import SingBoxConverter

converter = SingBoxConverter(
    providers_config="/path/to/providers.json",
    template="/path/to/template",
    fetch_sub_ua="clash.meta",
    # fetch_sub_fallback_ua="clash",
    # export_config_folder="",
    # export_config_name="my_config.json",
    # auto_fix_empty_outbound=True,
)

print(converter.singbox_config)

converter.export_config(
    path="/path/to/output/config",
    # nodes_only=True
)

```


## Thanks
Credit goes to:
- [Toperlock/sing-box-subscribe](https://github.com/Toperlock/sing-box-subscribe)
- [gg4924/sing-box-subscribe](https://github.com/gg4924/sing-box-subscribe)
mcp-translation-text 1.0.7
MCP provider wrapping the Niutrans translation API
License: MIT
Requires Python: >=3.10
Keywords: mcp, translation, niutrans, ai

# MCP 翻译服务

基于小牛翻译（Niutrans）API 的 MCP Provider，提供文字翻译工具和语种目录资源，方便在 Cursor/mcp-cli 等客户端中引用。

## 快速开始

### 使用 uv 安装并启动发布版

```bash
uv tool install mcp-translation-text
```

## 环境变量

- `NIUTRANS_API_KEY`（必填）：小牛翻译开放平台提供的 API Key,可免费使用, 请登录后获取:https://niutrans.com/cloud/account_info/info

## MCP 客户端配置示例

若通过 `uv tool install` 安装，可在 `mcp.json` 中写：

```json
{
  "mcpServers": {
    "translation": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "tool",
        "run",
        "mcp-translation-text"
      ],
      "env": {
        "NIUTRANS_API_KEY": "${env.NIUTRANS_API_KEY}"
      }
    }
  }
}
```

启动 Cursor 后执行 `ListTools` 即可看到 `translate_text`，同时支持 `ListResources` 读取 `language://catalog`。

## 可用功能

### 工具：`translate_text`

- **参数**：
  - `text`：待翻译内容。
  - `source`：源语言代码或别名（会通过本地映射表规范化）。
  - `target`：目标语言代码或别名。
- **返回**：
  ```json
  {
    "source": "zh",
    "target": "en",
    "original_text": "你好",
    "translated_text": "Hello",
    "raw": { ... 小牛原始响应 ... }
  }
  ```

### 资源：`language://catalog`

提供所有可用语种及别名，示例如下：

```json
{
  "total": 455,
  "languages": [
    {"code": "zh", "zh": "中文(简体)", "en": "Chinese (Simplified)"},
    {"code": "en", "zh": "英语", "en": "English"}
    // ... 其余省略 ...
  ],
  "aliases": {
    "zhongwenjianti": "zh",
    "english": "en"
    // ... 其余省略 ...
  }
}
```

推荐在客户端的 LLM 中先读取该资源，完成语种描述到代码的映射后，再调用 `translate_text`。

## 调试与常见问题

- **缺少 API Key**：启动时报 `缺少环境变量 NIUTRANS_API_KEY`，请确认已在 `.env` 或系统环境中设置。
- **语种不支持**：`translate_text` 会校验语种代码/别名，若报错请检查是否使用了 `language://catalog` 中列出的值。
- **路径或依赖问题**：脚本依赖 `uv`，请先安装 `pip install uv` 或参考 [uv 文档](https://github.com/astral-sh/uv)。
- **命令名称**：通过 PyPI 安装后，可直接运行 `mcp-translation-text`；若 global PATH 中找不到，记得激活虚拟环境或使用 `python -m mcp_translation_text`。
- **发布/升级包**：
  ```bash
  python -m build
  twine upload dist/*
  ```

## 目录结构（关键文件）

```
E:\MCP
├── pyproject.toml
├── server.py                # 入口包装，确保 python server.py 可运行
├── src/
│   └── translation_server.py
├── scripts/
│   ├── start.ps1
│   └── start.sh
├── .env.example
├── LICENSE
└── README.md
```

发布后，用户只需设置 Niutrans API Key，即可通过 `mcp-translation-text` 直接加载该 Provider。