contracts-hj3415 0.4.0__tar.gz → 0.5.0__tar.gz
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.
- {contracts_hj3415-0.4.0 → contracts_hj3415-0.5.0}/PKG-INFO +1 -2
- {contracts_hj3415-0.4.0 → contracts_hj3415-0.5.0}/pyproject.toml +19 -2
- contracts_hj3415-0.5.0/src/contracts_hj3415/analysis/features.py +34 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/analysis/payloads.py +8 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/analysis/types.py +9 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/common/envelope.py +46 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/common/types.py +17 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/nfs/__init__.py +0 -0
- contracts_hj3415-0.4.0/src/contracts_hj3415/nfs/c101_dto.py → contracts_hj3415-0.5.0/src/contracts_hj3415/nfs/c101.py +11 -10
- contracts_hj3415-0.4.0/src/contracts_hj3415/nfs/c103_dto.py → contracts_hj3415-0.5.0/src/contracts_hj3415/nfs/c103.py +8 -8
- contracts_hj3415-0.4.0/src/contracts_hj3415/nfs/c104_dto.py → contracts_hj3415-0.5.0/src/contracts_hj3415/nfs/c104.py +6 -10
- contracts_hj3415-0.4.0/src/contracts_hj3415/nfs/c106_dto.py → contracts_hj3415-0.5.0/src/contracts_hj3415/nfs/c106.py +7 -8
- contracts_hj3415-0.4.0/src/contracts_hj3415/nfs/c108_dto.py → contracts_hj3415-0.5.0/src/contracts_hj3415/nfs/c108.py +6 -8
- contracts_hj3415-0.5.0/src/contracts_hj3415/nfs/payloads.py +14 -0
- {contracts_hj3415-0.4.0 → contracts_hj3415-0.5.0}/src/contracts_hj3415/nfs/types.py +11 -23
- contracts_hj3415-0.5.0/src/contracts_hj3415/py.typed +0 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/universe/__init__.py +0 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/universe/krx300.py +20 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/universe/payloads.py +8 -0
- contracts_hj3415-0.5.0/src/contracts_hj3415/universe/types.py +6 -0
- contracts_hj3415-0.4.0/src/contracts_hj3415/nfs/constants.py +0 -49
- contracts_hj3415-0.4.0/src/contracts_hj3415/nfs/nfs_dto.py +0 -17
- contracts_hj3415-0.4.0/src/contracts_hj3415/universe/constants.py +0 -4
- contracts_hj3415-0.4.0/src/contracts_hj3415/universe/dto.py +0 -17
- contracts_hj3415-0.4.0/src/contracts_hj3415/universe/types.py +0 -6
- {contracts_hj3415-0.4.0 → contracts_hj3415-0.5.0}/LICENSE +0 -0
- {contracts_hj3415-0.4.0 → contracts_hj3415-0.5.0}/README.md +0 -0
- {contracts_hj3415-0.4.0 → contracts_hj3415-0.5.0}/src/contracts_hj3415/__init__.py +0 -0
- {contracts_hj3415-0.4.0/src/contracts_hj3415/nfs → contracts_hj3415-0.5.0/src/contracts_hj3415/analysis}/__init__.py +0 -0
- {contracts_hj3415-0.4.0/src/contracts_hj3415/universe → contracts_hj3415-0.5.0/src/contracts_hj3415/common}/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: contracts-hj3415
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: DTO pakages for hj3415
|
|
5
5
|
Keywords: example,demo
|
|
6
6
|
Author-email: Hyungjin Kim <hj3415@gmail.com>
|
|
@@ -10,6 +10,5 @@ Classifier: Programming Language :: Python :: 3
|
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Typing :: Typed
|
|
12
12
|
License-File: LICENSE
|
|
13
|
-
Requires-Dist: pydantic>=2.7
|
|
14
13
|
|
|
15
14
|
|
|
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "contracts-hj3415" # PyPI 이름 (하이픈 허용)
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.5.0"
|
|
8
8
|
description = "DTO pakages for hj3415"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -18,9 +18,26 @@ classifiers = [
|
|
|
18
18
|
]
|
|
19
19
|
|
|
20
20
|
dependencies = [
|
|
21
|
-
"pydantic>=2.7",
|
|
22
21
|
]
|
|
23
22
|
|
|
24
23
|
[tool.flit.module]
|
|
25
24
|
name = "contracts_hj3415"
|
|
26
25
|
path = "src/contracts_hj3415"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
[tool.pyright]
|
|
29
|
+
typeCheckingMode = "strict"
|
|
30
|
+
|
|
31
|
+
pythonVersion = "3.11"
|
|
32
|
+
pythonPlatform = "All"
|
|
33
|
+
|
|
34
|
+
reportMissingImports = true
|
|
35
|
+
reportMissingTypeStubs = false
|
|
36
|
+
|
|
37
|
+
exclude = [
|
|
38
|
+
"**/__pycache__",
|
|
39
|
+
".venv",
|
|
40
|
+
"build",
|
|
41
|
+
"tests",
|
|
42
|
+
"dist",
|
|
43
|
+
]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# contracts_hj3415/analysis/features.py
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Any, Literal, TypedDict
|
|
5
|
+
|
|
6
|
+
from contracts_hj3415.nfs.types import Endpoint, MetricKey
|
|
7
|
+
|
|
8
|
+
AggKind = Literal["sum", "avg"]
|
|
9
|
+
PeriodKind = Literal["y", "q"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FeatureValue(TypedDict):
|
|
13
|
+
value: float | None
|
|
14
|
+
picked: str | None
|
|
15
|
+
from_kind: PeriodKind | None
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class MetricDiagnostics(TypedDict):
|
|
19
|
+
ok: bool
|
|
20
|
+
reason: str | None
|
|
21
|
+
details: dict[str, Any] # pyright: ignore[reportExplicitAny]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class LatestAndTtm(TypedDict):
|
|
25
|
+
latest_y: FeatureValue
|
|
26
|
+
latest_q: FeatureValue
|
|
27
|
+
ttm_q: FeatureValue
|
|
28
|
+
chosen: FeatureValue
|
|
29
|
+
diag: MetricDiagnostics
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class FeaturesPayload(TypedDict):
|
|
33
|
+
endpoint: Endpoint
|
|
34
|
+
blocks: dict[MetricKey, LatestAndTtm]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# contracts_hj3415/common/envelope.py
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing import TypedDict
|
|
6
|
+
|
|
7
|
+
from contracts_hj3415.analysis.payloads import AnalysisPayloadDTO
|
|
8
|
+
from contracts_hj3415.common.types import EnvelopeMeta, Topic
|
|
9
|
+
|
|
10
|
+
# topic별 payload 유니온
|
|
11
|
+
from contracts_hj3415.nfs.payloads import NfsPayloadDTO
|
|
12
|
+
from contracts_hj3415.universe.payloads import UniversePayloadDTO
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class EnvelopeDTO(TypedDict):
|
|
16
|
+
"""
|
|
17
|
+
모노레포 공통 운반 상자 DTO
|
|
18
|
+
|
|
19
|
+
- key: topic별 식별자(문자열). 예)
|
|
20
|
+
- nfs: "005930"
|
|
21
|
+
- universe: "krx300"
|
|
22
|
+
- analysis: "red:005930"
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
topic: Topic
|
|
26
|
+
key: str
|
|
27
|
+
asof: datetime
|
|
28
|
+
payload: NfsPayloadDTO | UniversePayloadDTO | AnalysisPayloadDTO
|
|
29
|
+
meta: EnvelopeMeta
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def make_envelope(
|
|
33
|
+
*,
|
|
34
|
+
topic: Topic,
|
|
35
|
+
key: str,
|
|
36
|
+
asof: datetime,
|
|
37
|
+
payload: NfsPayloadDTO | UniversePayloadDTO | AnalysisPayloadDTO,
|
|
38
|
+
meta: EnvelopeMeta | None = None,
|
|
39
|
+
) -> EnvelopeDTO:
|
|
40
|
+
return {
|
|
41
|
+
"topic": topic,
|
|
42
|
+
"key": key,
|
|
43
|
+
"asof": asof,
|
|
44
|
+
"payload": payload,
|
|
45
|
+
"meta": meta or EnvelopeMeta(),
|
|
46
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# contracts_hj3415/common/types.py
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Literal, TypeAlias, TypedDict
|
|
5
|
+
|
|
6
|
+
Topic: TypeAlias = Literal["nfs", "universe", "analysis"]
|
|
7
|
+
|
|
8
|
+
CodeKey: TypeAlias = str
|
|
9
|
+
|
|
10
|
+
Num: TypeAlias = float | int | None
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class EnvelopeMeta(TypedDict, total=False):
|
|
14
|
+
source: str # "scraper2" / "krx" / "analyser2" / ...
|
|
15
|
+
trace_id: str
|
|
16
|
+
note: str
|
|
17
|
+
tags: list[str]
|
|
File without changes
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
# contracts_hj3415/nfs/
|
|
1
|
+
# contracts_hj3415/nfs/c101.py
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
from typing import Any, Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from contracts_hj3415.common.types import Num
|
|
4
7
|
from typing_extensions import TypedDict
|
|
5
|
-
from typing import Any
|
|
6
|
-
from .nfs_dto import NfsDTO
|
|
7
|
-
from .types import PeriodKey, Num, MetricKey
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
from .types import MetricKey, PeriodKey
|
|
10
|
+
|
|
11
|
+
Scalar: TypeAlias = str | float | int | None
|
|
12
|
+
ValuesMap: TypeAlias = dict[PeriodKey, Num]
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
class C101Blocks(TypedDict):
|
|
@@ -17,11 +19,10 @@ class C101Blocks(TypedDict):
|
|
|
17
19
|
기업개요: dict[str, Scalar]
|
|
18
20
|
펀더멘털: dict[MetricKey, ValuesMap]
|
|
19
21
|
|
|
20
|
-
어닝서프라이즈: dict[str, Any]
|
|
22
|
+
어닝서프라이즈: dict[str, Any] # pyright: ignore[reportExplicitAny]
|
|
21
23
|
연간컨센서스: dict[MetricKey, ValuesMap]
|
|
22
24
|
|
|
25
|
+
|
|
23
26
|
class C101Payload(TypedDict):
|
|
27
|
+
endpoint: Literal["c101"]
|
|
24
28
|
blocks: C101Blocks
|
|
25
|
-
|
|
26
|
-
class C101DTO(NfsDTO):
|
|
27
|
-
payload: C101Payload
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
# contracts_hj3415/nfs/
|
|
1
|
+
# contracts_hj3415/nfs/c103.py
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
from typing import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from contracts_hj3415.common.types import Num
|
|
4
7
|
from typing_extensions import TypedDict
|
|
5
|
-
from .nfs_dto import NfsDTO
|
|
6
|
-
from .types import Num, MetricKey, PeriodKey
|
|
7
8
|
|
|
9
|
+
from .types import MetricKey, PeriodKey
|
|
10
|
+
|
|
11
|
+
C103ValuesMap: TypeAlias = dict[PeriodKey, Num]
|
|
8
12
|
|
|
9
|
-
C103ValuesMap = dict[PeriodKey, Num]
|
|
10
13
|
|
|
11
14
|
class C103Blocks(TypedDict):
|
|
12
15
|
손익계산서y: dict[MetricKey, C103ValuesMap]
|
|
@@ -27,9 +30,6 @@ class C103Labels(TypedDict):
|
|
|
27
30
|
|
|
28
31
|
|
|
29
32
|
class C103Payload(TypedDict):
|
|
33
|
+
endpoint: Literal["c103"]
|
|
30
34
|
blocks: C103Blocks
|
|
31
35
|
labels: C103Labels
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class C103DTO(NfsDTO):
|
|
35
|
-
payload: C103Payload
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
# contracts_hj3415/nfs/
|
|
1
|
+
# contracts_hj3415/nfs/c104.py
|
|
2
2
|
from __future__ import annotations
|
|
3
|
+
from typing import Literal, TypeAlias
|
|
3
4
|
|
|
5
|
+
from contracts_hj3415.common.types import Num
|
|
4
6
|
from typing_extensions import TypedDict
|
|
5
|
-
from .
|
|
6
|
-
from .types import Num, MetricKey, PeriodKey
|
|
7
|
+
from .types import MetricKey, PeriodKey
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
C104ValuesMap = dict[PeriodKey, Num]
|
|
9
|
+
C104ValuesMap:TypeAlias = dict[PeriodKey, Num]
|
|
10
10
|
|
|
11
11
|
class C104Blocks(TypedDict):
|
|
12
12
|
수익성y: dict[MetricKey, C104ValuesMap]
|
|
@@ -34,11 +34,7 @@ class C104Labels(TypedDict):
|
|
|
34
34
|
가치분석q: dict[MetricKey, str]
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
|
|
38
37
|
class C104Payload(TypedDict):
|
|
38
|
+
endpoint: Literal["c104"]
|
|
39
39
|
blocks: C104Blocks
|
|
40
40
|
labels: C104Labels
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class C104DTO(NfsDTO):
|
|
44
|
-
payload: C104Payload
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
# contracts_hj3415/nfs/
|
|
1
|
+
# contracts_hj3415/nfs/c106.py
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
from typing import Literal, TypeAlias
|
|
5
|
+
|
|
6
|
+
from contracts_hj3415.common.types import CodeKey, Num
|
|
4
7
|
from typing_extensions import TypedDict
|
|
5
|
-
from .nfs_dto import NfsDTO
|
|
6
|
-
from .types import Num, MetricKey, CodeKey
|
|
7
8
|
|
|
9
|
+
from .types import MetricKey
|
|
8
10
|
|
|
9
|
-
C106ValuesMap = dict[CodeKey, Num]
|
|
11
|
+
C106ValuesMap: TypeAlias = dict[CodeKey, Num]
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
class C106Blocks(TypedDict):
|
|
@@ -20,9 +22,6 @@ class C106Labels(TypedDict):
|
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
class C106Payload(TypedDict):
|
|
25
|
+
endpoint: Literal["c106"]
|
|
23
26
|
blocks: C106Blocks
|
|
24
27
|
labels: C106Labels
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class C106DTO(NfsDTO):
|
|
28
|
-
payload: C106Payload
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
# contracts_hj3415/nfs/
|
|
1
|
+
# contracts_hj3415/nfs/c108.py
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
from typing import Literal, TypeAlias
|
|
5
|
+
|
|
4
6
|
from typing_extensions import TypedDict
|
|
5
|
-
from .nfs_dto import NfsDTO
|
|
6
|
-
from .types import MetricKey
|
|
7
7
|
|
|
8
|
+
from .types import MetricKey
|
|
8
9
|
|
|
9
|
-
C108ValuesMap = dict[MetricKey, str|int|None]
|
|
10
|
+
C108ValuesMap: TypeAlias = dict[MetricKey, str | int | None]
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class C108Blocks(TypedDict):
|
|
@@ -14,8 +15,5 @@ class C108Blocks(TypedDict):
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class C108Payload(TypedDict):
|
|
18
|
+
endpoint: Literal["c108"]
|
|
17
19
|
blocks: C108Blocks
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class C108DTO(NfsDTO):
|
|
21
|
-
payload: C108Payload
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# contracts_hj3415/nfs/payloads.py
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import TypeAlias
|
|
5
|
+
|
|
6
|
+
from contracts_hj3415.nfs.c101 import C101Payload
|
|
7
|
+
from contracts_hj3415.nfs.c103 import C103Payload
|
|
8
|
+
from contracts_hj3415.nfs.c104 import C104Payload
|
|
9
|
+
from contracts_hj3415.nfs.c106 import C106Payload
|
|
10
|
+
from contracts_hj3415.nfs.c108 import C108Payload
|
|
11
|
+
|
|
12
|
+
NfsPayloadDTO: TypeAlias = (
|
|
13
|
+
C101Payload | C103Payload | C104Payload | C106Payload | C108Payload
|
|
14
|
+
)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# contracts_hj3415/nfs/types.py
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
-
from typing import
|
|
4
|
+
from typing import Literal, TypeAlias
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
C101BlockKey: TypeAlias = Literal[
|
|
7
7
|
"요약", "시세", "주주현황", "기업개요", "펀더멘털", "어닝서프라이즈", "연간컨센서스"
|
|
8
8
|
]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
C103BlockKey: TypeAlias = Literal[
|
|
11
11
|
"손익계산서y",
|
|
12
12
|
"손익계산서q",
|
|
13
13
|
"재무상태표y",
|
|
@@ -16,8 +16,7 @@ C103BlockKeys = Literal[
|
|
|
16
16
|
"현금흐름표q",
|
|
17
17
|
]
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
C104BlockKeys = Literal[
|
|
19
|
+
C104BlockKey: TypeAlias = Literal[
|
|
21
20
|
"수익성y",
|
|
22
21
|
"성장성y",
|
|
23
22
|
"안정성y",
|
|
@@ -30,32 +29,21 @@ C104BlockKeys = Literal[
|
|
|
30
29
|
"가치분석q",
|
|
31
30
|
]
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
# C106===========================
|
|
35
|
-
|
|
36
|
-
C106BlockKeys = Literal[
|
|
32
|
+
C106BlockKey: TypeAlias = Literal[
|
|
37
33
|
"y",
|
|
38
34
|
"q",
|
|
39
35
|
]
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
# C108============================
|
|
43
|
-
|
|
44
|
-
C108BlockKeys = Literal["리포트",]
|
|
37
|
+
C108BlockKey: TypeAlias = Literal["리포트",]
|
|
45
38
|
|
|
46
39
|
|
|
47
40
|
# General====================
|
|
48
41
|
|
|
49
|
-
MetricKey = str
|
|
50
|
-
PeriodKey = str
|
|
51
|
-
CodeKey = str
|
|
52
|
-
Num = float | int | None
|
|
53
|
-
|
|
54
|
-
Endpoints = Literal["c101", "c103", "c104", "c106", "c108"]
|
|
55
|
-
|
|
42
|
+
MetricKey: TypeAlias = str
|
|
43
|
+
PeriodKey: TypeAlias = str
|
|
56
44
|
|
|
57
|
-
|
|
45
|
+
Endpoint: TypeAlias = Literal["c101", "c103", "c104", "c106", "c108"]
|
|
58
46
|
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
BlockKey: TypeAlias = (
|
|
48
|
+
C101BlockKey | C103BlockKey | C104BlockKey | C106BlockKey | C108BlockKey
|
|
61
49
|
)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# contracts_hj3415/universe/dto.py
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
from typing import Any, TypedDict
|
|
5
|
+
|
|
6
|
+
from contracts_hj3415.common.types import CodeKey
|
|
7
|
+
from contracts_hj3415.universe.types import Universe
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class UniverseItem(TypedDict, total=False):
|
|
11
|
+
code: CodeKey
|
|
12
|
+
name: str
|
|
13
|
+
market: str
|
|
14
|
+
meta: dict[str, Any] # pyright: ignore[reportExplicitAny]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class KRX300Payload(TypedDict):
|
|
18
|
+
source: str
|
|
19
|
+
universe: Universe
|
|
20
|
+
blocks: list[UniverseItem]
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# contracts_hj3415/nfs/constants.py
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ENDPOINTS: tuple[str, ...] = ("c101", "c103", "c104", "c106", "c108")
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
C101_BLOCK_KEYS: tuple[str, ...] = (
|
|
9
|
-
"요약",
|
|
10
|
-
"시세",
|
|
11
|
-
"주주현황",
|
|
12
|
-
"기업개요",
|
|
13
|
-
"펀더멘털",
|
|
14
|
-
"어닝서프라이즈",
|
|
15
|
-
"연간컨센서스",
|
|
16
|
-
)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
C103_BLOCK_KEYS: tuple[str, ...] = (
|
|
20
|
-
"손익계산서y",
|
|
21
|
-
"손익계산서q",
|
|
22
|
-
"재무상태표y",
|
|
23
|
-
"재무상태표q",
|
|
24
|
-
"현금흐름표y",
|
|
25
|
-
"현금흐름표q",
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
C104_BLOCK_KEYS: tuple[str, ...] = (
|
|
30
|
-
"수익성y",
|
|
31
|
-
"성장성y",
|
|
32
|
-
"안정성y",
|
|
33
|
-
"활동성y",
|
|
34
|
-
"가치분석y",
|
|
35
|
-
"수익성q",
|
|
36
|
-
"성장성q",
|
|
37
|
-
"안정성q",
|
|
38
|
-
"활동성q",
|
|
39
|
-
"가치분석q",
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
C106_BLOCK_KEYS: tuple[str, ...] = (
|
|
44
|
-
"y",
|
|
45
|
-
"q",
|
|
46
|
-
)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
C108_BLOCK_KEYS: tuple[str, ...] = ("리포트",)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# contracts_hj3415/nfs/nfs_dto.py
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
from datetime import datetime
|
|
5
|
-
from pydantic import BaseModel, ConfigDict
|
|
6
|
-
from .types import Endpoints, Payload
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class NfsDTO(BaseModel):
|
|
10
|
-
code: str
|
|
11
|
-
asof: datetime
|
|
12
|
-
endpoint: Endpoints
|
|
13
|
-
payload: Payload
|
|
14
|
-
|
|
15
|
-
model_config = ConfigDict(extra="ignore")
|
|
16
|
-
|
|
17
|
-
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# contracts_hj3415/universe/dto.py
|
|
2
|
-
from __future__ import annotations
|
|
3
|
-
|
|
4
|
-
from typing import Any, TypedDict
|
|
5
|
-
|
|
6
|
-
class UniverseItemDTO(TypedDict, total=False):
|
|
7
|
-
code: str # required by convention
|
|
8
|
-
name: str
|
|
9
|
-
market: str
|
|
10
|
-
meta: dict[str, Any]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class UniversePayloadDTO(TypedDict):
|
|
14
|
-
universe: str
|
|
15
|
-
asof: str # ISO string 권장 (UTC). datetime을 넘겨도 되지만 계약은 str이 깔끔함
|
|
16
|
-
source: str
|
|
17
|
-
items: list[UniverseItemDTO]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|