API Reference
Proxied
A metaclass that proxies attribute access to another object.
Source code in proxy/proxy.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
__new__
Create a new class with proxied attribute access.
Source code in proxy/proxy.py
31 32 33 34 35 36 37 38 39 | |
proxy
Create a proxy instance for the given target.
The given target can be accessed via __proxied__ attribute.
If a proxy class defines its own __init__() method, you can provide arguments using *args and **kwargs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cls |
type[T]
|
The class of the proxy. |
required |
target |
Any
|
The target object to be proxied. |
required |
*args |
Any
|
Additional arguments for |
()
|
**kwargs |
Any
|
Additional keyword arguments for |
{}
|
Returns:
| Type | Description |
|---|---|
T
|
A proxy instance for the target object. |
Source code in proxy/proxy.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
Proxy
A metaclass that combines Proxied and type.
Source code in proxy/proxy.py
75 76 | |
__new__
Create a new class with proxied attribute access.
Source code in proxy/proxy.py
31 32 33 34 35 36 37 38 39 | |
proxy
Create a proxy instance for the given target.
The given target can be accessed via __proxied__ attribute.
If a proxy class defines its own __init__() method, you can provide arguments using *args and **kwargs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cls |
type[T]
|
The class of the proxy. |
required |
target |
Any
|
The target object to be proxied. |
required |
*args |
Any
|
Additional arguments for |
()
|
**kwargs |
Any
|
Additional keyword arguments for |
{}
|
Returns:
| Type | Description |
|---|---|
T
|
A proxy instance for the target object. |
Source code in proxy/proxy.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |
ABCProxy
A metaclass that combines Proxied and ABCMeta.
Source code in proxy/proxy.py
79 80 | |
__new__
Create a new class with proxied attribute access.
Source code in proxy/proxy.py
31 32 33 34 35 36 37 38 39 | |
proxy
Create a proxy instance for the given target.
The given target can be accessed via __proxied__ attribute.
If a proxy class defines its own __init__() method, you can provide arguments using *args and **kwargs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cls |
type[T]
|
The class of the proxy. |
required |
target |
Any
|
The target object to be proxied. |
required |
*args |
Any
|
Additional arguments for |
()
|
**kwargs |
Any
|
Additional keyword arguments for |
{}
|
Returns:
| Type | Description |
|---|---|
T
|
A proxy instance for the target object. |
Source code in proxy/proxy.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |