semvec/pypi-packages huggingface dataset:
clashaipy 1.0.8
An API wrapper for the ClashAI API
License: MIT
Requires Python: >=3.9
Keywords: clash-ai, clashai, api, clashapi, clashai, ai, gpt, llama, mixtral, gemini, clashaipy

![ClashAI Wide-Banner](https://i.ibb.co/5czjY5n/Clash-AI-Wide-Banner-No-Background.png)
# 🚀 | ClashAI Python Package
**ClashAI Python Package for easy API integration!**

## Installation
```python
pip install clashai
```

## 💭 | Chat Completions

```python
import clashaipy

client = clashaipy.Client(api_key="[YOUR API KEY]")
completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Hello, World!",
        }
    ]
)

print(completion['choices'][0]['message']['content'])
```

## 📷 | Image Recognition

```py
import clashaipy

client = clashaipy.Client(api_key="[YOUR API KEY]")

response = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "What’s in this image?"},
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
                    },
                },
            ],
        }
    ]
)

print(response['choices'][0]['message']['content'])
```
nyust-sso-client 0.3.0
A client for NYUST SSO system, providing authenticated access and common API calls.
License: MIT
Requires Python: <4.0,>=3.12

# NYUST SSO Client

NYUST 單一登入系統 (SSO) 模擬客戶端登入，並取得相關資訊。

> ⚠️ **WARNING:**  
> - 目前還在趕工與測試階段，可能會有不穩定的情況。
> - 本模組僅供學術研究使用，請勿用於非法用途。

## 安裝

```bash
pip install nyust-sso-client
```

## 使用範例

以下示範使用 ddddocr 處理驗證碼。執行以下指令安裝ddddocr(可選)。
```bash
pip install ddddocr
```

```python
import ddddocr
from nyust_sso import NYUSTSSOClient

if __name__ == "__main__":
    ocr = ddddocr.DdddOcr(show_ad=False)

    client = NYUSTSSOClient()
    captcha = client.fetch_captcha()
    captcha_text = ocr.classification(captcha)

    client.login("<username>", "<password>", captcha_text.lower())

    # 獲取當前學期所有課程資訊
    courses = client.fetch_my_courses()
```

## 參數說明

- `NYUSTSSOClient`: 模組的核心，用於與 NYUST SSO 系統互動。
- `fetch_captcha()`: 抓取登入頁面上的驗證碼圖片。
- `login(username, password, captcha_text)`: 執行登入動作，需提供使用者名稱、密碼以及辨識後的驗證碼文字。
- `fetch_my_courses()`: 登入後，取得當前學期的課程資訊。

## 驗證碼處理

此範例中使用了 `ddddocr` 模組來辨識驗證碼。若對驗證碼有其他需求可自行實現替換 `ddddocr`，此範例只是提供一種破解示範。

## 注意事項

- `captcha_text.lower()`: 轉換驗證碼文字為小寫，確保與伺服器驗證格式一致。
metaflow-slack-notifier 0.1.0
Add your description here
License: MIT
Requires Python: >=3.10

# Metaflow Slack Notification Plugin

[![CI](https://github.com/t-chov/metaflow_slack_notifier/actions/workflows/ci.yaml/badge.svg)](https://github.com/t-chov/metaflow_slack_notifier/actions/workflows/ci.yaml)

A Metaflow plugin that sends detailed error notifications to Slack when a flow step fails. This helps teams monitor their Metaflow pipelines and quickly respond to failures.

## Features

- Automatic Slack notifications on step failures
- Detailed error information including:
  - Flow details
  - Retry count and limits
  - Flow parameters
  - Input data
  - Full stack trace
- Easy integration with existing Metaflow pipelines

## Installation

```bash
pip install metaflow-slack-notifier
```

## Configuration

Set the following environment variables:

```bash
export METAFLOW_SLACK_APP_TOKEN="xoxb-your-token"
export METAFLOW_SLACK_CHANNEL="your-channel"
```

or use `@environment` decorator:

```python
@environment(vars={"METAFLOW_SLACK_APP_TOKEN": "xoxb-your-token", "METAFLOW_SLACK_CHANNEL": "your-channel"})
@slack()
@step
def some_step(self):
    # write your code
    print("end")
```

## Usage

Add the `@slack` decorator to any step that you want to monitor.

```python
from metaflow import FlowSpec, slack, step
import os

token = os.getenv("METAFLOW_SLACK_APP_TOKEN")
channel = os.getenv("METAFLOW_SLACK_CHANNEL")

class MyFlow(FlowSpec):
    @step
    def start(self):
        print("start")
        self.next(self.end)

    @slack(token=token, channel=channel)
    @step
    def end(self):
        # This will trigger a Slack notification due to ZeroDivisionError
        1 / 0
        print("end")

if __name__ == "__main__":
    MyFlow()
```

When the step fails, you'll receive a notification in your Slack channel with the error details.

## Slack App Setup

1. Create a new Slack App in your workspace
2. Enable the following OAuth scopes:
    - chat:write
    - chat:write.public (if sending to public channels)
3. Install the app to your workspace
4. Copy the Bot User OAuth Token (starts with xoxb-)

## License

MIT License