Skip to content

Commit

Permalink
rename url functions
Browse files Browse the repository at this point in the history
  • Loading branch information
RichieHakim committed Mar 27, 2024
1 parent 0c0e4f9 commit c8ae72f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions bnpm/sql_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pandas as pd


def format_url(
def make_url(
sql_type: str = "mysql",
username: str = "root",
password: str = "password",
Expand All @@ -16,8 +16,8 @@ def format_url(
quote_password: bool = False,
) -> str:
"""
Formats a URL for a SQL database connection.
Works with MySQL, PostgreSQL, and SQLite.
Formats a URL for a SQL database connection.\n
Works with MySQL, PostgreSQL, and SQLite.\n
RH 2024
Args:
Expand Down Expand Up @@ -67,11 +67,12 @@ def format_url(
raise ValueError("sql_type must be 'mysql', 'postgresql', or 'sqlite'")


def decompose_url(
def parse_url(
url: str
) -> Dict[str, str]:
"""
Decomposes a URL for a SQL database connection.
Parses / decomposes a URL for a SQL database connection into its components.
\n
RH 2024
Args:
Expand Down

0 comments on commit c8ae72f

Please sign in to comment.