Skip to main content

Generate sitemaps from programmatically collected URLs

Project description

Sitemap Builder

Generate sitemaps from programmatically collected URLs.

Features

  • Generates an index that points to compressed sitemaps files
  • each generated sitemap won't have more than the allowed amount of 50.000 URLs
  • jinja2 templates

Install

pip install sitemap-builder

Usage

  1. Import
from sitemap import Sitemap
  1. Initialize
sitemap = Sitemap()
  1. Add urls to process them later:
sitemap.add_url("dummy-page")
sitemap.add_url("another-page")
sitemap.add_url("category/foo-bar")
  1. Generate sitemap index and files
sitemap.generate()

Example:

Generated files:

.
├── sitemap.xml
└── sitemaps
    ├── sitemap-0.xml.gz
    ├── sitemap-1.xml.gz
    ├── sitemap-2.xml.gz
	└── sitemap-3.xml.gz

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sitemap-builder-0.0.1.tar.gz (2.9 kB view hashes)

Uploaded source

Built Distribution

sitemap_builder-0.0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page