Skip to main content

A clean, beginner-friendly Python library for scraping kabutan.jp

Project description

pykabutan

A clean, beginner-friendly Python library for scraping kabutan.jp (Japanese stock information site).

Open In Colab Documentation

Installation

pip install pykabutan

Quick Start

import pykabutan as pk

# Get stock information
ticker = pk.Ticker("7203")  # Toyota
print(ticker.profile.name)      # トヨタ自動車
print(ticker.profile.market)    # 東証P
print(ticker.profile.per)       # 10.5

# Get price history (yfinance-style)
df = ticker.history(period="30d")
print(df)

# Search by industry
results = pk.search_by_industry("電気機器")
for t in results:
    print(t.code, t.name)

# Search by theme
results = pk.search_by_theme("AI")

Features

  • Simple, yfinance-style API
  • Lazy loading for performance
  • Works out of the box with sensible defaults
  • No Selenium dependency (lightweight)

Development

# Install dependencies
uv sync

# Run tests
uv run pytest

# Run integration tests (real HTTP)
uv run pytest -m integration

# Format code
uv run ruff format .

# Lint
uv run ruff check .

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

pykabutan-0.1.0.tar.gz (133.3 kB view details)

Uploaded Source

Built Distribution

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

pykabutan-0.1.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file pykabutan-0.1.0.tar.gz.

File metadata

  • Download URL: pykabutan-0.1.0.tar.gz
  • Upload date:
  • Size: 133.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for pykabutan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a243077db8947f3af1e2105770c098f3cec5a24ffcfab23f40408304b2502993
MD5 9d1100a0f4180dfb498273520f75e5c1
BLAKE2b-256 68cb16d337faabebbd243558cc819987f0730230a256096c359f1efb45e863ee

See more details on using hashes here.

File details

Details for the file pykabutan-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pykabutan-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for pykabutan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70af5a32683dce4228f72ce15d8232d019cfb55db02b300fce9c7e1e4b19ff97
MD5 8444dbe4dbbca03fbc32515a6d49aa9d
BLAKE2b-256 042c6c1549e8ddd6c888b585c8a9f2d3b89f12779085f3ceac72de7a5385dd58

See more details on using hashes here.

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