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.1.tar.gz (88.3 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.1-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: queria-0.2.1.tar.gz
  • Upload date:
  • Size: 88.3 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.1.tar.gz
Algorithm Hash digest
SHA256 f0895f5232e06fbd08712941c5733bc7ad9d16e91537c44a86b0381419b00794
MD5 dea83e376c0df1207725d744ac0c0eeb
BLAKE2b-256 84e667192b26fc0cbb6fbb5f69587e3f9b8c0fba09b5784fe02ec480f85772d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for queria-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: queria-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c56547ff0db262b18b2a68097dc45fd1529bd5b5760c4c9f2e687a84da4e727
MD5 e3585396ba754cfd17b6a9c41b474a34
BLAKE2b-256 101bd3b4dc536ca81071a97d6228a7de11831c0231dc788de459c4e719678bff

See more details on using hashes here.

Provenance

The following attestation bundles were made for queria-0.2.1-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