Boilerplate tools for python based projects.
Go to file
László Károlyi 5137746f83
Fix Path.get_relative
2024-03-17 14:07:46 +01:00
src/ktools Fix Path.get_relative 2024-03-17 14:07:46 +01:00
.gitignore Initial commit 2023-05-13 19:40:40 +02:00
.isort.cfg Initial commit 2023-05-13 19:40:40 +02:00
LICENSE Initial commit 2023-05-13 19:40:40 +02:00
README.md Add slugify 2023-05-21 20:05:22 +02:00
__init__.py Initial commit 2023-05-13 19:40:40 +02:00
setup.py Make Django requirements optional 2024-03-10 19:39:36 +01:00

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.