API Modules
- psqlc.find_settings_recursive(start_path: str = None, max_depth_up: int = 0, max_depth_down: int = 5, filename: str = 'settings.py') str | None[source]
Search for a file by: 1. Scanning downward from current dir (including all subdirs) 2. If not found, go upward (parent, grandparent, …) up to root,
and for each ancestor, scan its entire subtree downward.
- async psqlc.get_connection(host: str, port: int, user: str, password: str, database: str = 'postgres', auto_settings: bool = True, settings_path=None, max_depth_up: int = 0, max_depth_down: str = 1)[source]
Create async database connection
- psqlc.parse_django_settings(settings_path: str = None, max_depth_up: int = 0, max_depth_down: str = 1) Dict[str, Any] | None[source]
Parse Django settings.py or config files for database configuration
- psqlc.rich_print(msg: str, color: str = '#FFFFFF', bgcolor: str = None, bold: bool = False, end: str = '\n')[source]
Print colored text using Rich
Core Functions
Connection Management
Configuration
- psqlc.parse_django_settings(settings_path: str = None, max_depth_up: int = 0, max_depth_down: str = 1) Dict[str, Any] | None[source]
Parse Django settings.py or config files for database configuration
- psqlc.find_settings_recursive(start_path: str = None, max_depth_up: int = 0, max_depth_down: int = 5, filename: str = 'settings.py') str | None[source]
Search for a file by: 1. Scanning downward from current dir (including all subdirs) 2. If not found, go upward (parent, grandparent, …) up to root,
and for each ancestor, scan its entire subtree downward.