Skip to content

Commit

Permalink
Fix imports in batch financials
Browse files Browse the repository at this point in the history
  • Loading branch information
dgunning committed Aug 13, 2024
1 parent 4a96079 commit 495dbef
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/batch/batch_financials_10Q.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
from edgar import *
from edgar.xbrl import XBRLData, XBRLInstance, Statement, Statements, Financials
from edgar.xbrl import XBRLData, get_xbrl_object
from edgar.financials import Financials
import time
from rich import print as rprint

def run_tenq_financials(num):
filings = get_filings(form='10-Q').sample(num)
for filing in filings:
print(str(filing))
xbrl_data = XBRLData.extract(filing)
financials = Financials(xbrl_data)
income_statement = financials.get_income_statement()
rprint(income_statement)
time.sleep(13)
xbrl_data = get_xbrl_object(filing)
if xbrl_data:
financials = Financials(xbrl_data)
income_statement = financials.get_income_statement()
rprint(income_statement)
time.sleep(3)


if __name__ == '__main__':
Expand Down

0 comments on commit 495dbef

Please sign in to comment.