Metadata-Version: 2.4
Name: lopjlb
Version: 0.1.7
Summary: LOPJLB quantitative equity research client — regime, signals, earnings intel (yfinance-shaped, BFF-backed)
Project-URL: Homepage, https://www.lopjlb.com
Project-URL: Documentation, https://www.lopjlb.com/developers
Project-URL: Repository, https://github.com/lopjlb/lopjlb
Author-email: LOPJLB <contact@lopjlb.com>
License: Proprietary
Keywords: earnings,finance,hmm,quantitative,screener,stocks
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: typer>=0.12
Provides-Extra: cli
Description-Content-Type: text/markdown

# lopjlb

Thin Python client + CLI for [LOPJLB](https://www.lopjlb.com) quantitative equity research.

Talks only to `https://www.lopjlb.com/bff/api/` (never `api.lopjlb.com`).

**Four peer surfaces over one BFF** (CLI does **not** call MCP):

| Surface | Install / use |
|---|---|
| REST | `curl https://www.lopjlb.com/bff/api/…` |
| CLI | `uv tool install lopjlb` · `brew install lopjlb/tap/lopjlb` · `curl -fsSL https://www.lopjlb.com/install.sh \| sh` |
| PyPI | `pip install lopjlb` / `import lopjlb` |
| HTTP MCP | Cursor / Claude → `POST /bff/api/mcp` (Enterprise hosts) |

**License:** Proprietary — not open source. Copyright © LOPJLB Research. All rights reserved.
See the repository [`LICENSE`](../../LICENSE). You may use this client only to access LOPJLB’s published services under LOPJLB’s terms; you may not relicense or redistribute it as free/open source.

## Install

```bash
# recommended
uv tool install lopjlb

# or
pipx install lopjlb
pip install lopjlb

# one-liner
curl -fsSL https://www.lopjlb.com/install.sh | sh

# Homebrew (after tap publish)
brew install lopjlb/tap/lopjlb
```

Free research needs **no browser** and **no API key**.

## Free (no account)

Sample single-name research — direction, HMM regime, thin `signal-card` teaser, earnings CallCards.
Full PF / composite packs need Pro or an Enterprise key. Anon freemium ticker routes: 30/min · 500/day.

```python
import lopjlb

print(lopjlb.regime())
t = lopjlb.Ticker("AAPL")
print(t.summary())       # direction, regime, teaser (+ next_actions via CLI)
print(t.intel())         # earnings CallCard / rollup
print(t.info)            # company profile
```

```bash
lopjlb ticker AAPL
lopjlb ticker AAPL intel
lopjlb regime
lopjlb hours           # world exchange open/closed (see /market-hours)
lopjlb treasuries      # US yield curve (see /treasury-rates)
lopjlb search NVDA
lopjlb schema          # CLI → REST map (not MCP)
lopjlb doctor
```

Stdout is JSON (pretty on a TTY). Errors go to stderr as JSON with `retryable`. Product research commands do not prompt; `lopjlb auth claim` is the exception (opens AuthKit and asks for the page code).

## Agent Registration (optional)

Bind a WorkOS user to an agent registration via AuthKit (claim UI is hosted by AuthKit — not lopjlb.com). Skill: `npx skills add lopjlb/lopjlb-skill`. Docs: https://www.lopjlb.com/auth.md

```bash
lopjlb auth claim --email you@example.com   # opens verification URI; paste page code
lopjlb auth token --print                   # short-lived Bearer for BFF REST
```

Claim does not grant Enterprise. Pro follows the claimed user’s Stripe/IAP entitlement. MCP still needs an API key.

## Enterprise (REST)

Mint a key in [Settings](https://www.lopjlb.com/settings) after a **live Enterprise entitlement** is active (browser once), then:

```bash
export LOPJLB_API_KEY=lopjlb_live_…
lopjlb screen                              # Pro REST via Enterprise key
lopjlb export signals --format csv --out signals.csv   # --out required
lopjlb intraday AAPL
```

```python
client = lopjlb.Client(api_key="lopjlb_live_…")
```

Optional MCP **debug** smoke (hosts should call `/mcp` directly):

```bash
lopjlb debug mcp tools
lopjlb debug mcp call get_market_regime
```

Errors: `401` bad key · `402` entitlement · `429` rate limit.

## Not included

Raw OHLCV dumps / FMP passthrough. Use sparklines / charts via the API or the stock page.
