전자공시 OPEN DART 시스템 API
Project description
OpenDart
전자공시 OPEN DART API Library
Overview
해당 라이브러리는 OPEN DART 스펙에 맞춰 쉽게 사용할 수 있도록 구성하고 있습니다. 이 라이브러리를 통해 투자를 하는 경우 책임은 사용자에게 있습니다.
사용을 위해서는 직접 Open Dart 시스템에서 API KEY를 발급받아 세팅을 해주어야 합니다. 또한 도메인 지식이 미천하여 제가 모르는 내용은 추가하지 않았으며, 도중에 그만둘 수도 있습니다.
하지만 만족하는 결과가 나올 때까지는 최선을 다하겠습니다.
Get Started
pip install opendart
⚠️ WARNING ⚠️
해당 라이브러리를 사용하기 위해서는 python-dotenv 라이브러리 사용이 필요합니다.
프로젝트 루트 위치에 다음과 같이 .env 파일을 생성하고,
발급받은 DART_API_KEY를 입력해야 합니다.
이미 사용중인 .env 파일이 있다면 추가해야 합니다.
자세한 사용법은 pypi.org 혹은
github을 참고바랍니다.
DART_API_KEY = '발급받은 API KEY'
Usage
from typing import List, TYPE_CHECKING
from opendart import api, utils
if TYPE_CHECKING:
from opendart.models.public_notice import Corporation
FILE_PATH = 'listed_corps'
listed_corps: List['Corporation']
'''종목코드가 발급된 상장사 목록'''
try:
listed_corps: List['Corporation'] = utils.read_json_by_file_path(FILE_PATH)
except:
listed_corps: List['Corporation'] = api.fetch_all_listed_corp()
utils.save_json_as_file(listed_corps, FILE_PATH)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file OpenDart-0.1.0.tar.gz.
File metadata
- Download URL: OpenDart-0.1.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f1d29be284784e2774bb788cc96aae78f1139b5f96b79890dee073a4bd8876b
|
|
| MD5 |
5883e2d72f22a3e7342005a07f1e4c05
|
|
| BLAKE2b-256 |
6724d9648628bd1f15e4dcda5a5fe0541d7f0860bbe0204c2078472675dc7aee
|
File details
Details for the file OpenDart-0.1.0-py3-none-any.whl.
File metadata
- Download URL: OpenDart-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e001958f88468957413943c874aab282849e5781f1ef5e71bd5cb864226651a6
|
|
| MD5 |
13bc842b4ae1b19b3fbfc7b6e6adc6a8
|
|
| BLAKE2b-256 |
6b5dca5b05e63119092ba69a33c40ff743f3a9bce89a9b2fac1b3e9282494fdd
|