EdgarTools v4.15.0
🚀 EdgarTools v4.15.0 - Enhanced Developer Experience & ETF Support
This release brings significant improvements to developer experience with intuitive period filtering APIs and comprehensive ETF support, plus important bug fixes for SGML parsing.
🆕 Added
Period Type Filtering API - Intuitive period filtering for enhanced developer experience
- New get_facts() parameter: Direct period type filtering with
company.get_facts(period_type=PeriodType.ANNUAL) - FactQuery.by_period_type(): Chainable period filtering in query interface
- EntityFacts.filter_by_period_type(): Direct filtering on facts objects
- Coverage: Supports ANNUAL, QUARTERLY, MONTHLY period types with automatic period length mapping
- Impact: Transforms period filtering from "knowledge-required" to "intuitive" for common EdgarTools operations
Enhanced ETF Support - Comprehensive ETF ticker and series resolution
- ETF Series Search (FEAT-417): Enhanced Fund class with ticker-to-series resolution
- ETF Ticker Holdings (FEAT-418): Intelligent ticker resolution with CUSIP fallback for NPORT-P filings
- Smart ETF Fallback: 100% success rate with popular ETFs (SPY, QQQ) via company ticker resolution
- New Services: TickerResolutionService and TickerSeriesResolver with comprehensive caching
- Coverage: Automatic ticker resolution in holdings data with clear diagnostics
- Impact: Fund("SPY") now works perfectly, enabling seamless ETF analysis
🐛 Fixed
SGML Parser Regression with HTML Content Detection - Resolved false positive HTML detection in valid SGML
- Problem: Valid SGML containing HTML/XBRL content within
<TEXT>sections was incorrectly flagged as HTML - Solution: Reordered detection logic to check for valid SGML structure before HTML content detection
- Coverage: Maintains protection against SEC HTML error responses while fixing inline XBRL parsing
- Impact: Fixes regression in SGML parsing for filings with inline XBRL content
⚡ Enhanced
Test Infrastructure Improvements - Enhanced test reliability and isolation
- Cache Contamination Fixes: Proper cache clearing to prevent test interference
- Test Isolation: Monkeypatch-based EDGAR_IDENTITY handling for better test isolation
- Pytest Marks: More accurate test categorization for selective test execution
- Coverage: All 51 ETF feature tests pass consistently in isolation and full suite
- Impact: Improved test reliability and developer experience
📦 Installation
pip install edgartools==4.15.0🔗 Links
- PyPI: https://pypi.org/project/edgartools/4.15.0/
- Documentation: https://docs.edgartools.dev/
- GitHub: https://github.com/dgunning/edgartools
📈 Key API Examples
Period Type Filtering (New!)
from edgar import Company
from edgar.entity import PeriodType
# Direct filtering (new intuitive API)
company = Company('AAPL')
annual_facts = company.get_facts(period_type=PeriodType.ANNUAL)
quarterly_facts = company.get_facts(period_type=PeriodType.QUARTERLY)
# Query interface (new)
quarterly_revenue = facts.query().by_period_type(PeriodType.QUARTERLY).by_concept("Revenue").execute()
# EntityFacts filtering (new)
annual_filtered = facts.filter_by_period_type(PeriodType.ANNUAL)Enhanced ETF Support (New!)
from edgar.funds import Fund
# ETF ticker resolution now works seamlessly
spy_fund = Fund("SPY") # Now works perfectly!
series = spy_fund.get_series() # Get ticker-specific series
# Holdings with automatic ticker resolution
holdings = spy_fund.latest_portfolio_holdings()
for holding in holdings:
print(f"{holding.ticker} - {holding.name}") # Automatic ticker resolutionFull Changelog: v4.14.2...v4.15.0