Skip to main content

Kabukit Logo

Kabukit

日本の株式分析を、もっと手軽に、もっと速く


kabukit は、J-Quants と EDINET のデータを、コマンドラインや Python コードから快適に扱うためのモダンなツールキットです。

なぜ kabukit なのか?

日本株の投資分析には、様々なデータソースへのアクセスが必要です。しかし、それぞれの API は仕様が異なり、データ取得だけで多くの時間を費やしてしまいます。kabukit は、こうした課題を解決します。

ターミナルから即座にデータ取得

API の認証設定が対話形式で簡単に完了。kabu get prices --all の一行で、全上場銘柄の 10 年分1 の株価データが手に入り、すぐに分析を始められます。

ノートブックで快適な分析体験

await get_statements() と書くだけで、全上場銘柄の財務情報を非同期で並列取得。Polars によるデータフレーム操作で、数千銘柄のデータも瞬時に処理できます。

賢いキャッシュで高速アクセス

一度取得したデータはローカルに保存され、次回からは瞬時にアクセス可能。ネットワークアクセスを待つことなく、何度でも試行錯誤できます。

モダンな技術スタックで高速処理

httpx の非同期処理により、複数銘柄のデータを並列取得。従来の同期的なアプローチと比べ、データ取得時間を大幅に短縮します。

1 J-Quants API スタンダードプラン利用時。詳しくは J-Quants API のプラン表を参照してください。

クイックスタート

インストール

Python 3.12 以上が必要です。

pip install kabukit

または

uv add kabukit

CLI で使う

インストールしたら、まずは認証設定から始めましょう。

# J-Quants API の認証(対話形式)
kabu auth jquants

# 全銘柄情報を取得
kabu get info

# トヨタ自動車の財務情報を取得
kabu get statements 7203

Python で使う

つぎに、Jupyter や marimo などのノートブックで使ってみましょう。

from kabukit import get_info, get_prices

# 全銘柄情報を取得
df_info = await get_info()

# トヨタ自動車の株価を取得
df_prices = await get_prices("7203")

主な機能

2つの API を統一的に扱える

  • J-Quants API: 上場銘柄情報、財務情報、株価四本値など
  • EDINET API: 有価証券報告書などの開示書類

異なる API の仕様差を吸収し、同じインターフェースで利用できます。

高速なデータ処理

  • Polars: Rust ベースの高速データフレームライブラリ
  • httpx: 非同期 HTTP クライアントによる並列データ取得
  • キャッシュ機構: 取得済みデータの再利用で、分析の試行錯誤を高速化

柔軟な利用方法

  • CLI: スクリプト不要で、ターミナルから直接データ取得
  • Python API: ノートブック環境での対話的な分析に最適
  • キャッシュ活用: CLI で取得したデータを Python から読み込み可能

ドキュメント

詳しい使い方は、公式ドキュメントを参照してください。

kabukit ドキュメント

  • CLI の使い方 - 認証設定、データ取得、キャッシュ管理
  • Python API の使い方 - 各種情報を Python から取得する方法。モジュール関数と Client クラスの使い分け

ライセンス

MIT License

Metadata

Release files for kabukit 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kabukit 0.20.0
File Size Uploaded Provenance
kabukit-0.20.0.tar.gz 37.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kabukit 0.20.0
File Interpreter ABI Platform
kabukit-0.20.0-py3-none-any.whl Python 3 none any Details

Total release size: 99.0 kB

Release files / kabukit-0.20.0.tar.gz

Download URL kabukit-0.20.0.tar.gz
Size 37.9 kB
Tags Source
SHA-256 checksum
How to use checksums
781ddf990bfc371c0b7ff8309c345dc7f4d10c66469ad14db86bf824ba34369c
BLAKE2b-256 checksum
How to use checksums
1ace6a2b05f0acd9937bd3c8220fca2d5ffd1266c4bf77440ba8c7bd01f03e3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / kabukit-0.20.0-py3-none-any.whl

Download URL kabukit-0.20.0-py3-none-any.whl
Size 61.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27b45e90d175179338acb6681f87959e7e2a15fe8bbd9425f3396a0805e6b33c
BLAKE2b-256 checksum
How to use checksums
825068702152e17b137dd5438d057463c0e3d686b3a65cfb897629ccb3e3db62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for kabukit 0.20.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.20.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page