{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/13"}],"enrichment":{"capability":"Generates sortable string keys for inserting items into ordered sequences without requiring full re-indexing, using fractional indexing to compute positions between existing keys.","skillfed_tags":["collaborative-editing","ordering-algorithm","distributed-systems"],"use_cases":["Collaborative document editors where multiple users insert paragraphs/sections concurrently without a central server assigning indices","Todo list applications storing item order as string keys in a database, allowing insertions between items without updating all subsequent records","Real-time multiplayer games maintaining player action order or entity positions in a way that merges concurrent updates","CMS systems storing content hierarchy where new pages can be inserted between existing ones without reordering the entire tree","Distributed databases or event logs where you need a total ordering that can be computed locally without coordination"],"what_it_does":"Fractional indexing is a technique for generating sortable string keys that represent positions in an ordered sequence. Instead of storing explicit numeric indices that require recalculation when items are inserted, you generate a key that sorts between any two existing keys\u2014or at the beginning or end if no neighbors exist. This is particularly useful in collaborative editing systems where multiple clients insert items concurrently without coordinating a central sequence number.\n\nThe package provides three main functions: `generate_key_between()` to create a single key between two positions, `generate_n_keys_between()` to generate multiple keys at once, and `validate_order_key()` to check if a key is valid. By default it uses Base62 encoding, but you can supply custom digit sets. The implementation includes variable-length integers and prepend/append optimizations from the original design.","worth_installing":"Yes, if you need to maintain ordered sequences in a collaborative or distributed context. The package is lightweight, permissively licensed, and solves a specific problem well. The main caveat is that the last release was over a year ago despite active repository commits\u2014verify it works with your target Python version before relying on it in production."},"id":"fractional-indexing","links":{"html":"https://skillfed.io/packages/fractional-indexing","md":"https://skillfed.io/packages/fractional-indexing.md","pypi":"https://pypi.org/project/fractional-indexing/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-08-13","license_spdx":null,"license_treatment":"permissive","name":"fractional-indexing","python_support":"unspecified","summary":"Provides functions for generating ordering strings"},"popularity":{"monthly_downloads":217545,"position":9356,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.3"}
