Button guide
Convert supplier price lists into your import format with a script your operations team runs from a browser
You can put your Python script behind a web form with Button (https://button.bitgate.dev) so your operations team can upload supplier spreadsheets, pick the supplier, set a markup percentage, and get back an import-ready CSV. It runs on your own computer, handles files up to 25 MB each, and is $0 for 1 tool, 3 invited colleagues, and 100 runs per month (or $15/month for Pro).
How the script needs to look
Before you hook anything up to Button, your script needs to take its inputs as command-line arguments instead of hard-coded file paths or interactive prompts. In Python, you do that with argparse.
Button passes each form value to your program as its own argument, with no shell in the middle, and values can't start with -. Fixed flags like --supplier and --markup go into the base command you approve on your machine, while your colleagues only supply the values for the form fields. You'll also want the script to take the input file path as an argument and write the finished CSV into an output folder that's passed in as an argument too.
Here is a pandas script that keeps a column mapping per supplier, takes the supplier name, the uploaded file path, the markup percentage, and an output directory, and writes out the mapped CSV:
import argparse
import os
import pandas as pd
MAPPINGS = {
"acme": {
"Part Number": "sku",
"Item Name": "title",
"Wholesale Price": "cost",
},
"globex": {
"SKU_CODE": "sku",
"Product_Description": "title",
"Unit_Cost": "cost",
},
}
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--supplier", required=True, choices=list(MAPPINGS.keys()))
parser.add_argument("--input-file", required=True)
parser.add_argument("--markup", required=True, type=float)
parser.add_argument("--output-dir", required=True)
args = parser.parse_args()
mapping = MAPPINGS[args.supplier]
if args.input_file.endswith(".xlsx"):
df = pd.read_excel(args.input_file)
else:
df = pd.read_csv(args.input_file)
df = df.rename(columns=mapping)
df = df[["sku", "title", "cost"]]
multiplier = 1.0 + (args.markup / 100.0)
df["price"] = (df["cost"] * multiplier).round(2)
out_path = os.path.join(args.output_dir, f"{args.supplier}_import.csv")
df.to_csv(out_path, index=False)
print(f"Wrote {len(df)} rows to {out_path}")
if __name__ == "__main__":
main()
If you aren't using Python, the same pattern works with commandArgs() in R, a param() block in PowerShell, $1 and $2 in bash, Node, or compiled binaries.
Putting the script on Button
- Sign in at https://button.bitgate.dev.
- Install the Button runner on your computer (macOS, Linux, or Windows) by running the one-line command the site shows you - it's a
curlcommand on macOS and Linux, and PowerShell on Windows. - Open the local setup page and pick your script. You'll approve the exact command that the runner is allowed to execute on your computer, which gets pinned by hash.
- Describe the inputs for the form:
- A choice input for the supplier (
acme,globex). - A file input for the supplier spreadsheet.
- A number input for the markup percentage.
- A choice input for the supplier (
- Publish the tool. Button gives it its own web page.
- Invite the operations people who need to use it. You can revoke their access or set it to expire whenever you want.
What your operations team does
Once you've invited them, your colleagues don't need to install Python, pandas, or the Button runner, and they never pay anything.
- They click the link in their invite email and sign in with Google or a one-time email code.
- On the tool's page, they check that the status shows Ready, then pick the supplier from the dropdown, upload the price list file, and type in the markup percentage.
- They press Run. Button's servers relay the form values and the uploaded file from their browser to your computer, where the runner executes your script.
- When the script finishes, they download the output CSV right from the page.
Why do it this way
Nobody is doing manual copy-paste between spreadsheets anymore, and the same pandas logic runs every single time regardless of who is on shift. Every run is logged with who ran it and when, so you can check the history if someone asks when a price list was converted.
Because the job runs on your computer instead of in Button's cloud, it uses whatever Python setup and packages you already have installed locally. And if you change the tool later, say by adding a new supplier to the dropdown, the people using it have to confirm the new version before they can run it.
Limits and when another tool is the better choice
Button has fixed limits you need to know before you set this up.
| Limit or feature | Free ($0) | Pro ($15/month, or $144/year at $12/month) |
|---|---|---|
| Published tools | 1 | 50 |
| Invited people (you don't count; recipients never pay) | 3 | 250 |
| Runs per month (includes your own runs) | 100 | 5,000 |
| File transfer per month | 1 GB | 50 GB |
| Computers (runners) per workspace | 1 | 1 |
| Max file size | 25 MB per file (up to 8 files and 100 MB per run) | 25 MB per file (up to 8 files and 100 MB per run) |
| Max run duration | 30 minutes | 30 minutes |
| Concurrency | 1 run at a time per computer | 1 run at a time per computer |
| Log size | Up to 1 MB per run | Up to 1 MB per run |
| Retention | Inputs deleted after 24 hours; outputs after 7 days | Inputs deleted after 24 hours; outputs after 7 days |
If you downgrade from Pro to Free later, nothing is deleted. Also, because each workspace only pairs with one computer, pairing a new computer replaces the previous one.
There are plenty of cases where Button is not the right fit and you should use something else:
- Your computer isn't reliably on and online. Because jobs run on your machine, the tool page will show Offline whenever your laptop is asleep or disconnected, and nobody will be able to run the converter. And while one job is running, the page shows Busy because a computer only runs one job at a time. If you need the tool to run when your machine is off, or you need multiple runs happening at the same time, don't use Button.
- Your data can't pass through a third-party server. While the script itself executes on your computer, the form values and uploaded files are relayed through Button's servers on the way to your machine and back, and stay stored until inputs are deleted 24 hours after a run ends (and outputs after 7 days). If your policy forbids files passing through outside servers, keep the workflow off Button.
- Your supplier files are huge or take over half an hour. If a single price list is over 25 MB, a batch is over 8 files or 100 MB, or your script takes more than 30 minutes to finish, it won't fit within Button's limits.
FAQ
What happens if my computer is asleep when someone tries to convert a file?
The tool page shows whether your computer is Ready, Busy, or Offline. If your computer is off or offline, your colleague will see Offline and won't be able to run the script until your machine is back on and connected.
Can a colleague pass extra flags into my script through the form?
No. The runner only executes the exact command you approved on your computer, every form value is passed as its own separate argument without a shell, and form values aren't allowed to start with "-".
Do the people I invite need a paid account?
No, recipients never pay and don't install anything. On the Free plan you can invite up to 3 distinct colleagues, and on the Pro plan you can invite up to 250 (you don't count toward that number).
How long do the uploaded spreadsheets and converted CSVs stay on Button?
Inputs are deleted 24 hours after a run ends. Outputs are deleted after 7 days.
Can I connect two different computers to the same workspace so there's a backup?
No, every plan allows one computer (runner) per workspace. If you pair a new computer, it replaces the previous one.
Last updated
Put your script behind a form
Button turns a script on your computer into a web form. Colleagues sign in, fill it in, press Run and download the results. Free for 1 tool and 3 people.