diff --git a/index.html b/index.html index 17736cc..ed42e40 100644 --- a/index.html +++ b/index.html @@ -174,7 +174,7 @@ repository.

-async repo_autoindex.autoindex(url: str, *, fetcher: Optional[Callable[[str], Awaitable[Optional[str]]]] = None, index_href_suffix: str = '') AsyncGenerator[GeneratedIndex, None]
+async repo_autoindex.autoindex(url: str, *, fetcher: Optional[Callable[[str], Awaitable[Optional[Union[str, BinaryIO]]]]] = None, index_href_suffix: str = '') AsyncGenerator[GeneratedIndex, None]

Generate HTML indexes for a repository.

Parameters:
@@ -191,9 +191,14 @@ within the repository (e.g. repository)

  • if the fetcher can determine, without error, that the requested content does not exist: it must return None.

  • -
  • if the fetcher can retrieve the requested content, it must return the entire -content at the given URL as a str. This implies that, for example, -decompressing a compressed file is the responsibility of the fetcher.

  • +
  • if the fetcher can retrieve the requested content, it must return the +content at the given URL as a file-like object.

    +

    Returning a str is also possible, but not recommended since it +requires loading an entire file into memory at once, and some +repositories contain very large files.

    +

    Note that decompressing compressed files (such as bzipped XML in +yum repositories) is the responsibility of the fetcher.

    +
  • if the fetcher encounters an exception, it may allow the exception to propagate.

  • diff --git a/searchindex.js b/searchindex.js index 18b741b..6eb0b22 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["index"], "filenames": ["index.rst"], "titles": ["repo-autoindex"], "terms": {"minim": 0, "gener": 0, "html": 0, "index": 0, "repositori": 0, "i": 0, "python": 0, "librari": 0, "static": 0, "variou": 0, "type": 0, "It": 0, "support": 0, "yum": 0, "repodata": 0, "repomd": 0, "xml": 0, "pulp": 0, "file": 0, "pulp_manifest": 0, "kickstart": 0, "tree": 0, "treeinfo": 0, "extra_fil": 0, "json": 0, "provid": 0, "similar": 0, "function": 0, "tradit": 0, "server": 0, "directori": 0, "httpd": 0, "": 0, "mod_autoindex": 0, "few": 0, "kei": 0, "differ": 0, "The": 0, "ar": 0, "intention": 0, "limit": 0, "show": 0, "onli": 0, "present": 0, "metadata": 0, "rather": 0, "than": 0, "all": 0, "within": 0, "method": 0, "obtain": 0, "can": 0, "custom": 0, "allow": 0, "integr": 0, "exot": 0, "scenario": 0, "demand": 0, "store": 0, "filesystem": 0, "satisfi": 0, "certain": 0, "condit": 0, "contain": 0, "exactli": 0, "one": 0, "locat": 0, "root": 0, "access": 0, "via": 0, "http": 0, "usag": 0, "h": 0, "filenam": 0, "debug": 0, "url": 0, "base": 0, "basenam": 0, "output": 0, "default": 0, "enabl": 0, "verbos": 0, "log": 0, "fals": 0, "In": 0, "follow": 0, "we": 0, "singl": 0, "fedora": 0, "note": 0, "command": 0, "multipl": 0, "reproduc": 0, "structur": 0, "found": 0, "repo_url": 0, "curl": 0, "mirror": 0, "fedoraproject": 0, "org": 0, "mirrorlist": 0, "updat": 0, "releas": 0, "f36": 0, "arch": 0, "x86_64": 0, "egrep": 0, "head": 0, "n1": 0, "fetch": 0, "digitalpacif": 0, "com": 0, "au": 0, "linux": 0, "36": 0, "everyth": 0, "32cf6191e4ef86045c9f34589d98f6378069359746b50def80a66e15fe5a906f": 0, "primari": 0, "gz": 0, "wrote": 0, "packag": 0, "z": 0, "y": 0, "x": 0, "w": 0, "v": 0, "u": 0, "t": 0, "r": 0, "q": 0, "p": 0, "o": 0, "n": 0, "m": 0, "l": 0, "k": 0, "j": 0, "g": 0, "f": 0, "e": 0, "d": 0, "c": 0, "b": 0, "3": 0, "except": 0, "repo_autoindex": 0, "contenterror": 0, "an": 0, "error": 0, "rais": 0, "when": 0, "appear": 0, "invalid": 0, "thi": 0, "abl": 0, "successfulli": 0, "retriev": 0, "determin": 0, "fail": 0, "pars": 0, "For": 0, "corrupt": 0, "mai": 0, "caus": 0, "class": 0, "generatedindex": 0, "str": 0, "relative_dir": 0, "A": 0, "page": 0, "document": 0, "rel": 0, "async": 0, "fetcher": 0, "option": 0, "callabl": 0, "await": 0, "none": 0, "index_href_suffix": 0, "asyncgener": 0, "paramet": 0, "probe": 0, "omit": 0, "us": 0, "basic": 0, "valid": 0, "implement": 0, "must": 0, "contract": 0, "call": 0, "absolut": 0, "which": 0, "exist": 0, "some": 0, "without": 0, "request": 0, "doe": 0, "return": 0, "entir": 0, "given": 0, "impli": 0, "decompress": 0, "compress": 0, "respons": 0, "encount": 0, "propag": 0, "suffix": 0, "ad": 0, "onto": 0, "ani": 0, "link": 0, "between": 0, "anoth": 0, "caller": 0, "intend": 0, "save": 0, "each": 0, "should": 0, "pass": 0, "so": 0, "correct": 0, "On": 0, "other": 0, "hand": 0, "serv": 0, "them": 0, "web": 0, "automat": 0, "left": 0, "blank": 0, "produc": 0, "zero": 0, "more": 0, "instanc": 0, "doesn": 0, "repres": 0, "ha": 0, "failur": 0}, "objects": {"": [[0, 0, 0, "-", "repo_autoindex"]], "repo_autoindex": [[0, 1, 1, "", "ContentError"], [0, 2, 1, "", "GeneratedIndex"], [0, 4, 1, "", "autoindex"]], "repo_autoindex.GeneratedIndex": [[0, 3, 1, "", "content"], [0, 3, 1, "", "relative_dir"]]}, "objtypes": {"0": "py:module", "1": "py:exception", "2": "py:class", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "exception", "Python exception"], "2": ["py", "class", "Python class"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"repo": 0, "autoindex": 0, "content": 0, "overview": 0, "refer": 0, "cli": 0, "posit": 0, "argument": 0, "name": 0, "exampl": 0, "api": 0}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 57}, "alltitles": {"repo-autoindex": [[0, "repo-autoindex"]], "Contents": [[0, "contents"]], "Overview": [[0, "overview"]], "Reference: CLI": [[0, "reference-cli"]], "Positional Arguments": [[0, "Positional Arguments"]], "Named Arguments": [[0, "Named Arguments"]], "Example": [[0, "example"]], "Reference: API": [[0, "module-repo_autoindex"]]}, "indexentries": {"contenterror": [[0, "repo_autoindex.ContentError"]], "generatedindex (class in repo_autoindex)": [[0, "repo_autoindex.GeneratedIndex"]], "autoindex() (in module repo_autoindex)": [[0, "repo_autoindex.autoindex"]], "content (repo_autoindex.generatedindex attribute)": [[0, "repo_autoindex.GeneratedIndex.content"]], "module": [[0, "module-repo_autoindex"]], "relative_dir (repo_autoindex.generatedindex attribute)": [[0, "repo_autoindex.GeneratedIndex.relative_dir"]], "repo_autoindex": [[0, "module-repo_autoindex"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["index"], "filenames": ["index.rst"], "titles": ["repo-autoindex"], "terms": {"minim": 0, "gener": 0, "html": 0, "index": 0, "repositori": 0, "i": 0, "python": 0, "librari": 0, "static": 0, "variou": 0, "type": 0, "It": 0, "support": 0, "yum": 0, "repodata": 0, "repomd": 0, "xml": 0, "pulp": 0, "file": 0, "pulp_manifest": 0, "kickstart": 0, "tree": 0, "treeinfo": 0, "extra_fil": 0, "json": 0, "provid": 0, "similar": 0, "function": 0, "tradit": 0, "server": 0, "directori": 0, "httpd": 0, "": 0, "mod_autoindex": 0, "few": 0, "kei": 0, "differ": 0, "The": 0, "ar": 0, "intention": 0, "limit": 0, "show": 0, "onli": 0, "present": 0, "metadata": 0, "rather": 0, "than": 0, "all": 0, "within": 0, "method": 0, "obtain": 0, "can": 0, "custom": 0, "allow": 0, "integr": 0, "exot": 0, "scenario": 0, "demand": 0, "store": 0, "filesystem": 0, "satisfi": 0, "certain": 0, "condit": 0, "contain": 0, "exactli": 0, "one": 0, "locat": 0, "root": 0, "access": 0, "via": 0, "http": 0, "usag": 0, "h": 0, "filenam": 0, "debug": 0, "url": 0, "base": 0, "basenam": 0, "output": 0, "default": 0, "enabl": 0, "verbos": 0, "log": 0, "fals": 0, "In": 0, "follow": 0, "we": 0, "singl": 0, "fedora": 0, "note": 0, "command": 0, "multipl": 0, "reproduc": 0, "structur": 0, "found": 0, "repo_url": 0, "curl": 0, "mirror": 0, "fedoraproject": 0, "org": 0, "mirrorlist": 0, "updat": 0, "releas": 0, "f36": 0, "arch": 0, "x86_64": 0, "egrep": 0, "head": 0, "n1": 0, "fetch": 0, "digitalpacif": 0, "com": 0, "au": 0, "linux": 0, "36": 0, "everyth": 0, "32cf6191e4ef86045c9f34589d98f6378069359746b50def80a66e15fe5a906f": 0, "primari": 0, "gz": 0, "wrote": 0, "packag": 0, "z": 0, "y": 0, "x": 0, "w": 0, "v": 0, "u": 0, "t": 0, "r": 0, "q": 0, "p": 0, "o": 0, "n": 0, "m": 0, "l": 0, "k": 0, "j": 0, "g": 0, "f": 0, "e": 0, "d": 0, "c": 0, "b": 0, "3": 0, "except": 0, "repo_autoindex": 0, "contenterror": 0, "an": 0, "error": 0, "rais": 0, "when": 0, "appear": 0, "invalid": 0, "thi": 0, "abl": 0, "successfulli": 0, "retriev": 0, "determin": 0, "fail": 0, "pars": 0, "For": 0, "corrupt": 0, "mai": 0, "caus": 0, "class": 0, "generatedindex": 0, "str": 0, "relative_dir": 0, "A": 0, "page": 0, "document": 0, "rel": 0, "async": 0, "fetcher": 0, "option": 0, "callabl": 0, "await": 0, "union": 0, "binaryio": 0, "none": 0, "index_href_suffix": 0, "asyncgener": 0, "paramet": 0, "probe": 0, "omit": 0, "us": 0, "basic": 0, "valid": 0, "implement": 0, "must": 0, "contract": 0, "call": 0, "absolut": 0, "which": 0, "exist": 0, "some": 0, "without": 0, "request": 0, "doe": 0, "return": 0, "given": 0, "like": 0, "object": 0, "also": 0, "possibl": 0, "recommend": 0, "sinc": 0, "requir": 0, "load": 0, "entir": 0, "memori": 0, "onc": 0, "veri": 0, "larg": 0, "decompress": 0, "compress": 0, "bzip": 0, "respons": 0, "encount": 0, "propag": 0, "suffix": 0, "ad": 0, "onto": 0, "ani": 0, "link": 0, "between": 0, "anoth": 0, "caller": 0, "intend": 0, "save": 0, "each": 0, "should": 0, "pass": 0, "so": 0, "correct": 0, "On": 0, "other": 0, "hand": 0, "serv": 0, "them": 0, "web": 0, "automat": 0, "left": 0, "blank": 0, "produc": 0, "zero": 0, "more": 0, "instanc": 0, "doesn": 0, "repres": 0, "ha": 0, "failur": 0}, "objects": {"": [[0, 0, 0, "-", "repo_autoindex"]], "repo_autoindex": [[0, 1, 1, "", "ContentError"], [0, 2, 1, "", "GeneratedIndex"], [0, 4, 1, "", "autoindex"]], "repo_autoindex.GeneratedIndex": [[0, 3, 1, "", "content"], [0, 3, 1, "", "relative_dir"]]}, "objtypes": {"0": "py:module", "1": "py:exception", "2": "py:class", "3": "py:attribute", "4": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "exception", "Python exception"], "2": ["py", "class", "Python class"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"]}, "titleterms": {"repo": 0, "autoindex": 0, "content": 0, "overview": 0, "refer": 0, "cli": 0, "posit": 0, "argument": 0, "name": 0, "exampl": 0, "api": 0}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 57}, "alltitles": {"repo-autoindex": [[0, "repo-autoindex"]], "Contents": [[0, "contents"]], "Overview": [[0, "overview"]], "Reference: CLI": [[0, "reference-cli"]], "Positional Arguments": [[0, "Positional Arguments"]], "Named Arguments": [[0, "Named Arguments"]], "Example": [[0, "example"]], "Reference: API": [[0, "module-repo_autoindex"]]}, "indexentries": {"contenterror": [[0, "repo_autoindex.ContentError"]], "generatedindex (class in repo_autoindex)": [[0, "repo_autoindex.GeneratedIndex"]], "autoindex() (in module repo_autoindex)": [[0, "repo_autoindex.autoindex"]], "content (repo_autoindex.generatedindex attribute)": [[0, "repo_autoindex.GeneratedIndex.content"]], "module": [[0, "module-repo_autoindex"]], "relative_dir (repo_autoindex.generatedindex attribute)": [[0, "repo_autoindex.GeneratedIndex.relative_dir"]], "repo_autoindex": [[0, "module-repo_autoindex"]]}}) \ No newline at end of file