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')
Metadata
Release files for sitemap 20191120
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sitemap-20191120.tar.gz | 2.3 kB | Details |
Release files / sitemap-20191120.tar.gz
| Download URL | sitemap-20191120.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f94a36431b24a09ca365a7a218a4a53aea78d3b4c70756f0d8673075da24f752
|
|
BLAKE2b-256 checksum How to use checksums |
a97c9da7ce8a9e6af8bbe5ce0a2baba8fa67f7973273591ed1ca33cb282c9945
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|