valarpy
Project metadata and convenience functions.
Package Contents
- valarpy.new_model()
Shorthand for importing model. You should have a connection open.
- Returns
The
model
module
- valarpy.opened(config: Union[None, str, pathlib.Path, List[Union[str, pathlib.Path, None]], Mapping[str, Union[str, int]]] = None)
Context manager. Opens a connection and returns the model. Closes the connection when the generator exits.
- Parameters
config – Passed to
Valar.__init__
- Yields
The
model
module, with an attached.conn
of typeValar
- valarpy.valarpy_info() Generator[str, None, None]
Gets lines describing valarpy metadata and database row counts. Useful for verifying that the schema matches the valarpy model, and for printing info.
- Yields
Lines of free text
- Raises
InterfaceError – On some connection and schema mismatch errors