semvec/pypi-packages huggingface dataset:
kubernetes-log-analysis 0.1.0
A tool to analyze Kubernetes log bundles using LLMs.
Requires Python: >=3.8

## Kubernetes Log Analysis Tool (k-log)

[中文版說明文件](https://github.com/ap-mic-inc/kubernetes-log-analysis/blob/main/package/README_zh_tw.md)

A command-line tool that utilizes Large Language Models (LLMs) to analyze collected Kubernetes log content.

## Prerequisites

-   Python 3.8+
-   A directory of Kubernetes log content (generated by `k8s-debug.sh`, for details see https://github.com/ap-mic-inc/kubernetes-log-analysis).
-   Google Gemini API Key (or an API key for other models supported by LiteLLM).

## Python Package Installation

1.  Install the package and its dependencies using pip:
    ```bash
    pip install kubernetes-log-analysis==0.1.0
    ```

## Configuration

1.  **API Key**: This tool requires the `GOOGLE_API_KEY` for Gemini. Create a file named `.env` in the directory where you will run `k-log` (or the project root during development) with the following content:
    ```env
    GOOGLE_API_KEY="YOUR_GEMINI_API_KEY_HERE"
    ```
    Alternatively, ensure this environment variable is set globally.

2.  **LLM Model (Optional)**: You can specify a different LiteLLM compatible model string by setting the `LLM_MODEL` environment variable in your `.env` file or globally. The default is `gemini/gemini-2.5-flash-preview-04-17`.
    ```env
    LLM_MODEL="gemini/gemini-2.5-flash-preview-04-17"
    ```

## Usage

1.  Ensure your `GOOGLE_API_KEY` is set (e.g., via the `.env` file).
2.  Navigate to your Kubernetes log bundle directory (e.g., `cd /path/to/k8s-debug-default-20250509034522`).
3.  Run the `k-log` command with your query:

    ```bash
    k-log "What is the current status of the nodes?"
    ```
    Alternatively, explicitly specify the log directory:
    ```bash
    k-log --log-dir /path/to/your/k8s-debug-default-20250509034522 "logs for pod kuberay-operator-6ddb59999c-mggc9"
    ```

### Example Queries:

-   `k-log "status of nodes"`
-   `k-log "logs for pod jupyterlab-54698b59b8-bmvgq in namespace default"`
-   `k-log "describe service kubernetes"`
-   `k-log "any critical events?"`

## About the Author

### Simon Liu

APMIC MLOps Engineer x Google Developer Expert (GDE) in AI

A technology enthusiast in the field of artificial intelligence solutions, focusing on assisting enterprises in adopting generative AI, MLOps, and large language model (LLM) technologies to drive digital transformation and practical technological implementation.

Currently also a Google Developer Expert (GDE) in the GenAI field, actively participating in technology communities. Through technical articles, speeches, and practical experience sharing, he promotes the application and development of AI technology. To date, he has published over a hundred technical articles on Medium, covering topics such as generative AI, RAG, and AI Agents, and has served multiple times as a speaker at technical seminars, sharing practical applications of AI and generative AI.

### Related Links:

- APMIC Official Website: https://www.apmic.ai/
- Personal Social Media Links: https://simonliuyuwei.my.canva.site/link-in-bio
mcp-deploy 0.1.12
MCP Deploy Server
Requires Python: >=3.12
Keywords: deploy, mcp

# Cloud Studio MCP 部署服务

[![Python Version](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![FastAPI](https://img.shields.io/badge/FastAPI-0.68+-green.svg)](https://fastapi.tiangolo.com/)

Cloud Studio MCP 部署服务是一个基于FastMCP的服务器，提供Cloud Studio工作空间的管理功能，包括创建工作空间、上传文件和执行命令等操作。

## 功能特性

- **创建工作空间**：创建新的Cloud Studio工作空间实例
- **文件管理**：上传文件到指定工作空间
- **命令执行**：在工作空间中执行shell命令
- **MCP集成**：通过MCP协议提供标准化接口

## 安装指南

### 前置要求

- Python 3.8+
- API_TOKEN环境变量（Cloud Studio API访问令牌）

### 安装步骤

1. 克隆仓库：
   ```bash
   git clone <repository-url>
   cd mcp_deploy
   ```

2. 创建并激活虚拟环境：
   ```bash
   python -m venv .venv
   source .venv/bin/activate  # Linux/macOS
   .\.venv\Scripts\activate   # Windows
   ```

3. 安装依赖：
   ```bash
   pip install -e .
   ```

## 配置说明

在运行服务前，需要设置以下环境变量：

```bash
export API_TOKEN="your_cloud_studio_api_token"
export region="ap-shanghai"  # 可选，默认为ap-shanghai
```

## 使用说明

### 启动服务

```bash
python -m mcp_deploy
```

### API 文档

服务提供以下MCP工具：

#### 1. 创建工作空间

```python
create_workspace() -> dict
```
返回示例：
```json
{
    "workspace_key": "ws-kmhhvqnlogr48",
    "webIDE": "https://ws-kmhhv1pyvc48--ide.ap-shanghai.cloudstudio.club"
}
```

#### 2. 上传文件

```python
write_files(workspace_key: str, region: str, files: list[File]) -> str
```
文件格式：
```python
class File:
    save_path: str    # 文件保存路径
    file_content: str # 文件内容(UTF-8编码)
```

#### 3. 执行命令

```python
execute_command(workspace_key: str, region: str, command: str) -> str
```
示例：
```python
execute_command("ws-xxxx", "ap-shanghai", "ls -al")
```

## 开发指南

### 项目结构

```
mcp_deploy/
├── __init__.py
├── __main__.py
├── mcp_handlers.py    # 核心业务逻辑
├── models.py          # 数据模型定义
└── server.py          # FastMCP服务器实现
```

### 测试

1. 确保已设置API_TOKEN环境变量
2. 运行测试命令：
   ```bash
   python -m pytest
   ```

## 贡献

欢迎提交Pull Request或Issue报告问题。

## 许可证

[MIT License](LICENSE)
knowledge-graph 0.0.33
A library to store data in a knowledge graph
Requires Python: >=3.11
Keywords: tag1, tag2

## Setup

Install knowledge-graph using these commands:

```
git clone https://github.com/hyroai/knowledge-graph.git
pip install -e ./knowledge-graph
pip install cloud-utils@https://github.com/hyroai/cloud-utils/tarball/master
```

## Publish to PyPI

After merging your new branch to the main branch, You need to publish a new version to PyPI. On the repo's main view go to the "Code" tab on top and then press on releases.
Click "Draft a new release" and create you new release with semantic version that follows the rules here: https://semver.org/.
Publishing your new release will create a new version on PyPI using the latest commit on main.

## When to use `querying.py` vs `querying_raw.py`

Both modules provide querying abilities, but `querying.py` relies on a global store of kgs, storred by their hash value. The code retrieves the kg instance from this map ad hoc. This was built so we can have a serializable representation of a node in the kg, `Node`, which has `graph_id` and `node_id`, and not have to serialize the entire kg any time we serialize an object containing them (e.g. if we're serializing or hashing a `NounPhrase` for some reason).

The global store is an impure component that can make some code have different behaviours depending on what happened before (whether or not the kg was loaded).

Consequently, in contexts where you have a `Element` and `KnowledgeGraph`, prefer using `querying_raw.py`, giving the graph instance explicitly. This is mainly when creating graphs or enriching them.

In contexts where all you have is `Node`, use `querying.py`.

If you implement new querying functions, you can implement them in `querying_raw.py`, and lift them to `querying.py` using `storage.run_on_kg_and_node`.

## Do not use the internal modules inside the `knowledge_graph` directory

Instead, rely on the imports in `knowledge_graph/__init__.py`, possibly add what you need there (in rare cases this is required).

## Relations naming conventions

Relation are the middle part of the triplet. Although they can safely be named anything, we use a naming convention that serves as mnemonic device. For example the relation `person/gender` implies the left hand side is an entity representing a person, whereas the right hand side is a gender, so we can expect a triplet like `Alice,person/gender,female`.
map-closures 2.0.2
Effectively Detecting Loop Closures using Point Cloud Density Maps
Requires Python: >=3.8
Keywords: Loop Closures, Localization, SLAM, LiDAR

<div align="center">
    <h1>MapClosures</h1>
    <a href="https://github.com/PRBonn/MapClosures/releases"><img src="https://img.shields.io/github/v/release/PRBonn/MapClosures?label=version" /></a>
    <a href="https://github.com/PRBonn/MapClosures/blob/main/LICENSE"><img src=https://img.shields.io/badge/license-MIT-green" /></a>
    <a href="https://github.com/PRBonn/MapClosures/blob/main/"><img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" /></a>
    <a href="https://github.com/PRBonn/MapClosures/blob/main/"><img src="https://img.shields.io/badge/Windows-0078D6?st&logo=windows&logoColor=white" /></a>
    <a href="https://github.com/PRBonn/MapClosures/blob/main/"><img src="https://img.shields.io/badge/mac%20os-000000?&logo=apple&logoColor=white" /></a>
    <br />
    <br />
    <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
    <a href="https://github.com/PRBonn/MapClosures/blob/main/README.md#Install">Install</a>
    <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
    <a href=https://www.ipb.uni-bonn.de/pdfs/gupta2024icra.pdf>ICRA24 Paper</a>
    <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
    <a href=https://github.com/PRBonn/MapClosures/issues>Contact Us</a>
  <br />
  <br />

Effectively Detecting Loop Closures using Point Cloud Density Maps.

<p align="center">

![image](https://github.com/PRBonn/MapClosures/assets/28734882/18d5ee54-61a9-4d9f-87f2-8aba16de0f75)
</p>
</div>
<hr />

## Install the Python API and CLI
`pip install map-closures`

### Usage
<details>
<summary>
The following command will provide details about how to use our pipeline:

```sh
map_closure_pipeline --help
```
</summary>

![CLI_usage](https://github.com/PRBonn/MapClosures/assets/28734882/6dfbd767-ca63-4671-9582-3129752d0244)
</details>

<details>
<summary>
Providing the -v flag will initialize the visualizer:

```sh
map_closure_pipeline -v
```
</summary>

![Visualizer](https://github.com/user-attachments/assets/34aa2b2f-c0ce-4dfb-a0e0-cbcc04487a5a)
</details>

## Citation

If you use this library for any academic work, please cite our original [paper](https://www.ipb.uni-bonn.de/pdfs/gupta2024icra.pdf).

```bibtex
@inproceedings{gupta2024icra,
    author     = {S. Gupta and T. Guadagnino and B. Mersch and I. Vizzo and C. Stachniss},
    title      = {{Effectively Detecting Loop Closures using Point Cloud Density Maps}},
    booktitle  = {IEEE International Conference on Robotics and Automation (ICRA)},
    year       = {2024},
    codeurl    = {https://github.com/PRBonn/MapClosures},
}
```

## Acknowledgement

This repository is heavily inspired by, and also depends on [KISS-ICP](https://github.com/PRBonn/kiss-icp)

## Contributors

<a href="https://github.com/PRBonn/MapClosures/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=PRBonn/MapClosures" />
</a>
partial-table 0.0.1a0
Partial Table Models for SQLAlchemy
Requires Python: <4.0.0,>=3.10.0

# SQLAlchemy Partial Tables

Partial Tables for SQLAlchemy

## Installation

```bash
pip install partial-table
```

## Scenario

Let's say you have 2 tables, `business_draft` and `business`.

`business_draft` and `business` have the same fields, but `business_draft` should allow most fields to be nullable.

Any business can freely update its draft, but only approved modifications get copied over to `business`.

How can we implement this and reduce redundancy?

## Usage

Any field marked with `PartialAllowed` will be nullable in the partial table, and required in the complete table.

## Example

```python
from typing import Annotated
from abc import ABC
from sqlmodel import Field, SQLModel
from partial_table import PartialBase, PartialAllowed, PartialTable

class Base(ABC, SQLModel):
    """Base class for all models."""

    id: int = Field(primary_key=True, sa_column_kwargs={"autoincrement": True})


class BusinessBase(PartialBase, Base):
    """Base class for all business models."""

    business_name: str
    city: Annotated[str, PartialAllowed()] = Field()
    address: Annotated[str, PartialAllowed()] = Field()


class BusinessDraft(BusinessBase, PartialTable, table=True):
    __tablename__ = "business_draft"


class Business(BusinessBase, table=True):
    __tablename__ = "business"

```

`Business` has all required fields, and `BusinessDraft` has every field marked with `PartialAllowed` as nullable.

## License
MIT