Python을(를) 통해 Financial Reporting 파일 읽기
Python 기반 애플리케이션 내에서 XBRL 및 iXBRL를 포함한 재무 보고서 형식 읽기.
.NET을(를) 통해 Python에 대한 Aspose.Finance 기능이 풍부하고 확장 가능하며 사용하기 쉬운 재무 보고서 처리 API입니다. 개발자는 비즈니스 및 금융 솔루션을 위한 XBRL 및 iXBRL 형식을 쉽게 로드, 확인 또는 생성할 수 있습니다. API은 유효한 XBRL 및 iXBRL 파일을 로드하기 위한 XbrlDocument 클래스 및 InlineXbrlDocument 클래스를 제공합니다.
XBRL 문서 읽기
보기 및 분석을 위해 기존 파일을 로드하려면 XBRL 파일을 읽어야 합니다. XBLR 문서를 읽기 위해 API은 유효한 XBRL 파일을 입력 매개변수로 사용하여 위 단락에서 언급한 XbrlDocument 클래스를 제공합니다. 다른 API 클래스를 사용하면 개발자가 해당 구조와 데이터를 쉽게 분석할 수 있습니다. 클래스 중 일부는 SchemaRefCollection, Context, Unit입니다.
Python XBRL 파일을 읽는 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document = XbrlDocument(os.path.join(sourceDir, "IdScopeContextPeriodStartAfterEnd.xml")) | |
xbrlInstances = document.xbrl_instances | |
xbrlInstance = xbrlInstances[0] | |
facts = xbrlInstance.facts | |
schemaRefs = xbrlInstance.schema_refs | |
contexts = xbrlInstance.contexts | |
units = xbrlInstance.units |
iXBRL 문서 읽기
위에서 언급했듯이 기존 데이터를 보거나 분석하거나 편집할 필요가 있을 때 iXBRL 파일을 읽어야 합니다. 이를 읽기 위해 API은 유효한 iXBRL 파일을 매개변수로 포함하는 InlineXbrlDocument 클래스를 제공합니다. 프로그래머는 InlineFact, Context, Unit 보기의 데이터 및 구조와 같은 클래스를 활용할 수 있습니다.
Python iXBRL 문서를 읽을 코드
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document = InlineXbrlDocument(iXbrlFilePath + @"account_first.html") | |
inlineFacts = document.facts | |
contexts = document.contexts | |
units = document.units |