Swaps hyphens for underscores in kebab-case names: order-history → order_history. URL paths, query parameters, CLI flags and file names are often hyphenated, while Python variables, SQL columns and many analytics or logging schemas only allow underscores.
Paste the routes, query keys or flag names and get identifiers you can use in Python code, database columns or event properties.
String.Result.GET /api/order-history?page-size=20
GET /api/gift-cards/balance-checkGET /api/order_history?page_size=20
GET /api/gift_cards/balance_checkPath segments and the page-size query key are converted; GET, /api and the number 20 are untouched.
balance-check → balance_check.?, = and other URL characters around the names.2024-01-01 alone.Flask and FastAPI paths like /gift-cards/balance-check usually map to functions named balance_check. Converting the route list gives the function names to implement.
Query parameters such as utm-source or ref-code that land in BigQuery or Snowflake are typically stored as utm_source, ref_code columns.
item-2 becomes item_2, which keeps it a valid Python identifier.my-shop.com → my_shop.com). Keep hosts out of the input.For names made of letters and hyphens, yes. If a name starts with a digit, Python still won't accept it as an identifier.
No. argparse already turns --dry-run into args.dry_run. This page is for when you want to write those names elsewhere, such as config keys or docs.