## parse_metakernel_text()


Parse a SPICE metakernel from text content.


Usage

``` python
parse_metakernel_text(
    text,
    source,
)
```


Use this for a metakernel fetched from a remote URL, where no local file exists.


## Parameters


`text: str`  
The metakernel text content.

`source: str`  
A source identifier, for example the URL. It is stored as the `source_path` attribute of the result, converted to a `Path`. A URL therefore loses one slash of its `://`.


## Returns


`ParsedMetakernel`  
The parsed `PATH_VALUES`, `PATH_SYMBOLS` and `KERNELS_TO_LOAD`, with the header.


## Examples

``` python
>>> from spice_kernel_db import parse_metakernel_text
>>> lines = [
...     "KPL/MK",
...     "\\begindata",
...     "  PATH_VALUES  = ( '/data/kernels' )",
...     "  PATH_SYMBOLS = ( 'KERNELS' )",
...     "  KERNELS_TO_LOAD = ( '$KERNELS/lsk/naif0012.tls' '$KERNELS/spk/jup365.bsp' )",
...     "\\begintext",
... ]
>>> mk = parse_metakernel_text("\n".join(lines), "https://example.org/mk/demo.tm")
>>> mk.symbol_map
```

{'KERNELS': '/data/kernels'}

``` python
>>> mk.kernel_relpaths()
```

\['lsk/naif0012.tls', 'spk/jup365.bsp'\]

``` python
>>> mk.resolve(mk.kernels[0])
```

'/data/kernels/lsk/naif0012.tls'
