awesome-slugify: A Flexible Python Slugify Function

This repository profile is provided by osrepos.com, an open source repository discovery platform.

awesome-slugify: A Flexible Python Slugify Function

Summary

awesome-slugify is a powerful and flexible Python library designed for converting text into clean, URL-friendly slugs. It offers extensive customization options, including separators, case conversion, and length limits. The library also supports unique slug generation and comes with predefined configurations for various languages and use cases.

Repository Information

Analyzed by OSRepos on July 31, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

awesome-slugify is a highly flexible Python library designed for converting text into clean, URL-friendly slugs. It provides robust functionality to transform various text inputs into consistent formats, handling special characters, spaces, and case sensitivity with ease. This library is ideal for generating slugs for URLs, filenames, or any other context requiring sanitized string representations.

Installation

Installing awesome-slugify is straightforward using pip:

pip install awesome-slugify

Examples

Here are some examples demonstrating the versatility of awesome-slugify:

from slugify import slugify, Slugify, UniqueSlugify
from slugify import slugify_url, slugify_filename
from slugify import slugify_ru, slugify_de

# Basic usage
slugify('Any text')  # 'Any-text'

# Customization
slugify('Any text', to_lower=True)  # 'any-text'

# Using Slugify class for persistent options
custom_slugify = Slugify(to_lower=True)
custom_slugify('Any text')          # 'any-text'
custom_slugify.separator = '_'
custom_slugify('Any text')          # 'any_text'

# Generating unique slugs
unique_slug_gen = UniqueSlugify()
unique_slug_gen('Any text')          # 'any-text'
unique_slug_gen('Any text')          # 'any-text-1'

# Predefined slugify functions
slugify_filename('?r?ft ?2.txt')     # Draft_2.txt
slugify_url('?r?ft ?2.txt')          # draft-2-txt

# Custom pretranslation
my_slugify = Slugify()
my_slugify.separator = '.'
my_slugify.pretranslate = {'?': 'i', '?': 'love'}
my_slugify('? ? ????')                # I.love.borshch

# Language-specific slugification
slugify_ru('? ? ????')                # Ya-borsch
slugify_de('ÜBER Über slugify')       # UEBER-Ueber-slugify

Why Use It

awesome-slugify stands out due to its extensive customization options and powerful features:

  • Flexibility: Offers fine-grained control over slug generation with parameters like to_lower, max_length, separator, capitalize, pretranslate, safe_chars, and stop_words.
  • Unique Slug Generation: The UniqueSlugify class ensures that generated slugs are unique, which is crucial for database entries or file systems.
  • Predefined Configurations: Comes with ready-to-use slugifiers for common scenarios, such as slugify_url and slugify_filename, and supports various languages like Russian, German, and Greek.
  • Custom Unique Checker: Allows integration with external systems, such as databases, to verify slug uniqueness.
  • Easy Integration: Simple API makes it easy to incorporate into any Python project.

Links

Related repositories

Similar repositories that may be relevant next.

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory

September 17, 2026

oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.

AI AgentHermes AgentAI Tools
ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering

ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering

September 17, 2026

ASC is an innovative and exceptionally fast Android decompiler front-end, specifically designed for mobile researchers and agents. It redefines traditional decompilation by directly querying compiled artifacts, offering on-demand code extraction and analysis without heavy preprocessing. This approach results in significantly reduced memory usage and lightning-fast performance, even on large APKs.

AndroidDecompilerReverse Engineering
Open Index: A Deterministic Memory Layer for Your AI Agents

Open Index: A Deterministic Memory Layer for Your AI Agents

September 16, 2026

Open Index is a powerful tool for building domain-specific, accurate, and structured data that AI agents can effectively operate on. It enables the creation of a "brain," a searchable and continuously improving context graph tailored to any domain. This system ensures agents have access to reliable, up-to-date information, enhancing their capabilities and decision-making processes.

AI AgentsKnowledge GraphAgent Memory
tooltrim: Drastically Reduce LLM Agent Tool Output Tokens, Improve Accuracy

tooltrim: Drastically Reduce LLM Agent Tool Output Tokens, Improve Accuracy

September 16, 2026

tooltrim provides drop-in compression for LLM agent tool outputs, drastically cutting tokens while often improving answer accuracy. This provider-agnostic solution offers content-aware compression, faithfulness benchmarks, and seamless integration with popular frameworks or as an OpenAI-compatible proxy.

PythonLLM AgentsContext Compression

Source repository

Open the original repository on GitHub.

17 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️