# 説明
EDINET APIのラッパーです。
# 使い方
```py
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))
```
Raw data
{
"_id": null,
"home_page": null,
"name": "edinet-wrap",
"maintainer": "iodine53",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "edinet",
"author": "iodine53",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e8/d6/b263c5e1539127f53b392e80e486d5e624a04881454daf1e181553bf0b54/edinet_wrap-0.12.tar.gz",
"platform": null,
"description": "# \u8aac\u660e\nEDINET API\u306e\u30e9\u30c3\u30d1\u30fc\u3067\u3059\u3002 \n# \u4f7f\u3044\u65b9\n```py\nfrom edinet import Edinet\nfrom datetime import datetime\nimport json\n\n\n# API\u306e\u30c8\u30fc\u30af\u30f3\nAPI_TOKEN = \"your token here\"\n\n# init\u6642\u306bAPI\u30ad\u30fc\u304c\u5fc5\u8981\u306a\u306e\u3067\u6ce8\u610f\u3002\nedn = Edinet(API_TOKEN)\n\n# \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53d6\u5f97\ndoc_list = edn.get_document_list(datetime.today(), type_=2)\n\n# \u4f1a\u793e\u5225\u306e\u63d0\u51fa\u66f8\u306e\u30ea\u30b9\u30c8\n# \u63d0\u51fa\u66f8\u306e\u7a2e\u985e\u3001EDINET ID\u3001\u8a3c\u5238\u30b3\u30fc\u30c9\ndocuments_class_by_filer: dict[str, list[tuple[str, str, str]]] = {}\n\nfor i in doc_list[\"results\"]:\n # \u7e26\u89a7\u3067\u304d\u308b\u4e8b\u3092\u78ba\u8a8d\n if i[\"legalStatus\"] != 0:\n # \u3082\u3057\u5909\u6570\u306e\u4e2d\u306b\u767b\u9332\u3055\u308c\u3066\u306a\u3044\u5834\u5408\u3001\u4f5c\u6210\u3002\n if not documents_class_by_filer_name.get(i[\"filerName\"]):\n documents_class_by_filer_name[i[\"filerName\"]] = []\n # \u8ffd\u52a0\n documents_class_by_filer_name[i[\"filerName\"]].append((\n i[\"docDescription\"],\n i[\"docID\"],\n i[\"secCode\"]\n ))\n\n# \u4fdd\u5b58\u3059\u308b\nwith open(\"documents.json\", \"w\", encoding=\"utf-8\") as f:\n f.write(json.dumps(documents_class_by_filer_name,\n indent=4,\n ensure_ascii=False))\n\n```\n",
"bugtrack_url": null,
"license": "Apache Software License",
"summary": "EDINET API wrapper.",
"version": "0.12",
"project_urls": {
"Issues": "https://github.com/35enidoi/edinet_wrap/issues",
"Repository": "https://github.com/35enidoi/edinet_wrap"
},
"split_keywords": [
"edinet"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d481d3d15e644078087063b6c2418f06f0bfbb749538fbddd0c02b9ca1817f4c",
"md5": "0ec11f72fc610109b45752e43a09dcce",
"sha256": "c6224723c58da30bc6e161006ee0af635eae519d3e72b31d53663a06e9d46715"
},
"downloads": -1,
"filename": "edinet_wrap-0.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ec11f72fc610109b45752e43a09dcce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 9024,
"upload_time": "2024-06-15T11:36:19",
"upload_time_iso_8601": "2024-06-15T11:36:19.423631Z",
"url": "https://files.pythonhosted.org/packages/d4/81/d3d15e644078087063b6c2418f06f0bfbb749538fbddd0c02b9ca1817f4c/edinet_wrap-0.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e8d6b263c5e1539127f53b392e80e486d5e624a04881454daf1e181553bf0b54",
"md5": "c8e0228e026fbad2738ff3c1972681e0",
"sha256": "ed2b31f0ab442ef105b4038d6986bb9d2b265e195c82cdc754bb31e77c946656"
},
"downloads": -1,
"filename": "edinet_wrap-0.12.tar.gz",
"has_sig": false,
"md5_digest": "c8e0228e026fbad2738ff3c1972681e0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 8017,
"upload_time": "2024-06-15T11:36:21",
"upload_time_iso_8601": "2024-06-15T11:36:21.163725Z",
"url": "https://files.pythonhosted.org/packages/e8/d6/b263c5e1539127f53b392e80e486d5e624a04881454daf1e181553bf0b54/edinet_wrap-0.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-15 11:36:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "35enidoi",
"github_project": "edinet_wrap",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "edinet-wrap"
}