Boilerplate tools for python based projects.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
László Károlyi 4dd581abea
Add slugify
1 week ago
src/ktools Add slugify 1 week ago
.gitignore Initial commit 3 weeks ago
.isort.cfg Initial commit 3 weeks ago
LICENSE Initial commit 3 weeks ago
README.md Add slugify 1 week ago
__init__.py Initial commit 3 weeks ago
setup.py Add slugify 1 week ago

README.md

Ktools

This module contains boilerplate for python projects, mostly based on django.

Contents

Django

ktools.django.db.models.fields.PositiveAutoField

A mysql-based AutoField that will use an UNSIGNED INT for a primary field.

Use this in django's settings.py:

DEFAULT_AUTO_FIELD = 'ktools.django.db.models.fields.PositiveAutoField'

Cache

ktools.cache.functional.memoized_method

A decorator to cache return values of a method (of a class) until the class is used. Parameters are that of lru_cache() since it uses that function under the hood.

ktools.django.utils.text.slugify

Function to return an ASCII-safe slugified string from any utf-8 string.