The Python interface to Ledger Investing's analytics infrastructure
Project description
LedgerAnalytics Python
ledger-analytics is the Python interface to Ledger Investing's remote
analytics infrastructure.
To use with a local app (which should be running on localhost:8000),
set your LEDGER_ANALYTICS_API_KEY environment variable.
The typical Python workflow is, then:
from ledger_analytics import AnalyticsClient
from bermuda import meyers_tri
client = AnalyticsClient()
triangle = client.triangle.get()
# Get the Bermuda Triangle object
bermuda_triangle = triangle.get()
# Fit a development model
dev_model = client.development_model.fit(
config={
"triangle_name": "meyers",
"model_name": "chain_ladder",
"model_type": "ChainLadder",
"model_config": {},
}
)
# delete triangle
triangle.delete()
The LegderAnalytics class can also be used as a simple context manager:
from ledger_analytics import LedgerAnalytics
with AnalyticsClient() as client:
triangle = client.triangle.create(
config={
"triangle_name": "test_meyers_triangle",
"triangle_data": meyers_tri.to_dict(),
)
)
triangle.delete()
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 ledger_analytics-0.0.1.tar.gz.
File metadata
- Download URL: ledger_analytics-0.0.1.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e59c7ecf2110135832c4ef78abd3696b388222c9d9bf517a85ffd102a55e16f9
|
|
| MD5 |
7e8d1a2e33330004427bfa7d4ee680c5
|
|
| BLAKE2b-256 |
30ee8ada653c97e13818250383750869eec45cef8694e14b9ad515e075d7b876
|
File details
Details for the file ledger_analytics-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ledger_analytics-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
358d3ed26d9bccc29379a30b5f4728152e46254f784e77108423b8dcb702d658
|
|
| MD5 |
f7318752433d325d58f97a853668955e
|
|
| BLAKE2b-256 |
404000383b20db87664a4efd76172bb97ba0d6340500b7b8c4823535c9d6fd5d
|