Python SDK for Tepilora API v3
Project description
Tepilora SDK (Python)
Python SDK (sync + async) for Tepilora API v3.
236 operations across 25 namespaces, auto-generated from the registry.
Install
pip install Tepilora
Optional extras:
pip install 'Tepilora[arrow]' # PyArrow for binary formats
pip install 'Tepilora[polars]' # Polars DataFrame support
Quick Start
import Tepilora as T
client = T.TepiloraClient(api_key="YOUR_KEY")
# Typed endpoints (IDE autocomplete)
securities = client.securities.search(query="MSCI ETF", limit=10)
print(securities["totalCount"])
# Raw call
resp = client.call("securities.search", params={"query": "MSCI", "limit": 5})
print(resp.data)
Async
import asyncio
import Tepilora as T
async def main():
async with T.AsyncTepiloraClient(api_key="YOUR_KEY") as client:
data = await client.securities.search(query="MSCI", limit=10)
print(data)
asyncio.run(main())
Namespaces
| Namespace | Operations | Description |
|---|---|---|
securities |
12 | Search, filter, history, facets, MiFID, fees |
news |
7 | Search, latest, trending, details |
publications |
5 | Research reports and publications |
portfolio |
19 | CRUD, returns, attribution, optimization |
analytics |
68 | Rolling metrics, ratios, risk, factors |
alerts |
9 | Alert rules CRUD, evaluate, history |
macro |
6 | Economic indicators, calendar |
stocks |
9 | Technicals, screening, peers, signals |
bonds |
7 | Analyze, screen, ladder, curve, spread |
options |
6 | Pricing, Greeks, IV, strategies |
esg |
5 | ESG scores, screening, comparison |
factors |
3 | Fama-French, momentum, factor loading |
fh |
7 | Fundamentals history, financials |
clients |
8 | B2B client management |
profiling |
10 | MiFID questionnaires, suitability |
billing |
10 | Fee calculations, schedules, records |
documents |
4 | Document parsing, classification |
alternatives |
9 | Alternative investments |
queries |
8 | Saved queries CRUD, execute |
search |
1 | Global search |
data |
1 | Raw data access |
exports |
2 | Data export to file formats |
Examples by Namespace
Securities
# Search
results = client.securities.search(query="MSCI World", limit=20)
# Get details
details = client.securities.description(identifier="IE00B4L5Y983EURXMIL")
# Price history
history = client.securities.history(
identifiers=["IE00B4L5Y983EURXMIL", "FR0010655712EURXPAR"],
start_date="2024-01-01",
limit=1000
)
# Filter by criteria
filtered = client.securities.filter(filters={"Currency": "EUR", "TepiloraType": "ETF"})
# Get facets for building filters
facets = client.securities.facets(fields=["Currency", "TepiloraType", "Country"])
Portfolio
# Create portfolio
portfolio = client.portfolio.create(
name="My Portfolio",
input_type="fixed_weights",
input_data={"IE00B4L5Y983EURXMIL": 0.6, "FR0010655712EURXPAR": 0.4}
)
# Get returns
returns = client.portfolio.returns(
id=portfolio["id"],
start_date="2024-01-01",
return_method="twr"
)
# Performance attribution
attribution = client.portfolio.attribution(id=portfolio["id"])
# Optimize
optimized = client.portfolio.optimize(
id=portfolio["id"],
objective="max_sharpe",
constraints={"max_weight": 0.3}
)
Analytics
# List available functions
functions = client.analytics.list()
# Get function help
help_info = client.analytics.help("rolling_volatility")
# Calculate rolling volatility
vol = client.analytics.rolling_volatility(
identifiers="IE00B4L5Y983EURXMIL",
period=252,
start_date="2023-01-01"
)
# Rolling Sharpe ratio
sharpe = client.analytics.rolling_sharpe(
identifiers="IE00B4L5Y983EURXMIL",
period=252,
rf=0.02
)
# Factor regression
factors = client.analytics.factor_regression(
identifiers="IE00B4L5Y983EURXMIL",
model="FF5"
)
News & Publications
# Search news
news = client.news.search(query="bitcoin", limit=20)
# Latest news
latest = client.news.latest(limit=10)
# Trending topics
trending = client.news.trending(limit=50, finance_only=True)
# Search publications
pubs = client.publications.search(query="market outlook", limit=10)
Alerts
# Create alert
alert = client.alerts.create(
name="Price Alert",
condition={"type": "price_change", "threshold": 5.0},
action={"type": "webhook", "url": "https://..."}
)
# List alerts
alerts = client.alerts.list(enabled=True)
# Evaluate manually
result = client.alerts.evaluate(rule_id=alert["id"])
Bonds
# Analyze bond
analysis = client.bonds.analyze(
identifier="XS1234567890",
price=98.5,
settlement_date="2024-02-01"
)
# Screen bonds
bonds = client.bonds.screen(
criteria={"min_yield": 4.0, "max_duration": 5.0},
limit=50
)
# Get yield curve
curve = client.bonds.curve(currency="EUR", date="2024-01-15")
Arrow/Binary Formats
from Tepilora.arrow import read_ipc_stream
# Request Arrow format
resp = client.call_arrow_ipc_stream("securities.search", params={"query": "ETF", "limit": 1000})
table = read_ipc_stream(resp.content)
print(table.to_pandas())
Module-Level API
import Tepilora as T
# Configure globally
T.configure(api_key="YOUR_KEY")
# Use without client instance
T.analytics.rolling_volatility(identifiers="IE00B4L5Y983EURXMIL")
Or via environment variables:
export TEPILORA_API_KEY=your_key
export TEPILORA_BASE_URL=https://tepiloradata.com
Error Handling
from Tepilora.errors import TepiloraAPIError
try:
data = client.securities.search(query="invalid")
except TepiloraAPIError as e:
print(f"Error: {e.message}")
print(f"Code: {e.status_code}")
API Endpoints
POST /T-Api/v3- Unified action router (all operations)GET /T-Api/v3/health- Health checkGET /T-Api/v3/pricing- Pricing infoGET /T-Api/v3/logs/status- Logs status
Version
import Tepilora
print(Tepilora.__version__) # 0.3.2
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
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 tepilora-0.3.3.tar.gz.
File metadata
- Download URL: tepilora-0.3.3.tar.gz
- Upload date:
- Size: 81.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6d54c15cdaa411474ff8e849008673b9f23bad7a7d92257809ccde200289a07
|
|
| MD5 |
f6528ff0910d50f6ce2341656f18b4e3
|
|
| BLAKE2b-256 |
c7bbc572c12b66d8d688a0a9681753b803948fd572470297d5f37498365fb323
|
Provenance
The following attestation bundles were made for tepilora-0.3.3.tar.gz:
Publisher:
publish.yml on Admintepilora/tepilora-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tepilora-0.3.3.tar.gz -
Subject digest:
a6d54c15cdaa411474ff8e849008673b9f23bad7a7d92257809ccde200289a07 - Sigstore transparency entry: 953876107
- Sigstore integration time:
-
Permalink:
Admintepilora/tepilora-python@b1885ec1ae90791a5e268aea9a95d9ec9b946333 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/Admintepilora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1885ec1ae90791a5e268aea9a95d9ec9b946333 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tepilora-0.3.3-py3-none-any.whl.
File metadata
- Download URL: tepilora-0.3.3-py3-none-any.whl
- Upload date:
- Size: 94.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6ab2f95d186272bf859c64a633667810d2ffc744281e682f8875b302785f719
|
|
| MD5 |
15672d11582621266a91ae49acf42dc4
|
|
| BLAKE2b-256 |
19651982a31f56f49ae2b86cf02eb61f0989c96c48f7a0c104d6e76c760e6787
|
Provenance
The following attestation bundles were made for tepilora-0.3.3-py3-none-any.whl:
Publisher:
publish.yml on Admintepilora/tepilora-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tepilora-0.3.3-py3-none-any.whl -
Subject digest:
f6ab2f95d186272bf859c64a633667810d2ffc744281e682f8875b302785f719 - Sigstore transparency entry: 953876128
- Sigstore integration time:
-
Permalink:
Admintepilora/tepilora-python@b1885ec1ae90791a5e268aea9a95d9ec9b946333 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/Admintepilora
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b1885ec1ae90791a5e268aea9a95d9ec9b946333 -
Trigger Event:
push
-
Statement type: