Typed Python client for the Finkovsky API.
Project description
Finkovsky SDK — Python
Typed Python client for the Finkovsky API — technical analysis, equity data, Taiwan market, and economic indicators.
pip install finkovsky
Requires Python 3.10+.
Three Ways to Use
1. Agent / LLM tool call (synchronous)
from finkovsky import Client, CreditError, RateLimitError
fk = Client(api_key="sk-...") # or set FINKOVSKY_API_KEY
try:
result = fk.ta.analyze(symbol="AAPL")
print(result)
except CreditError as e:
print(f"out of credits: {e.remaining}/{e.required}")
except RateLimitError as e:
print(f"slow down: retry after {e.retry_after}s")
See examples/agent_tool_wrapping.md for framework-specific wrapping patterns.
2. Notebook / quantitative research
from finkovsky import Client
from finkovsky.pandas import to_dataframe
fk = Client()
df = to_dataframe(fk.tw.ohlcv(symbol="2330", days=90))
df["close"].plot()
Install the pandas extra: pip install 'finkovsky[pandas]'.
3. Async backend service
import asyncio
from finkovsky import AsyncClient
async def main():
async with AsyncClient() as fk:
result = await fk.ta.analyze(symbol="AAPL")
print(result)
asyncio.run(main())
Authentication
Client(api_key="sk-...")— explicit key.Client()— readsFINKOVSKY_API_KEY; raisesAuthErrorif neither is set.Client(api_key="sk-...", base_url="https://staging.example.com")— override for staging/self-hosted deployments.
Error Hierarchy
| Exception | HTTP trigger | Meaning |
|---|---|---|
AuthError |
401, 403, missing key | Credentials need fixing. |
CreditError |
402 | Out of credits; carries remaining / required. |
RateLimitError |
429 | Too many requests; carries retry_after. |
APIError |
other 4xx, 5xx | Carries status_code, body, request_id. |
ValidationError |
client-side | Response could not be parsed into the expected schema. |
Endpoint Reference
All routes are available via client.<namespace>.<method>(...). The generated typed surface lives in src/finkovsky/_facade.py.
Development
cd sdk/python
pip install -e '.[dev]'
./scripts/gen.sh # regenerate from a running API
./scripts/gen.sh --check # drift check
pytest -m "not integration"
License
MIT — same as the parent repository.
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
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
File details
Details for the file finkovsky-0.4.4.tar.gz.
File metadata
- Download URL: finkovsky-0.4.4.tar.gz
- Upload date:
- Size: 56.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4984e5b9834ea19cef47383ca5535e08f752b7ae1f639e91de57b281493c226d
|
|
| MD5 |
e1b84dd1377ffc84956ed582cc92e2cc
|
|
| BLAKE2b-256 |
1e9956bf16c26280a185c0c05f08dd0da9b8e8627db9382c5b3698371cc67d13
|
File details
Details for the file finkovsky-0.4.4-py3-none-any.whl.
File metadata
- Download URL: finkovsky-0.4.4-py3-none-any.whl
- Upload date:
- Size: 186.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7adbccdd6a5a737aeecc36f09402a815730f0889611068a26b5c2f503eaa374a
|
|
| MD5 |
67b902f04af42ebe4b507ab6431f6bae
|
|
| BLAKE2b-256 |
222cc5ada8d8bbce275bf2754b635eb898e0e0b4f69e8f76ba27ede31088cbba
|