Skip to content

Commit 99a580f

Browse files
committed
First commit
0 parents  commit 99a580f

36 files changed

+5928
-0
lines changed

.gitignore

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.nox/
41+
.coverage
42+
.coverage.*
43+
.cache/
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
*.py,cover
48+
.hypothesis/
49+
.pytest_cache/
50+
51+
# Translations
52+
*.mo
53+
*.pot
54+
55+
# Django stuff:
56+
*.log
57+
local_settings.py
58+
db.sqlite3
59+
db.sqlite3-journal
60+
61+
# Flask stuff:
62+
instance/
63+
.webassets-cache
64+
65+
# Scrapy stuff:
66+
.scrapy
67+
68+
# Sphinx documentation
69+
docs/_build/
70+
71+
# PyBuilder
72+
.pybuilder/
73+
target/
74+
75+
# Jupyter Notebook
76+
.ipynb_checkpoints/
77+
78+
# IPython
79+
profile_default/
80+
ipython_config.py
81+
82+
# pyenv
83+
.python-version
84+
85+
# pipenv
86+
Pipfile.lock
87+
88+
# PEP 582
89+
__pypackages__/
90+
91+
# Celery stuff
92+
celerybeat-schedule
93+
celerybeat.pid
94+
95+
# SageMath parsed files
96+
*.sage.py
97+
98+
# Environments
99+
.env*
100+
!.env.example
101+
!.env.sample
102+
.venv
103+
env/
104+
venv/
105+
ENV/
106+
env.bak/
107+
venv.bak/
108+
109+
# Spyder project settings
110+
.spyderproject
111+
.spyproject
112+
113+
# Rope project settings
114+
.ropeproject
115+
116+
# mkdocs documentation
117+
/site
118+
119+
# mypy
120+
.mypy_cache/
121+
.dmypy.json
122+
dmypy.json
123+
124+
# ruff
125+
.ruff_cache/
126+
127+
# pyright
128+
.pyright/
129+
130+
# Pyre type checker
131+
.pyre/
132+
133+
# pytype static type analyzer
134+
.pytype/
135+
136+
# Cython debug symbols
137+
cython_debug/
138+
139+
# IDE
140+
.idea/
141+
.vscode/
142+
.cursor/
143+
*.swp
144+
*.swo
145+
*~
146+
147+
# OS
148+
.DS_Store
149+
Thumbs.db
150+
151+
# Project specific
152+
*.bak

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-toml
9+
- id: check-merge-conflict
10+
- id: check-added-large-files
11+
12+
- repo: https://github.com/astral-sh/ruff-pre-commit
13+
rev: v0.1.6
14+
hooks:
15+
- id: ruff
16+
args: [--fix]
17+
- id: ruff-format
18+
19+
- repo: https://github.com/pre-commit/mirrors-mypy
20+
rev: v1.7.1
21+
hooks:
22+
- id: mypy
23+
additional_dependencies: [types-requests]

API_SPEC.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
2+
## 상세주소
3+
4+
* [https://ecos.bok.or.kr/api/](https://ecos.bok.or.kr/api/)
5+
6+
---
7+
8+
## 요청인자
9+
10+
| 항목명(국문) | 필수여부 | 샘플데이터 | 항목설명 |
11+
| ------- | ---- | ----------------- | ------------------------ |
12+
| 서비스명 | Y | StatisticItemList | API 서비스명 |
13+
| 인증키 | Y | sample | 한국은행에서 발급받은 오픈API 인증키 |
14+
| 요청유형 | Y | xml | 결과값의 파일 형식 - xml, json |
15+
| 언어구분 | Y | kr | 결과값의 언어 - kr(국문), en(영문) |
16+
| 요청시작건수 | Y | 1 | 전체 결과값 중 시작 번호 |
17+
| 요청종료건수 | Y | 10 | 전체 결과값 중 끝 번호 |
18+
| 통계표코드 | Y | 601Y002 | 통계표코드 |
19+
20+
---
21+
22+
## 출력값
23+
24+
| 항목명(국문) | 항목명(영문) | 항목크기 | 샘플데이터 | 항목설명 |
25+
| -------- | ----------- | ---- | ------------------------ | -------- |
26+
| 통계표코드 | STAT_CODE | 8 | 601Y002 | 통계표코드 |
27+
| 통계명 | STAT_NAME | 200 | 7.5.2. 지역별 소비유형별 개인 신용카드 | 통계명 |
28+
| 항목그룹코드 | GRP_CODE | 20 | Group1 | 통계항목그룹코드 |
29+
| 항목그룹명 | GRP_NAME | 60 | 지역코드 | 통계항목그룹명 |
30+
| 통계항목코드 | ITEM_CODE | 20 | A | 통계항목코드 |
31+
| 통계항목명 | ITEM_NAME | 200 | 서울 | 통계항목명 |
32+
| 상위통계항목코드 | P_ITEM_CODE | 8 | null | 상위통계항목코드 |
33+
| 상위통계항목명 | P_ITEM_NAME | 200 | null | 상위통계항목명 |
34+
| 주기 | CYCLE | 2 | M | 주기(월) |
35+
| 수록시작일자 | START_TIME | 8 | 200912 | 수록시작일자 |
36+
| 수록종료일자 | END_TIME | 8 | 202112 | 수록종료일자 |
37+
| 자료수 | DATA_CNT | 22 | 145 | 자료수 |
38+
| 단위 | UNIT_NAME | 200 | 십억원 | 단위 |
39+
| 가중치 | WEIGHT | 22 | null | 가중치 |
40+
41+
---
42+
43+
## OpenAPI 테스트
44+
45+
* **테스트 URL**
46+
47+
```
48+
https://ecos.bok.or.kr/api/StatisticItemList/sample/xml/kr/1/10/043Y070/
49+
```
50+
* `sample` 위치에 **인증키 값**을 입력
51+
52+
---
53+
54+
## OpenAPI 메세지
55+
56+
| 타입 | 코드 | 설명 |
57+
| -- | --- | ---------------------------------------------------- |
58+
| 정보 | 100 | 인증키가 유효하지 않습니다. 인증키를 확인하십시오! 인증키가 없는 경우 인증키를 신청하십시오! |
59+
| 정보 | 200 | 해당하는 데이터가 없습니다. |
60+
| 에러 | 100 | 필수 값이 누락되어 있습니다. 필수 값을 확인하십시오! |
61+
| 에러 | 101 | 주기와 다른 형식의 날짜 형식입니다. |
62+
| 에러 | 200 | 파일타입 값이 누락 혹은 유효하지 않습니다. |
63+
| 에러 | 300 | 조회건수 값이 누락되어 있습니다. |
64+
| 에러 | 301 | 조회건수 값의 타입이 유효하지 않습니다. 정수를 입력하세요. |
65+
| 에러 | 400 | 검색범위가 적정범위를 초과하여 60초 TIMEOUT이 발생하였습니다. |
66+
| 에러 | 500 | 서버 오류입니다. 해당 서비스를 찾을 수 없습니다. |
67+
| 에러 | 600 | DB Connection 오류입니다. |
68+
| 에러 | 601 | SQL 오류입니다. |
69+
| 에러 | 602 | 과도한 OpenAPI 호출로 이용이 제한되었습니다. |

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)