Metadata-Version: 2.4
Name: MultiProxPy
Version: 0.2.1
Summary: An easy way to combine multiple objects into one
License-Expression: Apache-2.0
License-File: LICENSE
Author: Eric aka CheesecakeTV
Author-email: eric@swiftgui.de
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Project-URL: Documentation, https://github.com/CheesecakeTV/MultiProxPy
Project-URL: Repository, https://github.com/CheesecakeTV/MultiProxPy
Description-Content-Type: text/markdown

# MultiProxPy
A small python-package that allows you to "group" calls to objects.

The cool part is that the resulting "MultiProxy"-object can be used like the referenced objects:
```py
from MultiProxPy import group_objects

list1 = [3,1,2]
list2 = [5,2]
list3 = [7,8,9]

list_proxy = group_objects(list1, list2, list3)

list_proxy.sort()   # Sorts all lists
list_proxy.append(15)   # Appends 15 to all lists
list_proxy[0] = -1  # Sets the first elemet to 0 for all lists

print(list1, list2, list3)
```
The grouping is very abstract and should work with any type of object.

The best part is that your IDE will treat the proxy-object like one of the contained objects.
It will suggest methods/attributes bound to that class:\
![img.png](https://github.com/CheesecakeTV/MultiProxPy/blob/main/assets/images/SuggestionsOnProxyObject.png)\
(The image might not show on PyPi. Here is the link: https://github.com/CheesecakeTV/MultiProxPy/blob/main/assets/images/SuggestionsOnProxyObject.png)

Other examples can be found in the github-repository: https://github.com/CheesecakeTV/MultiProxPy

## Limitations
There are a few downsides you should be aware of.

1. Any return-value on proxy-calls will be lost
2. Simmilarely, math operations like additions don't work for the proxy. However, inline-operations do, e.g.: `list_proxy += [5]`
3. The proxy can't fool `isinstance`, e.g.: `isinstance(list_proxy, list)` will return `False`
4. Objects inside the proxy should have the same type, or a derived one. This is only a suggestion. If you are careful enough, you can mix different types


