Metadata-Version: 2.1
Name: bus
Version: 0.0.1
Summary: Aggregate JSON data together
Home-page: https://github.com/CoburnJoe/bus
Author: Joe Coburn
Author-email: joe@scholarpack.com
License: UNKNOWN
Description: # Bus - Python Json Aggregator
        Pre-Alpha project
        
        Takes json payloads and combines them by nesting one in the payload of another using a shared key.
        
        ## Installation
        
        Install with Pip:
        
        ```bash
        pip install bus
        ```
        
        ## Usage
        
        ```python
        from bussing.busses import Bus
        Bus().group(parent='PARENT JSON', child='CHILD JSON', keys=[("id", "shapes")]
        ```
        
        Keys needs to be a list of tuples. The first element is the key ID to match results with,
        and the second is the new name to list items as under the parent.
        
        ## Examples
        
        Given:
        
        ```json
        [
           {
              "id":"Apples",
              "colours":[
                 "Red",
                 "Green"
              ]
           },
           {
              "id":"Bananas",
              "colours":[
                 "Yellow"
              ]
           },
           {
              "id":"Mangos",
              "colours":[
                 "Orange",
                 "Green"
              ]
           }
        ]
        ```
        
        And:
        
        ```json
        [
           {
              "id":"Apples",
              "round":true
           },
           {
              "id":"Bananas",
              "round":false
           }
        ]
        ```
        
        You can combine these results into one payload:
        
        ```json
        [
           {
              "id":"Apples",
              "colours":[
                 "Red",
                 "Green"
              ],
              "shapes":{
                 "round":true
              }
           },
           {
              "id":"Bananas",
              "colours":[
                 "Yellow"
              ],
              "shapes":{
                 "round":false
              }
           },
           {
              "id":"Mangos",
              "colours":[
                 "Orange",
                 "Green"
              ]
           }
        ]
        ```
        
        
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha  
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
