Sitemap library
Project description
Sitemap library for dynamically generating sitemap.xml
Installation
pip install sitemap
Usage
Urlset
from sitemap import Url, Urlset
urlset = Urlset()
url = Url('https://www.example.com/', changefreq='weekly')
urlset.add_url(url)
# urlset.to_string()
urlset.write_xml('sitemap.xml')
Siteindex
from sitemap import Sitemap, Siteindex
siteindex = Siteindex()
sitemap = Sitemap('https://www.example.com/sitemap.xml')
siteindex.add_sitemap(sitemap)
# siteindex.to_string()
siteindex.write_xml('sitemap.xml')
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-20191121.tar.gz
(2.3 kB
view details)
File details
Details for the file sitemap-20191121.tar.gz
.
File metadata
- Download URL: sitemap-20191121.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00570c0306f697c8786262e105822418bb7bce4826d862991932fad5117002e6 |
|
MD5 | 3ce106435f0f30b3cee6f6948df5c25b |
|
BLAKE2b-256 | 1bdf4b9c43a9ae042c634d7d19e3a172fc1a88bd139cade8050b3e87d5f3a839 |