Skip to content

Commit

Permalink
docs: add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijas committed Oct 12, 2023
1 parent 9c62e29 commit 9f9bf7b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ storage = DownloadStorage()
with storage as path:
dl = Downloader("MyCompanyName", "[email protected]", path)
dl.get("10-K", "GOOG", limit=2)
# all files are now deleted and only stored in memory

for path, content in storage.get_file_contents():
print(f"Path: {path}\nContent [len={len(content)}]: {content[:30]}...\n")
Expand All @@ -54,6 +55,7 @@ storage = DownloadStorage(filter_pattern=ONLY_HTML)
with storage as path:
dl = Downloader("MyCompanyName", "[email protected]", path)
dl.get("10-Q", "AAPL", limit=1, download_details=True)
# all files are now deleted and only stored in memory

content = storage.get_file_contents()[0].content
print(f"{content[:50]}...")
Expand Down
8 changes: 5 additions & 3 deletions nbs/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -115,7 +115,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -139,6 +139,7 @@
"with storage as path:\n",
" dl = Downloader(\"MyCompanyName\", \"[email protected]\", path)\n",
" dl.get(\"10-K\", \"GOOG\", limit=2)\n",
"# all files are now deleted and only stored in memory\n",
"\n",
"for path, content in storage.get_file_contents():\n",
" print(f\"Path: {path}\\nContent [len={len(content)}]: {content[:30]}...\\n\")"
Expand All @@ -154,7 +155,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand All @@ -172,6 +173,7 @@
"with storage as path:\n",
" dl = Downloader(\"MyCompanyName\", \"[email protected]\", path)\n",
" dl.get(\"10-Q\", \"AAPL\", limit=1, download_details=True)\n",
"# all files are now deleted and only stored in memory\n",
"\n",
"content = storage.get_file_contents()[0].content\n",
"print(f\"{content[:50]}...\")"
Expand Down
2 changes: 1 addition & 1 deletion sec_downloader/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.0"
__version__ = "0.1.1"
from sec_downloader.core import DownloadStorage, FileContent

__all__ = ["DownloadStorage", "FileContent"]
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[DEFAULT]
repo = sec-downloader
lib_name = sec-downloader
version = 0.1.0
version = 0.1.1
min_python = 3.7
license = mit
black_formatting = False
Expand Down

0 comments on commit 9f9bf7b

Please sign in to comment.