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[:5]:
    print(t.code, t.profile.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.1.tar.gz (133.2 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.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pykabutan-0.1.1.tar.gz
  • Upload date:
  • Size: 133.2 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.1.tar.gz
Algorithm Hash digest
SHA256 f49844e7ed1d3f37a763d19e69ea8500ecff60ea42ab28143c1690d7c3dd34da
MD5 d46a5bcc4eb3572eaca4a6659e3a6c2b
BLAKE2b-256 e5c3494273dd7d1cbc2d37dc7fd34bcc0d01d693f8838e44bdaa740c317ef0f7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pykabutan-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 281eebba1c0bcca189fa3be5766c02f7133f3f7b8d47dcfeabdc4705fe39cce2
MD5 28a0fef28a6c257b65f967dcadf4406c
BLAKE2b-256 bfe92de09439ee368dd1e63cc27bba96311658fc2c5080103f5a84c77ffd84e6

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