Skip to content

edspdf.loading

load(path)

Load a complete pipeline.

TODO: implement other ways to load a pipeline.

PARAMETER DESCRIPTION
path

Path to the pipeline.

TYPE: Path

RETURNS DESCRIPTION
PdfReader

A PdfReader object.

Source code in edspdf/loading.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
def load(path: Path) -> PdfReader:
    """
    Load a complete pipeline.

    TODO: implement other ways to load a pipeline.

    Parameters
    ----------
    path : Path
        Path to the pipeline.

    Returns
    -------
    PdfReader
        A PdfReader object.
    """
    conf = Config().from_disk(path)
    return registry.resolve(conf)["reader"]

from_str(config)

Load a complete pipeline from a string config.

PARAMETER DESCRIPTION
config

Configuration.

TYPE: str

RETURNS DESCRIPTION
PdfReader

A PdfReader object.

Source code in edspdf/loading.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
def from_str(config: str) -> PdfReader:
    """
    Load a complete pipeline from a string config.

    Parameters
    ----------
    config : str
        Configuration.

    Returns
    -------
    PdfReader
        A PdfReader object.
    """
    conf = Config().from_str(config)
    return registry.resolve(conf)["reader"]