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
- Import
from sitemap import Sitemap
- Initialize
sitemap = Sitemap()
- Add urls to process them later:
sitemap.add_url("dummy-page")
sitemap.add_url("another-page")
sitemap.add_url("category/foo-bar")
- 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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for sitemap_builder-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f32ac326601c9f62fb0bb5eeebac8fb03d2a1d1c71728b3e59c80d7fefc838ac |
|
MD5 | f116b5611f61eb4ac0e0b6e4e8b3f21d |
|
BLAKE2b-256 | fd7399da1b4505d9063cf7e40678d9445691029de10f14e82ae9ad25a91852f1 |