db2_hj3415 0.1.4__tar.gz → 0.1.6__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.
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/PKG-INFO +1 -1
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/models.py +35 -6
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/pyproject.toml +1 -1
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/README.md +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/__init__.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/cli/__init__.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/cli/db.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/common/__init__.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/common/connection.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/common/db_ops.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/common/utils.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/__init__.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/_ops.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/aud.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/chf.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/gbond3y.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/gold.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/kosdaq.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/kospi.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/silver.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/sp500.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/usdidx.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/usdkrw.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/mi/wti.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/__init__.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/_c10346.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/_ops.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/c101.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/c103.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/c104.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/c106.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/c108.py +0 -0
- {db2_hj3415-0.1.4 → db2_hj3415-0.1.6}/db2_hj3415/nfs/dart.py +0 -0
@@ -1,8 +1,8 @@
|
|
1
|
-
from pydantic import BaseModel, Field, field_serializer, ConfigDict
|
1
|
+
from pydantic import BaseModel, Field, field_serializer, ConfigDict, field_validator
|
2
2
|
from datetime import datetime
|
3
3
|
|
4
4
|
class C101(BaseModel):
|
5
|
-
id: str | None = Field(alias="_id")
|
5
|
+
id: str | None = Field(default=None, alias="_id")
|
6
6
|
날짜: datetime
|
7
7
|
코드: str
|
8
8
|
bps: int | None
|
@@ -58,7 +58,7 @@ class 항목값q(BaseModel):
|
|
58
58
|
|
59
59
|
|
60
60
|
class C103(BaseModel):
|
61
|
-
id: str = Field(alias="_id")
|
61
|
+
id: str | None = Field(default=None, alias="_id")
|
62
62
|
코드: str
|
63
63
|
날짜: datetime
|
64
64
|
손익계산서q: list[항목값q]
|
@@ -76,7 +76,7 @@ class C103(BaseModel):
|
|
76
76
|
|
77
77
|
|
78
78
|
class C104(BaseModel):
|
79
|
-
id: str = Field(alias="_id")
|
79
|
+
id: str | None = Field(default=None, alias="_id")
|
80
80
|
코드: str
|
81
81
|
날짜: datetime
|
82
82
|
|
@@ -109,7 +109,7 @@ class 기업데이터(BaseModel):
|
|
109
109
|
)
|
110
110
|
|
111
111
|
class C106(BaseModel):
|
112
|
-
id: str = Field(alias="_id")
|
112
|
+
id: str | None = Field(default=None, alias="_id")
|
113
113
|
코드: str
|
114
114
|
날짜: datetime
|
115
115
|
|
@@ -124,7 +124,7 @@ class C106(BaseModel):
|
|
124
124
|
|
125
125
|
|
126
126
|
class C108(BaseModel):
|
127
|
-
id: str = Field(alias="_id")
|
127
|
+
id: str | None = Field(default=None, alias="_id")
|
128
128
|
코드: str
|
129
129
|
날짜: datetime
|
130
130
|
|
@@ -136,6 +136,35 @@ class C108(BaseModel):
|
|
136
136
|
제공처: str | None = None
|
137
137
|
투자의견: str | None = None
|
138
138
|
|
139
|
+
# 날짜 필드 ISO 직렬화
|
140
|
+
@field_serializer("날짜")
|
141
|
+
def serialize_date(self, v: datetime) -> str:
|
142
|
+
return v.isoformat()
|
143
|
+
|
144
|
+
model_config = ConfigDict(
|
145
|
+
populate_by_name=True,
|
146
|
+
str_strip_whitespace=True
|
147
|
+
)
|
148
|
+
|
149
|
+
class Dart(BaseModel):
|
150
|
+
id: str | None = Field(default=None, alias="_id")
|
151
|
+
코드: str | None= Field(default=None, alias="stock_code") # 종목 코드 (6자리)
|
152
|
+
날짜: datetime | None = Field(default=None, alias="rcept_dt") # 접수 일자 (YYYYMMDD)
|
153
|
+
|
154
|
+
corp_cls: str # 기업 구분 (예: 'K', 'Y', 'N')
|
155
|
+
corp_code: str # 고유 회사 코드 (8자리)
|
156
|
+
corp_name: str # 회사 이름
|
157
|
+
flr_nm: str # 제출자 (예: '코스닥시장본부')
|
158
|
+
rcept_no: str # 접수 번호
|
159
|
+
report_nm: str # 보고서 이름
|
160
|
+
rm: str # 비고 (예: '코')
|
161
|
+
|
162
|
+
@field_validator("날짜", mode="before")
|
163
|
+
@classmethod
|
164
|
+
def parse_date(cls, v: str) -> datetime:
|
165
|
+
"""YYYYMMDD 형식의 문자열을 datetime 객체로 변환"""
|
166
|
+
return datetime.strptime(v, "%Y%m%d")
|
167
|
+
|
139
168
|
# 날짜 필드 ISO 직렬화
|
140
169
|
@field_serializer("날짜")
|
141
170
|
def serialize_date(self, v: datetime) -> str:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|