General Subprocess Proxy Object
Project description
Subproxy
General Subprocess Proxy Object.
Installation
Mostly targetting pip for package management for now:
pip3 install subproxy
Usage
Simplest example:
from subproxy import subproxy
class MyClass:
pass
MyClassProxy = subproxy(MyClass)
# now MyClassProxy may be treated like `MyClass`,
# except when it doesn't work.
Also see the test file for a quick reference.
Limitations
While the proxy generally works, we do have to draw the line somewhere in transitioning between native objects and proxy objects.
Therefore, the below code would work:
MyClassProxy = subproxy(MyClass)
p = MyClassProxy()
p.a = 'b'
print(p.a) # 'b'
But the below code would not work:
MyClassProxy = subproxy(MyClass)
p = MyClassProxy()
p.a = {'a':0, 'b':1}
p.a['a'] = 1
print(p.a['a']) # still 0
This is because p.a
would return a dict
rather than a subproxy(dict)
.
Packaging
# opti
python3 setup.py sdist bdist_wheel
twine upload dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
subproxy-0.0.4.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file subproxy-0.0.4.tar.gz
.
File metadata
- Download URL: subproxy-0.0.4.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cf0b9819be1bf4e8c0a984ff7b7ad3ad9946910ef43f04eca21cbbabdb3a216 |
|
MD5 | 5fba5082e52fc5f29a39f0da1765ae3a |
|
BLAKE2b-256 | 1ae1ec6ac39263799276c997bfa2c54476b7f5df2f1c2191fa2255a4103d23a5 |
File details
Details for the file subproxy-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: subproxy-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77ffeda21fa445253bd24596c9f02e2a577006f981425f703bb495ec10d519a6 |
|
MD5 | 35de92d080525ebbfb1a077bf12c1961 |
|
BLAKE2b-256 | a40aa22eee00314549a414fe860c07e558114acc09e64de5c28f34ea6fb37e2d |