isoline 0.6.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
isoline/__init__.py ADDED
@@ -0,0 +1,32 @@
1
+ """isoline: financial statement analysis (Piotroski F, Altman Z'', Beneish M, quality ratios).
2
+
3
+ Public Python API (imported lazily so ``import isoline`` stays fast)::
4
+
5
+ from isoline import scan, compare, IsolineScanner, ScanResult
6
+ result = scan("AAPL")
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import typing
12
+
13
+ __version__ = "0.6.0"
14
+
15
+ __all__ = ["CompareResult", "ScanResult", "IsolineScanner", "__version__", "compare", "scan"]
16
+
17
+ _LAZY = {
18
+ "scan": ("isoline.sdk", "scan"),
19
+ "compare": ("isoline.sdk", "compare"),
20
+ "IsolineScanner": ("isoline.sdk", "IsolineScanner"),
21
+ "ScanResult": ("isoline.core.result", "ScanResult"),
22
+ "CompareResult": ("isoline.core.result", "CompareResult"),
23
+ }
24
+
25
+
26
+ def __getattr__(name: str) -> typing.Any:
27
+ if name in _LAZY:
28
+ import importlib
29
+
30
+ module, attr = _LAZY[name]
31
+ return getattr(importlib.import_module(module), attr)
32
+ raise AttributeError(f"module 'isoline' has no attribute {name!r}")
isoline/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from isoline.cli.app import app
2
+
3
+ if __name__ == "__main__":
4
+ app()
isoline/branding.py ADDED
@@ -0,0 +1,42 @@
1
+ """Central brand configuration: the one place that names the product.
2
+
3
+ A rename is implemented by changing this file plus the items in
4
+ docs/project/brand-migration.md (package directory, pyproject, workflows, URLs).
5
+ Code that prints the product name reads it from here so strings cannot drift.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from dataclasses import dataclass
11
+
12
+
13
+ @dataclass(frozen=True)
14
+ class Brand:
15
+ name: str # display name
16
+ package: str # PyPI distribution name
17
+ module: str # import name
18
+ command: str # console script
19
+ tagline: str
20
+ repo_url: str
21
+ docs_url: str
22
+ legacy_package: str | None = None # kept on PyPI; points users to the successor
23
+ successor_package: str | None = None
24
+
25
+
26
+ BRAND = Brand(
27
+ name="Isoline",
28
+ package="isoline",
29
+ module="isoline",
30
+ command="isoline",
31
+ tagline="Financial statements, measured precisely",
32
+ repo_url="https://github.com/shubhwade/isoline",
33
+ docs_url="https://shubhwade.github.io/isoline/",
34
+ legacy_package="telmus",
35
+ )
36
+
37
+
38
+ def env(name: str, default: str = "") -> str:
39
+ """Read ISOLINE_<name>, falling back to the legacy TELMUS_<name> variable."""
40
+ import os
41
+
42
+ return os.environ.get(f"ISOLINE_{name}") or os.environ.get(f"TELMUS_{name}") or default