Skip to main content

lockable resource module

Project description

lockable

Resource locking module for python.

Originally designed for following projects:

API's

Constructor

lockable = Lockable([hostname], [resource_list_file], [lock_folder])

Allocation

allocation = lockable.lock(requirements, [timeout_s])
print(allocation.resource_info)
print(allocation.resource_id)
allocation.unlock()
# or using resource info
lockable.unlock(allocation.resource_info)

or using context manager which unlock automatically

with lockable.auto_lock(requirements, [timeout_s]) as resource_info:
    print(resource_info)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lockable-0.2.0.tar.gz (7.1 kB view hashes)

Uploaded Source

Built Distribution

lockable-0.2.0-py3-none-any.whl (5.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page