semvec/pypi-packages huggingface dataset:
atpcli 0.2.0
A Python CLI wrapper around the atproto package
License: MIT
Requires Python: >=3.10

# atpcli

A Python CLI wrapper around the [atproto](https://github.com/MarshalX/atproto) package for interacting with Bluesky.

## Documentation

Full documentation is available at [docs/](docs/):

- [Installation Guide](docs/install.md)
- [Quick Start Guide](docs/getting-started.md) - Learn how to get app passwords and use atpcli
- [Login Command](docs/usage-login.md)
- [Timeline Command](docs/usage-timeline.md)
- [Post Command](docs/usage-post.md)

Or serve the docs locally:

```bash
make docs-serve
```

## Quick Start

### Installation

Install globally using [uv](https://docs.astral.sh/uv/):

```bash
uv tool install atpcli
```

This installs `atpcli` as a global tool, making it available from anywhere in your terminal.

Or for development:

```bash
git clone https://github.com/phalt/atpcli.git
cd atpcli
make install
```

## Usage

### Login

⚠️ **Security Note**: Use Bluesky app passwords, not your main password! See the [Quick Start Guide](docs/getting-started.md) for instructions on creating an app password.

Login to your Bluesky account and save the session:

```bash
atpcli bsky login
```

You'll be prompted for your handle and password. The session will be saved to `~/.config/atpcli/config.json`.

### View Timeline

View your timeline:

```bash
atpcli bsky timeline
```

Options:
- `--limit N` - Show N posts (default: 10)
- `--p N` - Show page N (default: 1)

Example:
```bash
atpcli bsky timeline --limit 20
atpcli bsky timeline --p 2
```

### Post Messages

Create a post on Bluesky:

```bash
atpcli bsky post --message 'Hello, Bluesky!'
```

**Note:** When using special characters like `!`, use single quotes to avoid shell expansion issues. See the [Post Command documentation](docs/usage-post.md) for more details.

## Development

### Setup

```bash
make install
```

### Run tests

```bash
make test
```

### Build documentation

```bash
make docs-build
```

### Serve documentation locally

```bash
make docs-serve
```

### Format code

```bash
make format
```

### Clean build artifacts

```bash
make clean
```

## Requirements

- Python 3.10+
- uv package manager

## License

MIT
phi_save_codec 0.2.2
Phigros Cloud Save Codec Library
License: MIT
Requires Python: >=3.10

# Phi-Save-Codec-Bind-Python

Phi-Save-Codec 的 Python 绑定，用于解析和构建 Phigros 的云端存档格式。

## 安装

```bash
pip install -r requirements.txt
```

## 使用

```python
from phi_save_codec import PhiSaveCodec, PhiSaveCodecError

# 初始化编解码器
codec = PhiSaveCodec("phi_save_codec.wasm")

# 解析二进制数据
try:
    user_data = codec.parse_user(binary_data)
    print(user_data)
except PhiSaveCodecError as e:
    print(f"解析失败: {e}")

# 构建二进制数据
try:
    binary_data = codec.build_user(user_dict)
except PhiSaveCodecError as e:
    print(f"构建失败: {e}")
```

## 支持的操作

- `parse_user()` / `build_user()` - 用户数据
- `parse_summary()` / `build_summary()` - 摘要数据
- `parse_game_record()` / `build_game_record()` - 游戏记录
- `parse_game_progress()` / `build_game_progress()` - 游戏进度
- `parse_game_key()` / `build_game_key()` - 游戏密钥
- `parse_settings()` / `build_settings()` - 设置数据

## 异常处理

所有 API 方法在错误时抛出 `PhiSaveCodecError` 异常：

```python
try:
    data = codec.parse_user(binary_data)
except PhiSaveCodecError as e:
    # 获取详细的错误信息
    print(f"错误: {e}")
```

## 内存管理

该库自动处理与 WASM 模块之间的内存管理，包括：
- 分配和释放内存
- 获取和清空错误信息
- 确保在函数调用前后正确管理临时内存

## 依赖

- `msgpack` - 数据序列化
- `wasmtime` - WASM 运行时支持