snews_cs.database ================= .. py:module:: snews_cs.database Attributes ---------- .. autoapisummary:: snews_cs.database.log snews_cs.database.db_file_path Classes ------- .. autoapisummary:: snews_cs.database.Database Module Contents --------------- .. py:data:: log .. py:data:: db_file_path .. py:class:: Database(db_file_path: pathlib.Path | str) .. py:attribute:: db_file_path .. py:attribute:: engine .. py:attribute:: connection .. py:attribute:: cursor .. py:method:: initialize_database(sql_schema_path: pathlib.Path | str) -> None Initialize the database with the given SQL schema. .. py:method:: show_tables() -> list[tuple[str]] Returns all tables in the SQL database. .. py:method:: get_table_schema(table_name: str) -> list[tuple[str]] Returns the schema for a given table. .. py:method:: drop_tables(table_names: list[str] | None = None) -> None Drops all tables in the SQL database.