semvec/pypi-packages huggingface dataset:
faust-pydantic-validate 0.0.2
A small decorator for post data view validation
Requires Python: >=3.6

# Dillinger

faust-pydantic-validate is a small decorator to validate post data.

### Installation

```
pip install faust-pydantic-validate
```

### Usage


```
from pydantic import BaseModel
from faust.types.web import Request, Response
from faust.web import View
from faust_pydantic_validate.wrappers import takes_pydantic

app = faust.App(
    'foo',
    broker='kafka://localhost:9092',
)


class FooBar(BaseModel):
    foobar: int


@app.page('/build/')
class Builder(View):

    @takes_pydantic(FooBar, include_schema=True)
    async def post(self, request: Request, validated_object: BaseModel, **kwargs: Any) -> Response:
        return self.json(value=validated_object.dict())

```
---
##### Request data
```
{
    "foobar": 1
}
```
##### Response data
```
{
    "foobar": 1
}
```
-----
##### Request data
```
{
    "foobar": "foo"
}
```
##### Response data (include_schema=True)
```{
    "errors": [
        {
            "loc": [
                "foobar"
            ],
            "msg": "value is not a valid integer",
            "type": "type_error.integer"
        }
    ],
    "schema": {
        "title": "FooBar",
        "type": "object",
        "properties": {
            "foobar": {
                "title": "Foobar",
                "type": "integer"
            }
        },
        "required": [
            "foobar"
        ]
    }
}
```

##### Response data (include_schema=False)
```
{
    "errors": [
        {
            "loc": [
                "foobar"
            ],
            "msg": "value is not a valid integer",
            "type": "type_error.integer"
        }
    ]
}
```
---
mlp-image-classifier 1.0.7
Supervised classification of an multi-band image using an MLP (Multi-Layer Perception) Neural Network Classifier. Based on the Neural Network MLPClassifier by scikit-learn. Dependencies: pyqtgraph, matplotlib and sklearn. See homepage for clear installation instructions.
Keywords: supervised classification,neural network,remote sensing,mlp,multi-layer perception classifier,image classification

######################################
About the Neural Network MLPClassifier
######################################

The *Neural Network MLPClassifier* software package is both a QGIS plugin and stand-alone python package
that provides a supervised classification method for multi-band passive optical remote sensing data.
It uses an MLP (Multi-Layer Perception) Neural Network Classifier and is based on the Neural Network MLPClassifier
by scikit-learn: https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPClassifier.html.

The program was originally developed by Lieven P.C. Verbeke (Ghent University, Laboratory of Forest Management and
Spatial Information Techniques). It was written in C++ and ported to PyQGIS in 2019 - 2020. It has been developed in an
open source environment to encourage further development of the tool.

The **instruction pages** can be found at <https://mlp-image-classifier.readthedocs.io>.

The code **repository** can be found at https://bitbucket.org/kul-reseco/lnns.

**PLEASE GIVE US CREDIT**

When using the Neural Network MLPClassifier, please use the following citation:

*Crabbé, A. H., Cahy, T., Somers, B., Verbeke, L.P., Van Coillie, F. (2020). Neural Network MLPClassifier*
*(Version x.x) [Software]. Available from https://bitbucket.org/kul-reseco/lnns.*

**ACKNOWLEDGEMENTS**

The software and user guide are based on the Linear Neural Network Simulator [C++ software]:
Ghent University, Laboratory of Forest Management and Spatial Information Techniques, Lieven P.C. Verbeke

The revision into a QGIS plugin is funded primarily through BELSPO (the Belgian Science Policy Office) in the framework
of the STEREO III Programme – Project LUMOS - SR/01/321.

The LUMOS logo was created for free at https://logomakr.com.

**SOFTWARE LICENSE**

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License (COPYING.txt). If not see www.gnu.org/licenses.