Metadata-Version: 2.4
Name: rokeeru
Version: 0.1.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
License-File: LICENSE.MIT
Summary: An Agnostic, Zero-Boilerplate Locale Resource Discovery & Lifecycle Engine
License-Expression: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# rokeeru

多言語ロケールリソース自動検出・パース・キャッシュ管理エンジン (Python) / Multi-language Locale Resource Discovery, Parsing, and Caching Engine for Python

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square&logo=opensourceinitiative&logoColor=white)](https://github.com/DovahkiinYuzuko/rokeeru/blob/main/LICENSE.MIT)
![Python](https://img.shields.io/badge/Python-3776AB?style=flat-square&logo=python&logoColor=white)

[日本語](#日本語) | [English](#english)

---

## 日本語

### 概要

`rokeeru` は、Python アプリケーション（FastAPI, Flask, Django 等）において、ディレクトリ内の多言語ロケールファイル（JSON, YAML, TOML）を自動検出・ロード・キャッシュし、未翻訳キーのフォールバック補填を提供するライブラリです。
Rust コアエンジンを PyO3 ネイティブバインディングを介して呼び出すことで、高速かつ安全なデータリソース管理を実現します。

### インストール

```bash
pip install rokeeru
```

### 使い方

```python
from rokeeru import RokeeruLoader

# ディレクトリパスとデフォルト言語（フォールバック用）を指定して初期化
loader = RokeeruLoader("./locales", "en")

# ロケールファイルを読み込み
loader.load()

# 利用可能なロケールコード一覧を取得
print(loader.languages())  # ['en', 'ja', 'fr']

# 指定ロケールの翻訳データ（Python 辞書型）を取得
ja_data = loader.get("ja")
print(ja_data)
```

### LICENSE

このプロジェクトのライセンスは MIT ライセンスです。詳しくは [LICENSE.MIT](https://github.com/DovahkiinYuzuko/rokeeru/blob/main/LICENSE.MIT) をお読みください。また、サードパーティライセンスは [NOTICE.md](https://github.com/DovahkiinYuzuko/rokeeru/blob/main/NOTICE.md) に表記してあります。

---

## English

### Overview

`rokeeru` is a library for Python applications (FastAPI, Flask, Django, etc.) that automatically discovers, loads, caches, and provides key-level fallback for multi-language locale files (JSON, YAML, TOML) in a directory.
Powered by a Rust core engine via PyO3 native bindings, it delivers high-performance, thread-safe resource management.

### Installation

```bash
pip install rokeeru
```

### Usage

```python
from rokeeru import RokeeruLoader

# Initialize with locales directory path and default fallback language
loader = RokeeruLoader("./locales", "en")

# Load locale files
loader.load()

# Get list of available locale codes
print(loader.languages())  # ['en', 'ja', 'fr']

# Retrieve parsed locale data for a specific language
ja_data = loader.get("ja")
print(ja_data)
```

### LICENSE

This project is licensed under the MIT License. See [LICENSE.MIT](https://github.com/DovahkiinYuzuko/rokeeru/blob/main/LICENSE.MIT) for details. Third-party licenses are documented in [NOTICE.md](https://github.com/DovahkiinYuzuko/rokeeru/blob/main/NOTICE.md).

