semvec/pypi-packages huggingface dataset:
augbuilder 0.0.3
A No-code solution to create the images transformation pipeline.
License: MIT
Requires Python: >=3.6

# AugBuilder

[![PyPI version](https://badge.fury.io/py/augbuilder.svg)](https://badge.fury.io/py/augbuilder)

**A No-code solution to create the images transformation pipelin.**

- Installed as a pip package.
- Runs in a browser.
- Uses [Albumentations](https://albumentations.ai/) library to apply transformations.
- **Benchmarks** the pipeline.
- Generates a YAML config and a tiny chunk of python code to **integrate with PyTorch** code.

![Interface image](https://raw.githubusercontent.com/7bits/augbuilder/master/docs/images/screenshot_1.png)

> Powered by [Albumentations](https://albumentations.ai/) and [Streamlit](https://streamlit.io/).

## WIP

Work still in progress.
We'll appreciate any feedback from the community: bug-report, feature-request, pull-request.

You can leave [anonimous feedback here](https://forms.gle/VGkYs4fiLWDexBGV9).

## Installation

You need python 3.6+ and [pip](https://pip.pypa.io/en/stable/installing/) to install the app.

```shell
pip install augbuilder
```

## Usage

### Run the app

Run `augbuilder` from the terminal.

After a few seconds the browser will open the page [localhost:8501](http://localhost:8501).

To stop the application press the `ctrl+c` combination in the terminal.

### Step by step guide

Watch this demo video of usage.

[![youtube video](https://raw.githubusercontent.com/7bits/augbuilder/master/docs/images/video_preview.png)](https://youtu.be/SVppY2Kobm0)

1. Drop an image to the upload area.
2. Use dropdown on left side to select transformations.
3. Configure transformations below the list of dropdowns.
4. Random results are shown in the main area.
5. To regenerate results click "Refresh images" button.
6. Click "Download config" to get the yaml config and a python integration script.

### How to use ONE-OF

Select oneof in list if you want to add this into you transformation list.
Then you can add different transformations in it.
To close oneof select StopOneOf.
Please, don't select THE SAME transformation, it can caused some errors which will be removed later.

### Pipeline config example

```yaml
RandomResizedCrop:
    height: 299
    width: 299
    scale: (0.24, 1.0)
    ratio: (0.75, 1.3333333333333333)
    interpolation: 0
Flip:
Transpose:
OneOf:
    MotionBlur: {'blur_limit': (3, 53)}
    Blur: {'blur_limit': (3, 22)}
ShiftScaleRotate:
    shift_limit: (-0.06, 0.06)
    scale_limit: (-0.1, 0.1)
    rotate_limit: (-90, 90)
    interpolation: 0
    border_mode: 3
    value: [0, 0, 0]
HueSaturationValue:
    hue_shift_limit: (-20, 20)
    sat_shift_limit: (-30, 30)
    val_shift_limit: (-20, 20)
```
flask-rest-crud 0.3.0
Generate full CRUD from mongoengine models
License: MIT
Keywords: flask,mongoengine,crud,rest

# flask-rest-crud

Python package that generate REST API CRUD from mongoengine models.

The generated API can be used with [react-admin](https://marmelab.com/react-admin/DataProviders.html) since it has the [Simple REST Data Provider](https://marmelab.com/react-admin/DataProviders.html) dialect.

## Install

```shell
pip install flask-rest-crud
```

## Usage

```python
from flask_rest_crud import Crud, init_crud_error_handler
from flask_mongoengine import MongoEngine

db = MongoEngine()

class Category(db.Document):
    name = db.StringField(required=True)
    description = db.StringField()

Crud(app, Category, 'categories')

errors = Blueprint('errors', __name__)
init_crud_error_handler(errors, app)
```

## Example

```python
from flask import Flask
from project.crud import Crud
from project.models.category import Category
from flask_mongoengine import MongoEngine
from flask_rest_crud import Crud, init_crud_error_handler

db = MongoEngine()


# models
class Category(db.Document):
    name = db.StringField(required=True)
    description = db.StringField()

class Product(db.Document):
    name = db.StringField(required=True)
    description = db.StringField()
    category = db.ReferenceField(Category)


# Create application
app = Flask(__name__)

# CRUDS
Crud(app, Category, 'categories', '/api/')
Crud(app, Product, 'products', '/api/')


# Error handler

errors = Blueprint('errors', __name__)
init_crud_error_handler(errors, app)


#  mongodb config
app.config['SECRET_KEY'] = '123456790'
app.config['MONGODB_SETTINGS'] = { 'host': 'hosturi' }

# Create models

db.init_app(app)
app = create_app()
app.run()
```

This code will generate the following API endpoints:

| Method             | API calls                                                                                  |
| ------------------ | ---------------------------------------------------------------------------------------    |
| `getList`          | `GET http://my.api.url/api/products?sort=["name","ASC"]&range=[0, 24]&filter={"name":"bar"}`   |
| `getOne`           | `GET http://my.api.url/api/products/123`                                                       |
| `getMany`          | `GET http://my.api.url/api/products?filter={"id":[123,456,789]}`                               |
| `getManyReference` | `GET http://my.api.url/api/products?filter={"category_id":345}`                                |
| `create`           | `POST http://my.api.url/api/products`                                                          |
| `update`           | `PUT http://my.api.url/api/products/123`                                                       |
| `delete`           | `DELETE http://my.api.url/api/products/123`                                                    |