semvec/pypi-packages huggingface dataset:
typer_model_args 0.3.2
Extensions for the python typer library
License: MIT
Requires Python: >=3.9

# Typer Model Args
An extension for [Typer](https://typer.tiangolo.com/) that enables
model arguments.

Typer Model Args lets you declare Pydantic model parameters in your Typer command and automatically exposes its fields as proper Typer options/arguments on the command line. 
It keeps Typer’s annotations, adds missing ones when possible, and can convert typing.Literal fields into Enums for better CLI help and validation.

- Works with Typer
- Works with Pydantic models
- Preserves Typer metadata/annotations
- Optional Literal-to-Enum conversion for cleaner help and choices

## Installation

```shell
uv add typer_model_args
```

## Quickstart

```python
# app.py
import typer
from typing import Annotated
from pydantic import BaseModel
from typer_model_args import flatten_parameter_model_to_signature

class CliArgs(BaseModel):
    name: Annotated[str, typer.Option(...)]
    description: str | None = None

app = typer.Typer()

@app.command()
@flatten_parameter_model_to_signature()
def create(arguments: CliArgs, another_arg: str):
    """
    After decoration, --name/--description become top-level CLI options.
    """
    typer.echo(f"name={arguments.name}, desc={arguments.description}, extra={another_arg}")

if __name__ == "__main__":
    app()

```

## API

- `flatten_parameter_model_to_signature(*, literals_to_enums: bool = True)`
    - Flattens all pydantic model parameters in the decorated function into the function signature used by Typer.
    - `literals_to_enums`: when True, fields annotated with typing.Literal are turned into Enums so Typer can display and validate choices.


## Why use this?

- Keep your CLI schema and validation centralized in Pydantic models.
- Get clean, well-typed Typer commands without manually duplicating model fields as options.
- Better help messages and validation with minimal boilerplate.

## Requirements

- Python 3.10+
- Typer
- Pydantic

## License
MIT
soc-python 0.1.1
SOC工具执行器 - 执行本地Python文件并通过HTTP API提交
License: MIT
Requires Python: >=3.7
Keywords: soc, security, automation, http-client

# SOC Executor

SOC工具执行器 - 执行本地Python文件并通过HTTP API提交到SOC平台

## 功能特性

- 读取本地Python脚本文件
- 通过HTTP API提交代码到SOC平台执行
- 支持环境变量配置
- 命令行工具，使用简单
- 支持传递JSON格式参数

## 安装

```bash
pip install soc-executor
```

## 使用方法

### 基本用法

```bash
# 执行Python文件
soc-executor script.py

# 使用 --file 参数
soc-executor --file /path/to/script.py

# 传递参数
soc-executor script.py --params '{"key": "value"}'
```

### 环境变量配置

```bash
export HTTP_BASE_URL="http://your-soc-server:port"
export HTTP_TOKEN="your-api-token"
```

## 示例

创建一个测试脚本 `test_script.py`:

```python
def test_function():
    print("Hello from SOC executor!")
    return {"status": "success", "message": "Test completed"}

if __name__ == "__main__":
    result = test_function()
    print(result)
```

执行脚本:

```bash
soc-executor test_script.py
```

## 开发

使用 uv 进行开发环境管理:

```bash
# 安装开发依赖
uv sync --dev

# 运行测试
uv run pytest

# 构建包
uv run python -m build
```

## 许可证

MIT License
extractreqs 0.1.1
A tool to automatically extract and generate requirements.txt from Python source code by analyzing imports.
License: MIT
Requires Python: >=3.9

# extractreqs

![PyPI version](https://img.shields.io/pypi/v/extractreqs.svg)
[![License - MIT 3-Clause](https://img.shields.io/pypi/l/sfsgl.svg)](https://github.com/hasanaliozkan-dev/sfsgl/blob/main/LICENSE)
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/extractreqs?period=total&units=INTERNATIONAL_SYSTEM&left_color=GREY&right_color=BLUE&left_text=downloads)](https://pepy.tech/projects/extractreqs)
![Visitors](https://visitor-badge.laobi.icu/badge?page_id=hasanaliozkan-dev/extractreqs)

extractreqs is a tool to automatically extract and generate requirements.txt from Python source code by analyzing imports.

## How to Use

### Command Line

From your project root, run:

```bash
extractreqs . -o requirements.txt
```

This will analyze your source code and generate a requirements.txt file.

### As a Python Module

You can also use extractreqs in your own scripts:

```python
import extractreqs
reqs = extractreqs.extractreq(src_dir="/path/to/your/source", write=True)
print(reqs)
```

This will return a sorted list of requirements found in the given source directory.

* PyPI package: https://pypi.org/project/extractreqs/
* Free software: MIT License
* Documentation: https://extractreqs.readthedocs.io.

## Features

* TODO

## Credits

This package was created with [Cookiecutter](https://github.com/audreyfeldroy/cookiecutter) and the [audreyfeldroy/cookiecutter-pypackage](https://github.com/audreyfeldroy/cookiecutter-pypackage) project template.