> ## Documentation Index
> Fetch the complete documentation index at: https://jmail.world/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# JmailClient

> JmailClient のコンストラクタと設定

## コンストラクタ

```python theme={null}
JmailClient(cache=True)
```

新しいクライアントインスタンスを生成します。

### パラメータ

**cache** `bool` (default: True)

ローカルの ETag ベースのファイルキャッシュを `~/.cache/jmail/` 配下で有効にします。常に最新データをダウンロードするには `False` に設定します。

### 使用例

```python theme={null}
from jmail import JmailClient

# デフォルト: キャッシュが有効
client = JmailClient()

# キャッシュを無効化
client = JmailClient(cache=False)
```

## メソッド

| メソッド | 戻り値 | 説明 |
| - | - | - |
| [`manifest()`](https://jmail.world/docs/ja/api-reference/jmail-client#manifest) | `dict` | データセットメタデータを含む API マニフェスト |
| [`emails(slim)`](https://jmail.world/docs/ja/api-reference/emails) | `DataFrame` | メールアーカイブ |
| [`documents(include_text)`](https://jmail.world/docs/ja/api-reference/documents) | `DataFrame` | ドキュメントのメタデータ／テキスト |
| [`photos()`](https://jmail.world/docs/ja/api-reference/photos) | `DataFrame` | 写真のメタデータ |
| [`people()`](https://jmail.world/docs/ja/api-reference/people) | `DataFrame` | 識別済み人物 |
| [`photo_faces()`](https://jmail.world/docs/ja/api-reference/photo-faces) | `DataFrame` | 顔のバウンディングボックス |
| [`imessage_conversations()`](https://jmail.world/docs/ja/api-reference/imessages) | `DataFrame` | iMessage 会話 |
| [`imessage_messages()`](https://jmail.world/docs/ja/api-reference/imessages) | `DataFrame` | iMessage メッセージ |
| [`star_counts()`](https://jmail.world/docs/ja/api-reference/star-counts) | `DataFrame` | クラウドソーシングによるスター数 |
| [`release_batches()`](https://jmail.world/docs/ja/api-reference/release-batches) | `DataFrame` | リリースバッチ情報 |
| [`url(dataset, fmt)`](https://jmail.world/docs/ja/api-reference/jmail-client#url) | `str` | データセットの生 URL |

## `manifest()`

データセットのメタデータとチェックサムを含む API マニフェストを取得します。

```python theme={null}
manifest = client.manifest()
print(manifest)
```

**戻り値:** `dict` -- `data.jmail.world/v1/manifest.json` から取得した JSON を解析した結果

## `url(dataset, fmt="parquet")`

データセットファイルの生のURLを取得します。DuckDB、Polars、その他HTTP経由でParquetを読み込めるツールに直接渡すのに便利です。

```python theme={null}
url = client.url("emails-slim")
# "https://data.jmail.world/v1/emails-slim.parquet"

url = client.url("documents", fmt="ndjson.gz")
# "https://data.jmail.world/v1/documents.ndjson.gz"
```

**dataset** `str` *required*

データセット名。次のいずれかです: `emails`, `emails-slim`, `documents`, `photos`, `people`, `photo_faces`, `imessage_conversations`, `imessage_messages`, `star_counts`, `release_batches`.

**fmt** `str` (default: parquet)

ファイル形式。`parquet` または `ndjson.gz` のいずれかです。

**戻り値:** `str` -- 完全な URL を表す文字列


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.