semvec/pypi-packages huggingface dataset:
kvenv 0.1.0
Run commands with environment variables resolved from Azure Key Vault
License: MIT
Requires Python: >=3.9
Keywords: azure, keyvault, env, environment, secrets

# kvenv - Secure .env while vibe coding with Azure Key Vault

kvenv is a command-line tool to securely manage environment variables by fetching secrets from Azure Key Vault based on references in a `.env` file.

Avoid storing sensitive information in `.env` files by referencing secrets stored securely in Azure Key Vault. kvenv reads a `.env` file, fetches secrets from Key Vault as needed, and runs the specified command with those environment variables set. 

This avoids secret leakage while vibe coding and prevents LLMs from seeing sensitive secrets in your local development environment while still using environment variables in your applications or scripts.

It is inspired in 1password's `op run` command for securely injecting secrets into environment variables.

## Installation

```bash
pip install kvenv
```

### Usage

Create a `.env` file referencing your Key Vault secrets:

```
# .env
# Explicitly specify vault
DATABASE_URL=kv://my-key-vault/DATABASE-URL
API_KEY=kv://my-key-vault/API-KEY
# Use default vault from KEYVAULT env var or with -v 
TOKEN_ID=kv://TOKEN-ID
DEBUG=true
```

Then prepend the kvenv command to your usual command:

```bash
# Uses .env and default vault from KEYVAULT environment variable
KEYVAULT=my-kv kvenv -- npm run dev

# You can specify a different .env file name or a default vault
kvenv -e .env.ref -v my-kv -- npm run dev

# --env-file or -e : specify .env file (default: .env)


# Python example 
kvenv -- python app.py

# Rails example
kvenv -- rails server

# Per-secret vault override inside file
# DATABASE_URL=kv://some-kv/DATABASE-URL
```

## Supported .env File Format

- Lines: `KEY=VALUE`
- Comments: lines starting with `#` (optionally preceded by whitespace)
- Blank lines allowed
- Optional leading `export ` supported
- Quoted values supported: `"..."` or `'...'`
- VALUE may contain `=`

### Key Vault References

```
# Use default vault (via KEYVAULT env var or -v flag)
DATABASE_URL=kv://DATABASE-URL

# Specify vault explicitly
API_KEY=kv://my-other-vault/API-KEY

# Non kv:// values are passed through unchanged
DEBUG=true
```

## Requirements

- Azure CLI installed (`az`)
- You are authenticated: `az login`
- Access to Key Vault secrets (get permission)

## Development

### Clone the Repository

```bash
git clone https://github.com/merlos/kvenv.git
cd kvenv
```

### Install in Development Mode

```bash
# Install package in editable mode with dev dependencies
pip install -e ".[dev]"
```

### Run Tests

```bash
# Run all tests
pytest

# Run with verbose output
pytest -v

# Run with coverage
pytest --cov=kvenv --cov-report=term-missing
```

### Testing the CLI

After installing in development mode, you can test the `kvenv` command directly:

```bash
# Create a test .env file
echo "FOO=bar" > test.env

# Run a command with the environment
kvenv -e test.env -- env | grep FOO
```

## License
Distributed under MIT License Copyright (c) 2026 @merlos
ppputils 0.0.3
Peter Puff Private Utils - 实用的Python工具库
License: MIT
Requires Python: >=3.6
Keywords: utils print ip format logging

# ppputils

Peter Puff Private Utils - 实用的Python工具库

## 功能特性

### format_utils - 增强的print功能

- ✅ **自动替换全局print**：一次导入，全局生效
- ✅ **带时间戳和文件名行号**：自动记录打印位置
- ✅ **支持set_args**：自定义参数显示
- ✅ **多种print函数**：debug、error、warning等快捷函数

### ip_utils - 全球最快获取公网IP

- ✅ **全球CDN优化**：使用最快的全球CDN服务
- ✅ **自动过滤私有IP**：过滤127.0.0.1等无效IP
- ✅ **多种获取方式**：HTTP、DNS、STUN、UPnP等
- ✅ **详细信息支持**：获取地理位置、ISP等信息

## 快速开始

### 安装

```bash
pip install ppputils
```

### 使用示例

#### format_utils - 增强的print

```python
# 简单版本（推荐）
from ppputils import print

print("Hello World")
# 输出: [2026-01-23 14:50:00.123] [example.py:3] Hello World

# 自定义版本（支持set_args）
from ppputils.format_utils import print
print.set_args(user_id=123, request_id="req-001")
print("处理请求")
# 输出: [2026-01-23 14:50:00.123] [example.py:6] [user_id:123] [request_id:req-001] 处理请求
```

#### ip_utils - 获取公网IP

```python
from ppputils.ip_utils import get_pub_ip_fast

# 全球最快获取IP（推荐）
ip = get_pub_ip_fast()
print(f"我的公网IP: {ip}")

# 获取详细信息
from ppputils.ip_utils import get_pub_ip_with_detail
details = get_pub_ip_with_detail()
if details:
    print(f"IP: {details.get('ip')}")
    print(f"位置: {details.get('city')}, {details.get('country')}")
```

## 详细文档

更多使用说明请查看 [USAGE.md](USAGE.md)

## 许可证

MIT License

## 作者

Peter Puff

## 项目地址

https://github.com/puffhub/ppputils
ASnooper 1.0.0
Asynchronous PySnooper
License: MIT
Keywords: async PySnooper debug debugger logging

## ASnooper
**ASnooper** is the asynchronous version of **Pysnooper**, incorporating most of its functionality for easy **debugging** in async functions as an alternative to print statements.


## Installation
```console
$ pip install ASnooper
```

## Example

Here is a base common func. While adding the `@snoop()` decorator:

```Python
import asyncio
from ASnooper import snoop


@snoop(prefix="name")
async def print_name(name: str) -> str:
    await asyncio.sleep(2)  # io

    name = f"hello {name}"  # modify var

    return name


async def main():
    await print_name("Ling")


if __name__ == '__main__':
    asyncio.run(main())
```

The output is:
```
name  11:53:19     call    5 print_name()
name           var: name = 'Ling'
name  11:53:19     line    7 print_name() await asyncio.sleep(2)    # io
name  11:53:21     call    7 print_name()
name           var: name = 'Ling'
name  11:53:21     line    9 print_name() name = f"hello {name}"    # modify var
name  11:53:21     line   11 print_name() return name
name      modified: name = 'hello Ling'
name  11:53:21   return   11 print_name()
name         watch: return = 'hello Ling'
name  Elapsed time: 2001.539ms
```

Or if you don't want to trace an entire function, you can use `async with snoop_context()`:
```Python
import asyncio
from ASnooper import snoop_context


async def print_name(name: str) -> str:
    await asyncio.sleep(2)   # io

    name = f"hello {name}"   # modify var | no trace

    async with snoop_context(prefix="name-context"):
        name += f"-context"  # modify var | trace

    return name


async def main():
    await print_name("Ling")


if __name__ == '__main__':
    asyncio.run(main())
```

The output is:
```
name-context 14:11:24     line   11 print_name() name += f"-context"   # modify var, will trace
name-context          var: name = 'hello Ling'
name-context 14:11:24     line   10 print_name() async with snoop_context(prefix="name-context"):
name-context     modified: name = 'hello Ling-context'
```

## More
Output stderr to file:
```Python
@snoop(output='debug.log')
```
See values of some expressions that aren't local variables:
```Python
@snoop(watch=('user.id',))
```
No color output:
```Python
@snoop(color=False)
```