Skip to main content

Framework-agnostic canonical URL normalization and SEO payload generation

Project description

seoslug

DeepWiki

Canonical URL normalization and deterministic SEO payload generation for content platforms.

Installation

pip install seoslug

For local development:

pip install -e .

Quick usage

from seoslug import SEOConfig, URLPolicy, SEOEntity, build_seo_payload

config = SEOConfig(
    canonical_host="portal.example.com",
    public_base_url="https://portal.example.com",
    url_policy=URLPolicy(
        enforce_https=True,
        lowercase_paths=True,
        trailing_slash="never",
        collapse_duplicate_slashes=True,
        strip_tracking_params=True,
        allowed_query_params=["page", "q"],
    ),
    default_og_image="https://cdn.example.com/default.jpg",
)

entity = SEOEntity(
    entity_type="post",
    slug="my-post",
    title="My Post",
    excerpt="Example excerpt",
    body_html="<p>Body content</p>",
    status="published",
    featured_image="https://cdn.example.com/post.jpg",
)

payload = build_seo_payload(entity, "/posts/my-post", config)

Full docs, API reference, and usage examples are in docs/ and published with MkDocs.

License

MIT, see LICENSE.

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

seoslug-1.0.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

seoslug-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

seoslug-1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file seoslug-1.0.0.tar.gz.

File metadata

  • Download URL: seoslug-1.0.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for seoslug-1.0.0.tar.gz
Algorithm Hash digest
SHA256 de645ce773a1d07d9297a22d6c273d689e132531dab30093c51836a826bb34e8
MD5 fb15017de53aecda7da08d80089a1879
BLAKE2b-256 d517e3f9b70494598d409665711fbb78d4ab145a3549f8e32d6c1fd29591f40a

See more details on using hashes here.

File details

Details for the file seoslug-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: seoslug-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for seoslug-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a509b683dfdbcff82fc9d0e5f8f693d8ade8694d52ae393faab99741d836f102
MD5 d6dc67f4431cbf896d4a062faaa454f3
BLAKE2b-256 1fc8821271b6a84c338516e4f4e1dce6eef4121f118baecb11c0ce40afc2ef40

See more details on using hashes here.

File details

Details for the file seoslug-1.0-py3-none-any.whl.

File metadata

  • Download URL: seoslug-1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for seoslug-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40ba5b6f199942b3e97484ad4616acd40db660068da5599061344b28285206d9
MD5 a3ef4bc0b7953a9507f05a3312e20044
BLAKE2b-256 d8a4ae7d1548b3def341cae5eda0900d7e470b227fd4bea909d42fcd4c42bbec

See more details on using hashes here.

Supported by

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