semvec/pypi-packages huggingface dataset:
communications-protocol 0.1.0
A package for communication protocol handling
Requires Python: >=3.6

# Communications Protocol

这是一个用于处理通信协议的Python包，提供了一些常用的通信命令和帧创建功能。

## 功能

- 握手请求
- 数据请求
- 设置速度
- 停止运动
- 设置零位
- 单轴运动

## 安装

你可以通过以下命令安装此包：
pip install communications_protocol-0.1.0-py3-none-any.whl

## 使用示例

### 以下是如何使用`CommunicationsProtocol`类的示例：

from communications_protocol import CommunicationsProtocol

### 创建协议实例
protocol = CommunicationsProtocol()

### 生成握手请求帧
handshake_frame = protocol.handshake()
print("Handshake Frame:", handshake_frame)

### 请求数据
data_request_frame = protocol.request_data()
print("Data Request Frame:", data_request_frame)

### 设置速度
speed_frame = protocol.set_speed(1.5)
print("Set Speed Frame:", speed_frame)

### 停止运动
stop_frame = protocol.stop_motion(0x01)
print("Stop Motion Frame:", stop_frame)

### 设置零位
zero_position_frame = protocol.zero_position()
print("Zero Position Frame:", zero_position_frame)

### 单轴运动
single_axis_frame = protocol.single_axis_motion(1000)
print("Single Axis Motion Frame:", single_axis_frame)
sharepoint-wrapper 0.0.4
A basic sharepoint wrapper to be used with app-only credentials
Requires Python: >=3.8

# Sharepoint Wrapper

## Create Cofiguration

```python
from sharepoint_wrapper import SharePointConfig

config = SharePointConfig(
    tenant="<tenant>",
    tenant_domain="<tenant_domain>",
    client_id="<client_id>",
    client_secret="<client_secret>",
    site="<site_name>",
)
```

## Get Folders

```python
from sharepoint_wrapper import get_folders

folders_at_root = get_folders(config)
# or 
# ensure your path starts with a slash "/"
folders_at_path = get_folders(config, "/my/path") 
```

## Get Files

```python
from sharepoint_wrapper import get_files

files_at_root = get_files(config)
# or 
# ensure your path starts with a slash "/"
files_at_path = get_files(config, "/my/path") 
```

## Get File Content

```python
from sharepoint_wrapper import get_file_content
from io import BytesIO

file_name = "my_file.pdf"

# returns a BytesIO file

file_at_root: BytesIO = get_file_content(config, file_name)
# or 
# ensure your path starts with a slash "/"
file_at_path: BytesIO = get_file_content(config, file_name, "/my/path") 
```

## Upload a file

:warning: **Note**: Upload response will only be returned in case of success if upload fails, an exception will be raised

```python
from sharepoint_wrapper import upload_file
from io import BytesIO

with open('path/to/your/file', 'rb') as file:
    file_content = file.read()

# Note: Upload response will only be returned in case of success
# if upload fails, an exception will be raised

upload_response: dict = upload_file(config, file_content, "file_name.txt")
# or 
# ensure your path starts with a slash "/"
upload_response: dict = upload_file(config, file_content, "file_name.txt", "/my/path") 
```
udp-client-package 0.1.0
一个简单的UDP客户端API
Requires Python: >=3.6

# UDP Client

一个基于PySide6的简单UDP客户端实现。

## 安装
pip install dist/udp_client_package-0.1.0-py3-none-any.whl


## 使用示例

from udp_client import UdpClient


### 创建UDP客户端
udp = UdpClient(local_ip="192.168.0.100", local_port=5000)

### 连接到目标
udp.connect_to("192.168.0.7", 5300)

### 发送消息
udp.send_message("Hello, UDP!")

### 获取本地地址和端口
print(f"本地地址: {udp.local_address}:{udp.local_port}")

### 关闭连接
udp.close()
func2json 0.1.3
Convert Python functions to JSON schemas using Pydantic, Compatible with LLM Function Calling.

# Func2JSON

## Description

Func2JSON is a Python library designed to convert Python functions into a standardized JSON format, which is particularly useful for API integration and AI function calling in applications like OpenAI's function calling.

## Installation

Install Func2JSON using pip:

```bash
pip install func2json
```

## Usage

Import the function and use it as follows:

```python
from func2json import execf

def example_function(param1: str, param2: int) -> str:
    """Example function that takes a string and an integer."""
    pass

json_struct = execf(example_function)
print(json_struct)
```

**Output:**

```json
{
  "type": "function",
  "function": {
    "name": "example_function",
    "description": "Example function that takes a string and an integer.",
    "parameters": {
      "type": "object",
      "properties": {
        "param1": {
          "type": "string",
          "description": "param1 description"
        },
        "param2": {
          "type": "integer",
          "description": "param2 description"
        }
      },
      "required": ["param1", "param2"]
    }
  }
}
```

## Features

- Converts function signature and docstring into JSON.
- Handles parameter types and descriptions.
- Supports optional parameters.
- Gracefully handles functions without annotations or docstrings.

## Requirements

- Python 3.10 or higher
- Dependencies:
  - pydantic
  - docstring_parser

## Contributing

Contributions are welcome!

## License

Func2JSON is licensed under the MIT License.

## Contact

For questions or feedback, please contact [thanabordee.noun@gmail.com](mailto:thanabordee.noun@gmail.com).


## Limitations

- Does not support functions with *args or **kwargs.
- Complex type annotations may be converted to strings.

## FAQs

- **Q:** Why use Func2JSON?
  - **A:** To easily convert Python functions into a standardized JSON format for use in APIs and AI applications.
  
- **Q:** Does it support async functions?
  - **A:** Currently, only synchronous functions are supported.

## Change Log

- **0.1:** Initial release
- **0.1.1** Update Version

---