[{"data":1,"prerenderedAt":97},["ShallowReactive",2],{"topic:web-apps":3},[4,13,18,24,29,34,39,45,51,56,61,66,71,77,82,87,92],{"path":5,"title":6,"description":7,"type":8,"topics":9,"kind":12},"\u002Fautomating-reporting-workflows\u002Fscheduling-python-excel-scripts-with-cron\u002Fschedule-excel-reports-with-celery-beat","Schedule Excel Reports with Celery Beat","Run recurring Excel reports inside an application that already uses Celery: a report task with automatic retries and time limits, a beat schedule with crontab entries in the right time zone, the rule that exactly one beat process may run, testing the task with a real in-process worker, and database-backed schedules people can edit.","how-to",[10,11],"scheduling","web-apps",null,{"path":14,"title":15,"description":16,"type":8,"topics":17,"kind":12},"\u002Fautomating-reporting-workflows\u002Fscheduling-python-excel-scripts-with-cron\u002Ftrigger-an-excel-report-from-a-webhook","Trigger an Excel Report from a Webhook","Build an Excel report the moment something happens instead of on a timer: a small FastAPI endpoint that receives a webhook, verifies its HMAC signature and timestamp, ignores duplicate deliveries, answers within milliseconds with 202 Accepted, and builds the workbook in the background — tested end to end with FastAPI's test client.",[10,11],{"path":19,"title":20,"description":21,"type":22,"topics":23,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps","Serving Excel Files from Python Web Apps","Generate and return .xlsx from Flask, FastAPI and Django: in-memory workbooks, correct headers, streaming, background jobs for slow reports, and safe filenames.","guide",[11],{"path":25,"title":26,"description":27,"type":8,"topics":28,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fadd-an-export-to-excel-action-in-django-admin","Add an Export to Excel Action in Django Admin","Give every Django admin changelist a proper Excel export: a reusable ModelAdmin mixin that turns list_display into columns with their admin labels, readable choice and boolean values, local dates, an action for selected rows and a button that exports everything matching the current filters, a dedicated export permission, a row limit, and tests with the Django test client.",[11],{"path":30,"title":31,"description":32,"type":8,"topics":33,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fbuild-a-gradio-app-that-cleans-an-uploaded-excel-file","Build a Gradio App That Cleans an Uploaded Excel File","Give colleagues a browser tool for cleaning their own Excel files with Gradio: upload a workbook, pick the sheet from a list filled in on upload, choose cleaning options, see a preview and a summary of what changed, and download the cleaned file, with friendly error messages, upload limits, temporary-file clean-up and tests through the Gradio client.",[11],{"path":35,"title":36,"description":37,"type":8,"topics":38,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fbuild-a-streamlit-app-to-upload-and-download-excel","Build a Streamlit App to Upload and Download Excel Files","Turn an Excel-processing script into a small web app with Streamlit — upload a workbook, pick a sheet and columns, see the result and download it as a new .xlsx. Covers reading uploads in memory, caching so every click does not re-read the file, building the download only when it is clicked, friendly errors, upload limits and tests with AppTest.",[11],{"path":40,"title":41,"description":42,"type":8,"topics":43,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fbuild-an-excel-workbook-in-memory-with-bytesio","Build an Excel Workbook in Memory with BytesIO","Create .xlsx entirely in memory with pandas, xlsxwriter or openpyxl: the close-and-seek rules, in_memory mode, sending bytes to S3 or email, and reading them back.",[11,44],"writing-excel",{"path":46,"title":47,"description":48,"type":8,"topics":49,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fcache-generated-excel-files-in-a-web-app","Cache Generated Excel Files in a Web App","Stop a web app rebuilding the same Excel export on every click: key a file cache on the request parameters plus a data version, write cached workbooks atomically, answer repeat downloads with an ETag and 304 Not Modified, keep two users from building the same file at once, and evict old files by age and total size — tested end to end with Flask's test client.",[11,50],"large-files",{"path":52,"title":53,"description":54,"type":8,"topics":55,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fdownload-an-excel-file-from-a-dash-app","Download an Excel File from a Dash App","Add an \"Export to Excel\" button to a Plotly Dash dashboard: dcc.Download with a callback that sends exactly the data the user filtered, a formatted multi-sheet workbook built in memory, a sensible file name, unit tests that call the callback and open the workbook it returns, and a Flask route on the Dash server for exports too large to send through a callback.",[11,44],{"path":57,"title":58,"description":59,"type":8,"topics":60,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fexport-a-django-queryset-to-excel","Export a Django Queryset to Excel","Turn a Django queryset into a formatted .xlsx download: values() and related fields, iterator() for large exports, permissions, admin actions and a view test.",[11,44],{"path":62,"title":63,"description":64,"type":8,"topics":65,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fgenerate-large-excel-exports-in-a-background-job","Generate Large Excel Exports in a Background Job","Stop big \"Export to Excel\" requests from timing out: accept the request and return a job ID at once, build the workbook in a background worker that streams rows from the database into xlsxwriter's constant-memory mode, report progress through a status endpoint, serve the finished file by link, and expire old files.",[11,50],{"path":67,"title":68,"description":69,"type":8,"topics":70,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fhandle-an-uploaded-excel-file-in-flask-and-fastapi","Handle an Uploaded Excel File in Flask and FastAPI","Receive a spreadsheet upload safely: body-size limits, magic-byte checks, BytesIO parsing, column validation with real sheet row numbers, and background processing for large files.",[11],{"path":72,"title":73,"description":74,"type":8,"topics":75,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fimport-an-excel-file-into-django-models","Import an Excel File into Django Models","Load a spreadsheet of products, customers or prices into a Django database the safe way: read every cell as text, validate each row with the model's own full_clean, report errors by Excel row number, reject duplicate keys in the file, create missing related objects, upsert everything in one transaction with bulk_create, and return an error workbook the uploader can fix.",[11,76],"data-validation",{"path":78,"title":79,"description":80,"type":8,"topics":81,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Freturn-an-excel-file-from-a-flask-download-endpoint","Return an Excel File from a Flask Download Endpoint","A complete Flask export route: build the workbook in memory, set the download headers, format the sheet, handle empty results and errors, and test the response.",[11],{"path":83,"title":84,"description":85,"type":8,"topics":86,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Freturn-an-excel-file-from-aws-lambda-through-api-gateway","Return an Excel File from AWS Lambda Through API Gateway","Serve a generated Excel workbook as a download from an AWS Lambda function behind API Gateway: build the file in memory, return it base64-encoded with isBase64Encoded, the right headers and filename, the extra binary media type setting a REST API needs, validation of query parameters, the 6 MB response limit and a pre-signed S3 redirect for bigger files, tested locally with event dictionaries and moto.",[11,10],{"path":88,"title":89,"description":90,"type":8,"topics":91,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fstream-an-excel-file-from-a-fastapi-endpoint","Stream an Excel File from a FastAPI Endpoint","Serve .xlsx from FastAPI without blocking the event loop: StreamingResponse, sync versus async routes, threadpool offload, background jobs and typed error handling.",[11],{"path":93,"title":94,"description":95,"type":8,"topics":96,"kind":12},"\u002Fautomating-reporting-workflows\u002Fserving-excel-files-from-python-web-apps\u002Fvalidate-an-uploaded-excel-file-in-a-web-app","Validate an Uploaded Excel File Before Processing It in a Web App","Check an uploaded workbook in layers, cheapest first — the bytes, the zip container, then the rows — so renamed CSVs, old .xls files, password-protected workbooks, macros, external links and compression bombs are refused in under a millisecond, and data errors come back as a list of exact cells the user can fix.",[11,76],1790972052271]