snower / pyslock

slock python client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyslock

High-performance distributed sync service and atomic DB. Provides good multi-core support through lock queues, high-performance asynchronous binary network protocols. Can be used for spikes, synchronization, event notification, concurrency control. https://github.com/snower/slock

Install

pip install pyslock

Event

import redis
import pyslock

slock_client = pyslock.Client("localhost")

event = slock_client.Event("test", 5, 120, False)
event.set()
import asyncio
import pyslock

async def run():
    slock_client = pyslock.AsyncClient("localhost")

    event = slock_client.Event("test", 5, 120, False)
    await event.set()

loop = asyncio.get_event_loop()
loop.run_until_complete(run())

License

slock uses the MIT license, see LICENSE file for the details.

About

slock python client

License:MIT License


Languages

Language:Python 100.0%