Metadata-Version: 2.1
Name: code-wake-v1wsgi-service
Version: 0.2.1
Summary: Code Wake V1 WSGI Werkzeug middleware
Home-page: https://github.com/mwri/pycodewake-v1wsgi-service
Author: Michael Wright
Author-email: mjw@methodanalysis.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: bencode.py (~=4.0.0)
Requires-Dist: code-wake (~=0.2.0)
Requires-Dist: werkzeug (~=2.1.2)
Provides-Extra: dev
Requires-Dist: black (==22.3.0) ; extra == 'dev'
Requires-Dist: code-wake-sql14-store (==0.3.0) ; extra == 'dev'
Requires-Dist: code-wake-v1rest-store (==0.2.1) ; extra == 'dev'
Requires-Dist: coverage (==6.2) ; extra == 'dev'
Requires-Dist: flask (==2.1.2) ; extra == 'dev'
Requires-Dist: isort (==5.10.1) ; extra == 'dev'
Requires-Dist: mypy (==0.961) ; extra == 'dev'
Requires-Dist: pytest (==7.0.1) ; extra == 'dev'
Requires-Dist: requests-flask-adapter (==0.1.0) ; extra == 'dev'
Requires-Dist: types-requests (==2.28.0) ; extra == 'dev'

# Python Code Wake V1 WSGI Werkzeug middleware (pycodewake-v1wsgi-service)

[![test](https://github.com/mwri/pycodewake-v1wsgi-service/actions/workflows/test.yml/badge.svg)](https://github.com/mwri/pycodewake-v1wsgi-service/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/mwri/pycodewake-v1wsgi-service/branch/main/graph/badge.svg)](https://codecov.io/gh/mwri/pycodewake-v1wsgi-service)

This store adapter provides a WSGI Werkzeug middleware which provides an implementation of the V1 REST API service.

For example:

```python
import flask
from code_wake_v1wsgi_service import V1WsgiMiddleware
from code_wake_sql14_store import Sql14Store

flask_app = flask.Flask(__name__)
flask_app.wsgi_app = V1WsgiMiddleware(flask_app.wsgi_app, "/some/v1/code_wake/path", Sql14Store("sqlite:///:memory:"))
```

Here, a flask server is created, and the middleware added to it. The parameters for the middleware are
the URL base path (on top of which `/processes`, `/events` and any other restful resources will be
added) and the back end store.

A remote process may then use the `code-wake-v1rest-store` Code Wake store adapter, and via this
middleware, communicate to the back end store provided.

No authentication is provided by the middleware.


