22 lines
628 B
Python
22 lines
628 B
Python
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import pandas as pd
|
|
from edgar import Company, set_identity, set_local_storage_path, use_local_storage
|
|
|
|
# Set your identity (required by SEC)
|
|
set_identity("your.email@example.com")
|
|
|
|
# Enable local storage for caching filings
|
|
LOCAL_STORAGE_PATH = "./edgar_cache"
|
|
os.makedirs(LOCAL_STORAGE_PATH, exist_ok=True)
|
|
set_local_storage_path(LOCAL_STORAGE_PATH)
|
|
use_local_storage(True)
|
|
|
|
company = Company("BRK-A")
|
|
filings = company.get_filings(form="13F-HR").head(1)
|
|
if filings:
|
|
filing = filings[0]
|
|
obj = filing.obj()
|
|
print("Fetched and processed filing")
|
|
print("Check edgar_cache for files") |