Skip to content

Commit

Permalink
feat: func output struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvictor committed Mar 13, 2024
1 parent f2d304b commit 0d9a397
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polars_talib"
version = "0.1.1"
version = "0.1.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
21 changes: 21 additions & 0 deletions python/polars_talib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,27 @@ def get_function_groups():
return __function_groups__.copy()


def get_functions_output_struct():
"""
Returns a dict with keys of function names and keys of the output struct
"""
return {
"ht_phasor": ["inphase", "quadrature"],
"ht_sine": ["sine", "leadsine"],
"minmax": ["min", "max"],
"minmaxindex": ["minidx", "maxidx"],
"aroon": ["aroondown", "aroonup"],
"macd": ["macd", "macdsignal", "macdhist"],
"macdext": ["macd", "macdsignal", "macdhist"],
"macdfix": ["macd", "macdsignal", "macdhist"],
"stoch": ["slowk", "slowd"],
"stochf": ["fastk", "fastd"],
"stochrsi": ["fastk", "fastd"],
"bbands": ["upperband", "middleband", "lowerband"],
"mama": ["mama", "fama"],
}


@pl.api.register_expr_namespace("ta")
class TAExpr:
def __init__(self, expr: pl.Expr):
Expand Down

0 comments on commit 0d9a397

Please sign in to comment.