EDINET API wrapper.
Project description
説明
EDINET APIのラッパーです。
使い方
from edinet import Edinet
from datetime import datetime
import json
# APIのトークン
API_TOKEN = "your token here"
# init時にAPIキーが必要なので注意。
edn = Edinet(API_TOKEN)
# ドキュメントを取得
doc_list = edn.get_document_list(datetime.today(), type_=2)
# 会社別の提出書のリスト
# 提出書の種類、EDINET ID、証券コード
documents_class_by_filer: dict[str, list[tuple[str, str, str]]] = {}
for i in doc_list["results"]:
# 縦覧できる事を確認
if i["legalStatus"] != 0:
# もし変数の中に登録されてない場合、作成。
if not documents_class_by_filer_name.get(i["filerName"]):
documents_class_by_filer_name[i["filerName"]] = []
# 追加
documents_class_by_filer_name[i["filerName"]].append((
i["docDescription"],
i["docID"],
i["secCode"]
))
# 保存する
with open("documents.json", "w", encoding="utf-8") as f:
f.write(json.dumps(documents_class_by_filer_name,
indent=4,
ensure_ascii=False))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
edinet_wrap-0.12.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for edinet_wrap-0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6224723c58da30bc6e161006ee0af635eae519d3e72b31d53663a06e9d46715 |
|
MD5 | 0ec11f72fc610109b45752e43a09dcce |
|
BLAKE2b-256 | d481d3d15e644078087063b6c2418f06f0bfbb749538fbddd0c02b9ca1817f4c |