Metadata-Version: 2.4
Name: pykabu-calendar
Version: 0.3.2
Summary: Japanese earnings calendar aggregator
Project-URL: Homepage, https://github.com/obichan117/pykabu-calendar
Project-URL: Documentation, https://obichan117.github.io/pykabu-calendar
Project-URL: Repository, https://github.com/obichan117/pykabu-calendar
Author-email: obichan117 <obichan117@gmail.com>
License-Expression: MIT
Keywords: calendar,earnings,japan,scraping,stock
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=5.0.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: pykabutan>=0.1.0
Requires-Dist: requests>=2.31.0
Provides-Extra: all
Requires-Dist: mkdocs-material>=9.5.0; extra == 'all'
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'all'
Requires-Dist: ollama>=0.1.0; extra == 'all'
Requires-Dist: playwright>=1.40.0; extra == 'all'
Requires-Dist: pytest>=8.0.0; extra == 'all'
Provides-Extra: browser
Requires-Dist: playwright>=1.40.0; extra == 'browser'
Provides-Extra: dev
Requires-Dist: mkdocs-material>=9.5.0; extra == 'dev'
Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Provides-Extra: llm
Requires-Dist: ollama>=0.1.0; extra == 'llm'
Description-Content-Type: text/markdown

# pykabu-calendar

Japanese earnings calendar aggregator.

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/obichan117/pykabu-calendar/blob/main/examples/quickstart.ipynb)

## Installation

```bash
pip install pykabu-calendar
```

For SBI scraping (requires browser):
```bash
pip install pykabu-calendar
pip install playwright && playwright install chromium
```

## Quick Start

```python
import pykabu_calendar as cal

# Get earnings calendar for a specific date
df = cal.get_calendar("2026-02-10")

# Include SBI (requires Playwright)
df = cal.get_calendar("2026-02-10", include_sbi=True)

# Without historical inference (faster)
df = cal.get_calendar("2026-02-10", infer_from_history=False)

# Export to CSV
cal.export_to_csv(df, "earnings.csv")
```

## Output Columns

| Column | Description |
|--------|-------------|
| `code` | Stock code (e.g., "7203") |
| `name` | Company name |
| `datetime` | Best estimate datetime |
| `candidate_datetimes` | List of candidate datetimes (most likely first) |
| `sbi_datetime` | Datetime from SBI (if available) |
| `matsui_datetime` | Datetime from Matsui |
| `tradersweb_datetime` | Datetime from Tradersweb |
| `inferred_datetime` | Datetime inferred from history |
| `past_datetimes` | List of past earnings datetimes |

## Features

- Aggregates earnings calendars from SBI, Matsui, Tradersweb
- Infers announcement time from historical patterns (via pykabutan)
- Centralized URL configuration for easy maintenance
- Modern User-Agent for reliable scraping
- Exports to CSV (Google Sheets compatible)

## Data Source Priority

1. **Inferred + Source match** - When inferred time matches a source
2. **Inferred** - From historical patterns
3. **SBI** - Primary public source (requires Playwright)
4. **Matsui/Tradersweb** - Lightweight sources (default)

## Documentation

Full documentation: https://obichan117.github.io/pykabu-calendar

## License

MIT
