Metadata-Version: 2.1
Name: dynamic-function-loader
Version: 0.0.1
Summary: Dynamically loads a function from code represented as a string.
Home-page: https://github.com/QuiNovas/dynamic-function-loader
Author: Joseph Wortmann
Author-email: jwortmann@quinovas.com
License: Apache 2.0
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown

# dynamic-function-loader

### 

## Installation
```
pip install dynamic-function-loader
```


## Overview
dynamic-function-loader allows dynamically loading a Python function into the current execution environment from a `string`.

### Usage

```python
import dynamic_function_loader

f = dynamic_function_loader.load("def foo():\n    return 'bar'")
f()

```

### Note
All Python packages used by the imported function must be loaded _within_ the function itself. For example:

```python
def foo(regex):
  import re
  return re.compile(regex)
```


