{"categories":[{"label":"Database","url":"https://skillfed.io/packages/category/database/3"}],"enrichment":{"capability":"Provides distributed locking primitives backed by MySQL's GET_LOCK function, allowing multiple application instances to coordinate exclusive access to named resources through a shared MySQL database.","skillfed_tags":["distributed-locking","mysql-coordination","abandoned"],"use_cases":["Coordinate scheduled job execution across multiple application servers so only one instance runs a critical task at a time.","Prevent race conditions when multiple instances need exclusive access to a shared resource managed through MySQL.","Implement leader election or primary-replica coordination in a cluster without deploying additional infrastructure.","Serialize access to database operations that cannot tolerate concurrent modification from multiple application instances.","Gate one-time initialization or migration tasks that should run exactly once across a fleet of servers."],"what_it_does":"PyMySQLLock wraps MySQL's GET_LOCK function to provide a simple distributed locking mechanism for coordinating work across multiple Python application instances that share a common MySQL database. Instead of adding external systems like Zookeeper or etcd, it leverages your existing MySQL infrastructure to ensure only one instance holds a lock at a time and can execute protected tasks.\n\nThe package exposes a Locker class that takes standard MySQL connection parameters, then creates named Lock objects that can be acquired with optional timeouts and released when done. It maintains the lock by periodically pinging the MySQL connection in the background to prevent idle disconnection. You can also query all currently held locks on the database.","worth_installing":"No. The package is abandoned (last release 2020-09-13, no maintenance since) and classified as pre-alpha. While the concept is sound and the MIT license is permissive, the lack of updates means no fixes for bugs, compatibility issues with modern Python or MySQL versions, or security concerns. Consider a maintained alternative like a Redis-based lock library or a purpose-built distributed coordination tool unless you have a very stable, isolated deployment and can accept the risk of no future support."},"id":"pymysqllock","links":{"html":"https://skillfed.io/packages/pymysqllock","md":"https://skillfed.io/packages/pymysqllock.md","pypi":"https://pypi.org/project/pymysqllock/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2020-09-13","license_spdx":null,"license_treatment":"permissive","name":"PyMySQLLock","python_support":"supports_current","summary":"MySQL Backed Locking Primitive"},"popularity":{"monthly_downloads":255021,"position":8485,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.2.0"}
