Skip to main content

Query Japanese open data on Queria (data.queria.io) from the terminal, Python, and MCP

Project description

queria

Query Japanese open data on Queria from the terminal, Python, and MCP.

Queria が公開する日本のオープンデータ(e-Stat、国土数値情報、EDINET、気象庁ほか)を、ターミナル・Python・MCP から read-only で探索するクライアントです。データは DuckLake 形式で公開されており、計算はすべて手元の DuckDB で行われます。

インストール

uvx queria list          # インストール不要で実行
pip install queria       # または通常インストール

Python 3.10+ が必要です。

使い方

queria list                              # データセット一覧
queria search 人口                        # データセット・テーブル・カラムの横断検索
queria info e_stat                       # メタデータ(ライセンス・出典など)
queria schema e_stat                     # テーブル一覧
queria columns e_stat mart_population    # カラム一覧
queria summarize zipcode.main.zipcodes   # カラム統計(全件スキャン)
queria sql "SELECT * FROM zipcode.main.zipcodes LIMIT 10"
queria sql "SELECT * FROM zipcode.main.zipcodes" --out zipcodes.parquet

テーブルは <dataset>.<schema>.<table> で参照します。参照したデータセットは自動的に ATTACH されます。

API トークン

トークンなしでも使えますが、レートリミットがあります。https://queria.io/profile/api-keys で発行したトークンを登録すると上限が上がります:

queria auth set-token <token>   # ~/.config/queria/config.toml に保存
queria auth status              # 確認

--token オプションや環境変数 QUERIA_TOKEN でも指定できます(この順で優先)。

Python API

import queria

with queria.connect() as conn:
    conn.sql("SELECT * FROM catalog.main.mart_datasets").show()

MCP サーバー

Claude Code / Claude Desktop / Cursor などの MCP クライアントから使えます:

{
  "mcpServers": {
    "queria": {
      "command": "uvx",
      "args": ["--from", "queria[mcp]", "queria", "mcp"]
    }
  }
}

ドキュメント

https://docs.queria.io/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

queria-0.2.0.tar.gz (88.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

queria-0.2.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file queria-0.2.0.tar.gz.

File metadata

  • Download URL: queria-0.2.0.tar.gz
  • Upload date:
  • Size: 88.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for queria-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dd18bba638481a379e8c257bfbafa05cb859a1d0520e054e7aa3ad7fae89a178
MD5 d7a6cf3c6e1e5c11d2ac54ca5ca1e7c8
BLAKE2b-256 1f212f0a3bb852302604823c76ded7b275770523d5deaad293903c082d597098

See more details on using hashes here.

Provenance

The following attestation bundles were made for queria-0.2.0.tar.gz:

Publisher: release.yml on queria-io/queria-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file queria-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: queria-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for queria-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 843d9287c42d60920ce3ec72e523509e32e7c6529c136d49d80db6cca82693b8
MD5 14fb1c43ae5b16fcea3a8c9e30a3de86
BLAKE2b-256 22ae24d93cde8bfab3cf60c4a9541bf5a8e03d44d02680878eadf367c16584b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for queria-0.2.0-py3-none-any.whl:

Publisher: release.yml on queria-io/queria-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page