semvec/pypi-packages huggingface dataset:
typja 0.1.3
Type checker for your Jinja2 templates
License: MIT
Requires Python: >=3.10
Keywords: jinja2, type checking, static analysis

# Typja

[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![Build and Test Typja](https://github.com/Daniel-Brai/Typja/actions/workflows/ci.yml/badge.svg)](https://github.com/Daniel-Brai/Typja/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/Daniel-Brai/Typja/branch/main/graph/badge.svg)](https://codecov.io/gh/Daniel-Brai/Typja)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

An experimental tool to check Jinja templates for type errors using Python's type hints. It parses Jinja templates, extracts variable usage, and checks them against provided type information.

## Features

- **Type Checking for Jinja2 Templates**: Validate that variables in your Jinja2 templates match their declared types
- **Python Type Hints Integration**: Leverage your existing Python type annotations to catch template errors early
- **Pre-commit Integration**: Built-in pre-commit hook for automated checking
- **Flexible Configuration**: Customize checking behavior with `typja.toml`
- **Rich Error Reports**: Detailed error messages with code snippets and suggestions
- **Watch Mode**: Monitor templates for changes and run checks automatically

## Quick Start

### Installation

```bash
pip install typja
```

### Basic Usage

```bash
# Check all templates in current directory
typja check

# Run in watch mode
typja watch

# Initialize a new typja.toml configuration
typja init
```

### Configuration

Create a `typja.toml` file in your project root with `typja init` or manually:

```toml
[project]
root = "."
paths = ["./models/**/*.py"]
fail_on_warning = false

[environment]
template_dirs = ["./templates"]
include_patterns = ["*.html", "*.jinja", "*.jinja2"]

[linting]
strict = false
prefer_pep604_unions = true
validate_imports = true
validate_variables = true

[errors]
verbosity = "normal"
show_snippets = true
show_hints = true
color = "auto"
```

## Type Annotations in Templates

Use special Jinja2 comments to declare variable types:

```jinja2
{# typja:var user: User #}
{# typja:var items: list[str] #}
{# typja:var count: int #}

<h1>{{ user.name }}</h1>
<ul>
  {% for item in items %}
    <li>{{ item }}</li>
  {% endfor %}
</ul>
```

## Examples

See the [examples/fastapi/](examples/fastapi/) directory for a complete FastAPI application with Jinja2 template type checking.

## Pre-commit Integration

Add to your `.pre-commit-config.yaml`:

```yaml
repos:
  - repo: https://github.com/Daniel-Brai/Typja
    rev: v0.1.3
    hooks:
      - id: typja-check
        # With args
        # args: ["--strict", "--fix"]
```

## Documentation

- [Configuration Guide](docs/CONFIGURATION.md) - Detailed configuration options
- [Syntax Guide](docs/SYNTAX.md) - Template syntax and type annotations

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development instructions.

## License

See [LICENSE](LICENSE) for details.
indexly 1.2.2
A local file indexing and search tool with FTS5, regex, and CSV analysis support.
License: MIT
Requires Python: >=3.8
Keywords: asyncio, csv, fts5, indexing, regex, search

# 🔍 Project Indexly

**Blazing-fast Local File Search Tool with SQLite FTS5, Tagging & Advanced Analysis**

> Privacy-first, offline file search made elegant.

---

![Python](https://img.shields.io/badge/Python-3.9%2B-blue)
![License](https://img.shields.io/badge/License-MIT-green)
![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux-lightgrey)

---

## 🚀 Overview

**Project Indexly** is a high-performance local file search and analysis tool powered by SQLite FTS5. It indexes your files, enriches them with metadata, and lets you search, tag, analyze, and export results efficiently — all **100% offline**.

Ideal for developers, researchers, writers, analysts, and anyone who works with large document collections.

---

## ✨ Key Features

* ⚡ **Fast full-text search** using FTS5
* 📁 Smart file-type detection (TXT, MD, CSV, XML, JSON, images & more)
* 🧠 **Advanced CSV & JSON analysis**
* 🕒 **Time-series visualization (CSV)**
* 🏷️ Tag management
* 📤 Export to CSV, Markdown, JSON
* 🔁 Real-time reindexing (optional)
* 🔒 Zero network calls — full privacy
* 🗂️ Rich metadata extraction (documents & images)
* 🎨 Colorized CLI output

---

## 📸 Screenshot

| Demo Preview                                               |
| ---------------------------------------------------------- |
| ![Preview](docs/static/images/plot.png) |

---

## 📦 Installation

```bash
git clone https://github.com/kimsgent/project-indexly.git
cd project-indexly
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

---

## ⚙️ Usage Examples

### 🔍 Index files

```bash
indexly index /path/to/folder
```

### 🧠 Search

```bash
indexly search "report OR analysis"
```

### 🏷️ Add tags

```bash
indexly tag add --files notes.txt --tags project meeting
```

### 📤 Export results

```bash
indexly search "invoice" --export-format csv --output invoices.csv
```

### 📊 Analyze CSV (summary + time-series)

```bash
indexly analyze-csv data.csv --auto-clean --show-summary
```

---

## 📁 Supported File Types

| Type    | Notes                    |
| ------- | ------------------------ |
| `.txt`  | Full-text indexed        |
| `.md`   | Markdown supported       |
| `.csv`  | Header-aware, analyzable |
| `.json` | NDJSON + structured JSON |
| `.xml`  | Structured tree analysis |
| Images  | Metadata extracted       |
| Others  | MIME-based detection     |

---

## 🧱 Project Structure

```text
indexly/
├── core/
├── cli/
├── utils/
├── analysis/
├── exports/
├── docs/
└── tests/
```

---

## 🛣️ Roadmap

* [x] CSV & JSON analyzers
* [x] Time-series visualization
* [ ] GUI
* [ ] Self-hosted web dashboard

---

## 📚 Documentation

👉 *“Project Indexly Docs”* — [https://projectindexly.com](https://projectindexly.com)

---

## 📬 Contact

✉️ [gentkims@gmail.com](mailto:gentkims@gmail.com)

---

## 👨‍💻 Author

**N. K Franklin-Gent** — built in Dieburg, Germany.
Co-created with ChatGPT 🤝

---

## 📝 License

MIT — see `LICENSE.txt`.