Sunday, 19 March 2023

A Django Cacheable Model

 A cacheable model for django.

Features:

A generic way of creating cache keys from Django model fields

Retrieve django models from cache with field values (cache on the way if cache missed)

Retrieve all the model instances (suitable for small set of models)


GitHub: https://github.com/harisankar-krishna-swamy/django_cacheable_model

Pypi: https://pypi.org/project/django-cacheable-model/

Thursday, 12 November 2020

Data structures using Python: Coils 3.0.1

1) Follow Hari's python datastructure library on GitHub


2) Install

pip install pycoils

3) License

Apache2 License

4) New Features

11 November 2020:

Bit vector data structure

5) List of data structures

Stack using python list
Queue using python list
Heap (Min & Max) using python list.
Binary Search Tree with link inversion traversal
SplayTree -do-
LinkedList
DoublyLinkedList
SeperateChainHashTable (3 types of chaining using LinkedList, SplayTree, BinarySearchTree)
DisjointSetWithUnion (uses uptree nodes and path compression)
PriorityQueues
InternStore
Bit Vector

6) Examples and usage

Refer: pycoils/examples package