Skip to main content

DART 전자공시 + EDGAR 공시를 하나의 회사 맵으로 — Python 재무 분석 라이브러리

Project description


DartLab

DartLab

One stock code. The whole story.

DART + EDGAR filings, structured and comparable — in one line of Python.

PyPI Python License CI Coverage Docs Blog

Docs · Blog · Live Demo · Open in Colab · Open in Molab · 한국어 · Sponsor

HuggingFace Data

The Problem

A public company files hundreds of pages every quarter. Revenue trends, risk warnings, management strategy, competitive position — the complete truth about a company, written by the company itself.

Nobody reads it.

Not because they don't want to. Because the same information is named differently by every company, structured differently every year, and scattered across formats designed for regulators, not readers. The same "revenue" appears as ifrs-full_Revenue, dart_Revenue, SalesRevenue, or dozens of Korean variations. The same "business overview" is titled differently in every filing.

DartLab is built on one premise: every period must be comparable, and every company must be comparable. It normalizes disclosure sections into a topic-period grid (~95% mapping rate) and standardizes XBRL accounts into canonical names (~97% mapping rate) — so you compare companies, not filing formats.

Quick Start

uv add dartlab
import dartlab

c = dartlab.Company("005930")       # Samsung Electronics

c.sections                          # every topic, every period, side by side
# shape: (41, 12) — 41 topics across 12 periods
#                     2025Q4  2024Q4  2024Q3  2023Q4  ...
# companyOverview       v       v       v       v
# businessOverview      v       v       v       v
# riskManagement        v       v       v       v

c.show("businessOverview")          # what this company actually does
c.diff("businessOverview")          # what changed since last year
c.BS                                # standardized balance sheet
c.ratios                            # financial ratios, already calculated

# Same interface, different country
us = dartlab.Company("AAPL")
us.show("business")
us.ratios

# Ask in natural language
dartlab.ask("Analyze Samsung Electronics financial health")

No API key needed. Data auto-downloads from HuggingFace on first use, then loads instantly from local cache.

What DartLab Is

Two engines turn raw filings into one comparable map:

Layer Engine What it does Entry point
Data Data Pre-built HuggingFace datasets, auto-download Company("005930")
L0/L1 Company Sections horizontalization + account standardization c.show(), c.select()
L1 Scan Cross-company comparison across 13 axes dartlab.scan()
L1 Gather External market data (price, flow, macro, news) dartlab.gather()
L2 Analysis 14-axis storytelling analysis (6-act structure) c.analysis()
L2 Review Analysis to narrative report c.review()
L0 Search Semantic filing search (alpha) dartlab.search()
L3 AI Active analyst — code execution + interpretation dartlab.ask()
L4 UI Svelte SPA + VSCode extension dartlab share

Company

Design: ops/company.md

Three data sources — docs (full-text disclosures), finance (XBRL statements), report (DART API) — merged into one object. Data auto-downloads from HuggingFace, no setup needed.

c = dartlab.Company("005930")

c.index                         # what's available -- topic list + periods
c.show("BS")                    # view data -- DataFrame per topic
c.select("IS", ["매출액"])       # extract data -- finance or docs, same pattern
c.trace("BS")                   # where it came from -- source provenance
c.diff()                        # what changed -- text changes across periods

Scan — Cross-Company Comparison

Design: ops/scan.md

13 axes across 2,700+ companies. Governance, workforce, capital, debt, cashflow, audit, insider, quality, liquidity, digest, network, account, ratio.

dartlab.scan("governance")            # governance across all firms
dartlab.scan("ratio", "roe")          # ROE across all firms
dartlab.scan("cashflow")              # OCF/ICF/FCF + 8-pattern classification

Gather — External Market Data

Design: ops/gather.md

Price, flow, macro, news — all as Polars DataFrames.

dartlab.gather("price", "005930")             # KR OHLCV
dartlab.gather("price", "AAPL", market="US")  # US stock
dartlab.gather("macro", "FEDFUNDS")           # auto-detects US
dartlab.gather("news", "삼성전자")             # Google News RSS

Analysis — 14-Axis Financial Analysis

Design: ops/analysis.md

Revenue structure, profitability, growth, stability, cash flow, capital allocation — 14 axes that turn raw statements into a causal narrative. Each axis feeds into Review (reports), AI (interpretation), and humans (direct reading).

c.analysis("수익성")                   # profitability analysis
c.analysis("현금흐름")                 # cash flow analysis

Review — Analysis to Report

Design: ops/review.md

Assembles analysis into a structured report. 4 output formats: rich (terminal), html, markdown, json.

c.review()              # full report
c.reviewer()            # report + AI interpretation

Sample reports: Samsung Electronics · SK Hynix · Kia · HD Hyundai Heavy Industries · SK Telecom · LG Chem · NCSoft · Amorepacific

Search — Find Filings by Meaning (alpha)

Design: ops/search.md

No model, no GPU, no cold start. 95% precision on 4M documents — better than neural embeddings at 1/100th the cost.

dartlab.search("유상증자 결정")                     # find capital raise filings
dartlab.search("대표이사 변경", corp="005930")       # filter by company
dartlab.search("회사가 돈을 빌렸다")                 # natural language works too

AI — Active Analyst

Design: ops/ai.md

The AI writes and executes Python code using dartlab's full API. You see every line of code it runs. 60+ questions validated, 95%+ first-try success.

dartlab.ask("Analyze Samsung Electronics financial health")
dartlab.ask("Samsung analysis", provider="gemini")  # free providers available

Providers: gemini (free), groq (free), oauth-codex (ChatGPT subscription), openai, ollama (local), and more. Auto-fallback across providers when rate-limited.

Architecture

L0  core/        Protocols, finance utils, docs utils, registry
L1  providers/   Country-specific data (DART, EDGAR, EDINET)
    gather/      External market data (Naver, Yahoo, FRED)
    scan/        Market-wide cross-sectional analysis (13 axes)
L2  analysis/    Financial analysis + forecast + valuation
    review/      Block-template report assembly
L3  ai/          Active analyst — LLM with full API access
L4  ui/          Svelte SPA (web) + VSCode extension

Import direction enforced by CI. Adding a new country means one provider package — zero core changes.

EDGAR (US)

Same interface, different data source. Auto-fetched from SEC API — no pre-download needed.

# Korea (DART)                          # US (EDGAR)
c = dartlab.Company("005930")           c = dartlab.Company("AAPL")
c.sections                              c.sections
c.show("businessOverview")              c.show("business")
c.BS                                    c.BS
c.ratios                                c.ratios
c.diff("businessOverview")              c.diff("10-K::item7Mdna")

MCP — AI Assistant Integration

Built-in MCP server for Claude Desktop, Claude Code, Cursor, and any MCP-compatible client.

# Claude Code — one line setup
claude mcp add dartlab -- uv run dartlab mcp

# Codex CLI
codex mcp add dartlab -- uv run dartlab mcp
Claude Desktop / Cursor config

Add to claude_desktop_config.json or .cursor/mcp.json:

{
  "mcpServers": {
    "dartlab": {
      "command": "uv",
      "args": ["run", "dartlab", "mcp"]
    }
  }
}

Or auto-generate: dartlab mcp --config claude-desktop

OpenAPI — Raw Public APIs

from dartlab import OpenDart, OpenEdgar

# Korea (requires free API key from opendart.fss.or.kr)
d = OpenDart()
d.filings("삼성전자", "2024")
d.finstate("삼성전자", 2024)

# US (no API key needed)
e = OpenEdgar()
e.filings("AAPL", forms=["10-K", "10-Q"])

Data

All data is pre-built on HuggingFace — auto-downloads on first use. EDGAR data comes directly from the SEC API.

Dataset Coverage Size
DART docs 2,500+ companies ~8 GB
DART finance 2,700+ companies ~600 MB
DART report 2,700+ companies ~320 MB
EDGAR On-demand SEC API

Pipeline: local cache (instant) → HuggingFace (auto-download) → DART API (with your key). Most users never leave the first two.

Try It Now

Live Demo — no install, no Python

Notebooks: Company · Scan · Review · Gather · Analysis · Ask (AI)

Documentation

Docs · Quick Start · API Overview · Blog (120+ articles)

Stability

Tier Scope
Stable DART Company (sections, show, trace, diff, BS/IS/CF, CIS, index, filings, profile), EDGAR Company core, valuation, forecast, simulation
Beta EDGAR power-user (SCE, notes, freq, coverage), insights, distress, ratios, timeseries, network, governance, workforce, capital, debt, chart/table/text tools, ask/chat, OpenDart, OpenEdgar, Server API, MCP
Experimental AI tool calling, export

See docs/stability.md.

Contributing

Contributors are very welcome. Whether it's a bug report, a new analysis axis, a mapping fix, or a documentation improvement — every contribution makes dartlab better for everyone.

The one rule: experiment first, engine second. Validate your idea in experiments/ before changing the engine. This keeps the core stable while making it easy to try bold ideas.

  • Experiment folder: experiments/XXX_camelCaseName/ — each file must be independently runnable with actual results in its docstring
  • Data contributions (e.g. accountMappings.json, sectionMappings.json): accepted when backed by experiment evidence
  • Issues and PRs in Korean or English are both welcome
  • Not sure where to start? Open an issue — we'll help you find the right place

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

dartlab-0.8.0.tar.gz (14.8 MB view details)

Uploaded Source

Built Distribution

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

dartlab-0.8.0-py3-none-any.whl (15.2 MB view details)

Uploaded Python 3

File details

Details for the file dartlab-0.8.0.tar.gz.

File metadata

  • Download URL: dartlab-0.8.0.tar.gz
  • Upload date:
  • Size: 14.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dartlab-0.8.0.tar.gz
Algorithm Hash digest
SHA256 e05608314987e0e48d92566385f45b2927395d2ceb053eb7a2582156705ca42e
MD5 4f83d73b5c5e379a49d06cc5a2a82ca9
BLAKE2b-256 a4a80d63ada334a7aca4cedf0984e5e6dc56b7a2dbc6c6026d2fcd2d1b35b01b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dartlab-0.8.0.tar.gz:

Publisher: publish.yml on eddmpython/dartlab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dartlab-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: dartlab-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 15.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dartlab-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d35491da130f2ecfdba23f27daa7e5f6a9dff2ae32961cae9ffec137124dc09c
MD5 56f90cd72b4118756471af4d67c3874f
BLAKE2b-256 20666964905fc4132ffee0080d17bb825ff980c61f457af2740a30f515ac7efc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dartlab-0.8.0-py3-none-any.whl:

Publisher: publish.yml on eddmpython/dartlab

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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