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).
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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pykabutan-0.1.0-py3-none-any.whl
(12.7 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a243077db8947f3af1e2105770c098f3cec5a24ffcfab23f40408304b2502993
|
|
| MD5 |
9d1100a0f4180dfb498273520f75e5c1
|
|
| BLAKE2b-256 |
68cb16d337faabebbd243558cc819987f0730230a256096c359f1efb45e863ee
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70af5a32683dce4228f72ce15d8232d019cfb55db02b300fce9c7e1e4b19ff97
|
|
| MD5 |
8444dbe4dbbca03fbc32515a6d49aa9d
|
|
| BLAKE2b-256 |
042c6c1549e8ddd6c888b585c8a9f2d3b89f12779085f3ceac72de7a5385dd58
|