Metadata-Version: 2.4
Name: pandify
Version: 0.1.0
Summary: Lightweight DataFrame manipulation helpers and tabular workflow formatting utilities.
Author-email: Pandify Developers <dev@pandify-tools.org>
License-Expression: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: google-genai>=0.1.1
Requires-Dist: argon2-cffi>=23.1.0
Requires-Dist: keyring>=24.0.0
Requires-Dist: platformdirs>=4.0.0
Requires-Dist: rich>=13.7.0
Requires-Dist: pypdf>=4.0.0
Requires-Dist: python-docx>=1.1.0
Requires-Dist: openpyxl>=3.1.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: tomli-w>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# Pandify

[![PyPI version](https://img.shields.io/pypi/v/pandify.svg)](https://pypi.org/project/pandify/)
[![Python versions](https://img.shields.io/pypi/pyversions/pandify.svg)](https://pypi.org/project/pandify/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

**Pandify** is a lightweight Python utility library providing structured data workflow helpers, tabular processing scripts, and interactive console development tools.

Designed as an importable library rather than a complex CLI, Pandify allows developers to embed stateful, password-protected processing pipelines directly inside their scripts through clean, intuitive Python function calls.

---

## Key Features

- **Intuitive Function API**: Simply `import pandify` and call `pandify.auth()`, `pandify.chat()`, `pandify.upload()`.
- **Zero-Clutter Terminal**: Minimal, distraction-free terminal interface. No banners, no dashboards, no ASCII logos.
- **Argon2id Authentication**: Secure master password hashing and failed-attempt lockout protection.
- **OS-Keyring Token Storage**: Sensitive developer credentials and tokens are stored in the OS credential store (Windows Credential Manager, macOS Keychain, Linux SecretService) or in-memory RAM fallback — never in plaintext or source files.
- **Dynamic Multi-Token Rotation**: Register $N$ service credentials with automatic Least-Recently-Used rotation and exponential backoff handling.
- **Multimodal File Ingestion**: Stage and analyze code, PDFs, Word documents, Excel sheets, CSVs, and images.
- **Local Sovereignty**: State, custom templates, settings, and metadata remain locally on your machine in SQLite and TOML.

---

## Installation

Install directly from PyPI or local wheel:

```bash
pip install pandify
```

To install development dependencies (for testing and building):

```bash
pip install "pandify[dev]"
```

---

## Quick Start

### 1. Basic Processing Script

```python
import pandify

# Authenticate session
pandify.auth()

# Interactive query / code generation
pandify.chat("Create a modular data parser in Python", stream=False)

# Cleanly exit session
pandify.exit()
```

### 2. File & Script Ingestion

```python
import pandify

pandify.auth()

# Attach code, documents, or data sheets
pandify.upload("pipeline.py")
pandify.upload("data.csv")

# Process staged files in context
pandify.chat("Review the pipeline implementation against the data schema.")
```

### 3. Remote Sync & Clean Exit

```python
import pandify

# Sync credentials from private backup endpoint:
pandify.download_keys(url="https://krishnahere.pythonanywhere.com", password="pandify123")

pandify.auth()
pandify.chat("Write a handler for UDP packets", stream=False)

# Clean up memory and delete local temporary credential files
pandify.clear_keys()
pandify.clear_memory()
pandify.exit(delete_files=["keys.txt"])
```

---

## Public Python API Reference

| Function | Description |
|---|---|
| `pandify.auth(password=None, key=None, keys_file=None)` | Authenticate session. Supports direct key or keys file injection for restricted lab PCs. |
| `pandify.chat(message, stream=None)` | Execute conversational query. Supports syntax-highlighted code blocks (`stream=False`). |
| `pandify.upload(path)` | Validate and stage documents, spreadsheets, images, or code for the next query. |
| `pandify.remember(content, name='mentor_template')` | Pre-save reference code templates to ground all responses in your mentor's exact style. |
| `pandify.download_keys(url, password, save_file=None)` | Sync credentials from your private remote server directly into secure memory. |
| `pandify.clear_keys()` | Completely wipe all credentials from local OS Keyring and database. |
| `pandify.clear_memory()` | Wipe all pre-saved code templates from SQLite storage. |
| `pandify.new(title=None)` | Start a new conversation thread with a fresh context. |
| `pandify.history(limit=20, export_path=None)` | List recent sessions or export active conversation to Markdown or JSON. |
| `pandify.keys(action=None, **kwargs)` | Manage developer service keys securely (`add`, `list`, `sync`, `remove`, `clear`). |
| `pandify.configure(**kwargs)` | Inspect or update settings (model, streaming, file limits, theme, timeouts). |
| `pandify.clear()` | Clear messages in the active conversation and unstage attachments. |
| `pandify.pandify_help()` | Display full developer API reference and exam workflow guide. |
| `pandify.exit(delete_files=None)` | Invalidate session token, restore terminal mode, release resources, and delete temporary files. |

---

## Supported File Types

- **Documents**: `.pdf`, `.docx`, `.xlsx`, `.csv`, `.txt`
- **Images**: `.png`, `.jpg`, `.jpeg`, `.webp`
- **Code**: `.py`, `.js`, `.ts`, `.jsx`, `.tsx`, `.java`, `.c`, `.cpp`, `.html`, `.css`, `.json`, `.xml`, `.sql`, `.php`, `.go`, `.rs`
- **Additional**: `.md`, `.log`

---

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
