arelle.FileSource

See COPYRIGHT.md for copyright information.

Module Contents

Classes

Functions

Data

API

arelle.FileSource._: arelle.typing.TypeGetText

None

arelle.FileSource.archivePathSeparators

None

arelle.FileSource.archiveFilenameSuffixes

None

arelle.FileSource.POST_UPLOADED_ZIP

None

arelle.FileSource.SERVER_WEB_CACHE

None

arelle.FileSource.TAXONOMY_PACKAGE_FILE_NAMES

(‘.taxonomyPackage.xml’, ‘catalog.xml’)

arelle.FileSource.openFileSource(filename: str | None, cntlr: arelle.Cntlr.Cntlr | None = None, sourceZipStream: str | None = None, checkIfXmlIsEis: bool = False, reloadCache: bool = False, base: str | None = None, sourceFileSource: FileSource | None = None) FileSource
arelle.FileSource.archiveFilenameParts(filename: str | None, checkIfXmlIsEis: bool = False) tuple[str, str] | None
class arelle.FileSource.FileNamedStringIO(fileName: str, *args: Any, **kwargs: Any)

Bases: io.StringIO

close() None
__str__() str
class arelle.FileSource.FileNamedTextIOWrapper(fileName: str, *args: Any, **kwargs: Any)

Bases: io.TextIOWrapper

__str__() str
class arelle.FileSource.FileNamedBytesIO(fileName: str, *args: Any, **kwargs: Any)

Bases: io.BytesIO

close() None
__str__() str
exception arelle.FileSource.ArchiveFileIOError(fileSource: arelle.FileSource.FileSource, errno: int, fileName: str)

Bases: OSError

class arelle.FileSource.FileSource(url: str, cntlr: arelle.Cntlr.Cntlr | None = None, checkIfXmlIsEis: bool = False)

Initialization

eisDocument: lxml.etree._ElementTree | None

None

fs: zipfile.ZipFile | tarfile.TarFile | io.StringIO | None

None

filesDir: list[str] | None

None

referencedFileSources: dict[str, arelle.FileSource.FileSource]

None

rssDocument: lxml.etree._ElementTree | None

None

selection: str | list[str] | None

None

url: str | list[str] | None

None

basefile: str | list[str] | None

None

xfdDocument: lxml.etree._ElementTree | None

None

logError(err: Exception) None
open(reloadCache: bool = False) None
loadTaxonomyPackageMappings(errors: list[str] = [], expectTaxonomyPackage: bool = False) None
openZipStream(sourceZipStream: str) None
close() None
property isArchive: bool
property isTaxonomyPackage: bool
property taxonomyPackageMetadataFiles: list[str]
isInArchive(filepath: str | None, checkExistence: bool = False) bool
isMappedUrl(url: str) bool
mappedUrl(url: str) str
fileSourceContainingFilepath(filepath: str | None) arelle.FileSource.FileSource | None
file(filepath: str, binary: bool = False, stripDeclaration: bool = False, encoding: str | None = None) tuple[io.BytesIO | IO[Any]] | tuple[arelle.FileSource.FileNamedTextIOWrapper, str | None] | tuple[io.TextIOWrapper, str | None]

for text, return a tuple of (open file handle, encoding) for binary, return a tuple of (open file handle, )

exists(filepath: str) bool
property dir: list[str] | None
basedUrl(selection: str) str
select(selection: str | list[str] | None) None
arelle.FileSource.openFileStream(cntlr: arelle.Cntlr.Cntlr | None, filepath: str, mode: str = 'r', encoding: str | None = None) io.BytesIO | IO[Any]
arelle.FileSource.openXmlFileStream(cntlr: arelle.Cntlr.Cntlr | None, filepath: str, stripDeclaration: bool = False) tuple[io.TextIOWrapper, str]
arelle.FileSource.stripDeclarationBytes(xml: bytes) bytes
arelle.FileSource.stripDeclarationText(text: str) str
arelle.FileSource.saveFile(cntlr: arelle.Cntlr.Cntlr, filepath: str, contents: str, encoding: str | None = None, mode: str = 'wt') None
arelle.FileSource.gaeMemcache

None

arelle.FileSource.GAE_MEMCACHE_MAX_ITEM_SIZE

None

arelle.FileSource.GAE_EXPIRE_WEEK

None

arelle.FileSource.gaeGet(key: str) bytes | None
arelle.FileSource.gaeDelete(key: str) bool
arelle.FileSource.gaeSet(key: str, bytesValue: bytes) bool