Metadata-Version: 2.1
Name: Semaphore-Microservice
Version: 0.1.1
Summary: A HTTP-based microservice offering a ReST API to acquire and release resources that are limited with a semaphore semantic.
Home-page: https://github.com/Paebbels/Semaphore-Microservice
Author: Patrick Lehmann
Author-email: Paebbels@gmail.com
License: UNKNOWN
Project-URL: Documentation, https://Semaphore-Microservice.readthedocs.io/en/latest/
Project-URL: Source Code, https://github.com/Paebbels/Semaphore-Microservice
Project-URL: Issue Tracker, https://github.com/Paebbels/Semaphore-Microservice/issues
Keywords: Python3 Exceptions
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Requires-Dist: ruamel.yaml
Requires-Dist: py-flags
Requires-Dist: pyAttributes
Requires-Dist: pyExceptions
Requires-Dist: pyGenericPath
Requires-Dist: pyHTTPInterface
Requires-Dist: pyHTTPServer
Requires-Dist: pyHTTPRequestRouter
Requires-Dist: SphinxExtensions

![PyPI - License](https://img.shields.io/pypi/l/Semaphore-Microservice)
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/Paebbels/Semaphore-Microservice) 
![GitHub release (latest by date)](https://img.shields.io/github/v/release/Paebbels/Semaphore-Microservice)
[![Documentation Status](https://readthedocs.org/projects/semaphore-microservice/badge/?version=latest)](https://semaphore-microservice.readthedocs.io/en/latest/?badge=latest)  
[![PyPI](https://img.shields.io/pypi/v/Semaphore-Microservice)](https://pypi.org/project/Semaphore-Microservice/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Semaphore-Microservice)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/Semaphore-Microservice)
![PyPI - Status](https://img.shields.io/pypi/status/Semaphore-Microservice)

# Semaphore Microservice

This HTTP-based microservice offers a ReST API to acquire and release resources
that are limited with a *semaphore* semantic.

## Use Cases
### Limited Number of Licenses in an Continuous Integration Environment

Some software uses a global license server to checkout licenses while the software
is executed. By default many license consumers (clients) fail and abort the
execution if no valid license was found or if no license was free for a checkout.
In such cases, a CI pipeline would also fail, because the job is failing caused by
the license error. In many cases there are no retries nor waits for a license to
become valid or available again. More over waiting time would be counted as job
execution time.

This semaphore service allow to acquire a license virtually before asking the actual
license server. If no license is available, it will either wait or register a
callback for the real working job.

## Operations


## Architecture

```
Application => WebServer     => HTTPInterface => Router => API => Semaphore => storage  
Daemon     / \ NGINX + WSGI /
```

## API
### v1.0


