Create unique filename for your programmatic SEO website from the title in Python

On your journey into the world of programmatic SEO, at some point, you will need to automatically generate pages for your site based on a database.

For each page, you will have a title, and your script will need to create an HTML file automatically.

This is how I do it.

pip install django
from django.utils.text import slugify
filename = slugify("Page title") + '.html'
>>> page-title.html