Skip to main content

Sitemap library

Project description

Sitemap library for dynamically generating sitemap.xml

https://img.shields.io/pypi/v/sitemap.svg

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-20191120.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file sitemap-20191120.tar.gz.

File metadata

  • Download URL: sitemap-20191120.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

Hashes for sitemap-20191120.tar.gz
Algorithm Hash digest
SHA256 f94a36431b24a09ca365a7a218a4a53aea78d3b4c70756f0d8673075da24f752
MD5 9afd2a446b6a0539f629684efbe5a26c
BLAKE2b-256 a97c9da7ce8a9e6af8bbe5ce0a2baba8fa67f7973273591ed1ca33cb282c9945

See more details on using hashes here.

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