Generically execute any function with a unknown function, module, or set of parameters!
Project description
gexecute
Generically execute any function with a unknown function, module, or set of parameters!
Specify some set of parameters in a dictionary with the only restriction being that it must have all of the parameters with non-default values.
The function and module can either be a string representation or its corresponding object.
If the function exists in another module; you must give either the module object or the package path and module name.
How to Install: pip install gexecute
PiPy https://pypi.org/project/gexecute/
How to use:
def test(a, b, c='test'):
print(a, b, c)
> test(1, 2, 3)
1, 2, 3
> gexec(test, {'a': 1, 'b': 2, 'c': 3})
1, 2, 3
> gexec(test, {'a': 1, 'b': 2})
1, 2, test
# Function name can be an object or string
> gexec('test', {'a': 1, 'b': 2})
1, 2, test
# Any variables not in the function header will not be included in the function call
> gexec(test, {'a': 1, 'b': 2, 'd': 4})
1, 2, test
# If test is in the directory C:\python\test_module.py
> gexec({'a': 1, 'b': 2, 'c': 3}, 'test', module='test_module', package_path='C:\python\')
1, 2, 3
import test_module as module_
> gexec({'a': 1, 'b': 2, 'c': 3}, 'test', module=module_)
1, 2, 3
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
Built Distributions
File details
Details for the file gexecute-0.1.0.tar.gz
.
File metadata
- Download URL: gexecute-0.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
98fbc8e124345587fb05167f9ca50d76caae53e9fc2ab10aec2132cee82d0133
|
|
MD5 |
a318f72ee8dbb7a94cdd0dd4400f217a
|
|
BLAKE2b-256 |
471ef3e12f97adedec2c3fd0e8851cae03d2838d4b6657d475a8884fdf143907
|
File details
Details for the file gexecute-0.1.0-py3.8.egg
.
File metadata
- Download URL: gexecute-0.1.0-py3.8.egg
- Upload date:
- Size: 6.7 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4a265efe3d994ebde6460c1cef1faabba89e134fc49fd81f60c5dcea81537d90
|
|
MD5 |
7cb30b91a0f223a4bd991fc34e012c4d
|
|
BLAKE2b-256 |
ad005ba58c3abe4ca6d9ce210c544f67ca7485303d9527bbf9335d91fab70cf3
|
File details
Details for the file gexecute-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: gexecute-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d8292cb87120c7759c9da352ddb8b7f624cc54f26ef1d90352791a5150892236
|
|
MD5 |
0d8460630fd422c4a8f359fed15bebc3
|
|
BLAKE2b-256 |
621ce64af4836c643df24ca273447b4c4e53b3bb154e4914d309fd26b2ff90f0
|