tablecrow.connect()
¶
- tablecrow.connect.connect(resource: Union[str, PathLike], table_names: Optional[List[str]] = None, **kwargs) List[DatabaseTable] ¶
the main connection function for connecting to an arbitrary database table
tablecrow.connect()
will return TableCrow table(s) based on the given connection parameters- Parameters:
resource – location of database
table_names – names of tables to connect to
- Returns:
list of tables
>>> import tablecrow >>> # list all tables in a SQLite database file >>> sqlite_tables = tablecrow.connect('test_database.db')
>>> import tablecrow >>> # connect to a PostGres database table >>> postgres_table = tablecrow.connect('https://user:password@test.com/database:5432', database='postgres', table_names=['test_table'])