Metadata-Version: 2.1
Name: lean-manufacturing
Version: 0.1.6
Summary: UNKNOWN
License: UNKNOWN
Platform: UNKNOWN
Description-Content-Type: text/markdown

# Lean manufacturing for Python
* Use lean manufacturing concepts to optimize python workflow. 
* Organize and access your workflow through a mongodb local installation.
* Make your relevant functions independent from each other.
* Configure your functions through mongodb while your scripts are running.
* Measure setup duration, process duration and lead time.
* Monitor the status of each worker in real time.

#
## The lean principles behind it
* Define value for the customer
* Determine the value stream for each product
* Create a free flow of materials and a backwards flow of information
* Implement a pull system in the costumer-supplier relationship
* Continously pursue perfection

#
## General concept
![](https://github.com/justicasimples/public/raw/263c22f95d701413fe6c271b8fb0b0bfa750049c/ValueStream.png)

#
## Requirements

You'll need a localhost default installation of the community version of MongoDb (i.e. accessible at *mongodb://localhost:27017*).

This is a great and easy-to-use database, completely free. Please see https://www.mongodb.com/docs/manual/installation/ if you need help with the installation.

### Not required, but useful

Mongodb Compass is a free software from mongodb that allows you to visually edit your mongodb databases. Please see https://www.mongodb.com/products/compass if you want to download it.

#
## Usage
### Getting the input from a supplier remote mongodb installation


    @Lean.value_stream('my_value_stream',
        process='my_first_process',
        supplier={
            uri: 'your mongodb uri',
            db: 'db_name',
            collection: 'collection_name',
            aggregation: [{'$project': {'_id': 0}}],
            unique: 'field_a'
        },
        client={
            unique: 'field_b'
        }
    )

    def my_function(input, **config):
        
        # do something with input
        output = [element for element in input]

        return output


### Getting the input from another supplier process
    @Lean.value_stream('my_value_stream',
        process='my_other_process',
        supplier={
            collection: 'my_value_stream.my_first_process',
            unique: 'field_b'
        },
        client={
            unique: 'field_c'
        }
    )

    def my_function(input, **config):
    
    # do something with input
    output = [element for element in input]

    return output

