Metadata-Version: 2.1
Name: argumentize
Version: 1.0.4
Summary: Simple library for patching function inner scope 
Home-page: UNKNOWN
Author: liubomyr.ivanitskyi
Author-email: lubomyr.ivanitskiy@gmail.com
License: MIT License
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE.md

**Argumentize** decorator allow convert any function into kind a 'pure' function that eliminate all globals and closures
as
a implicit dependencies but allow them to be passed as regular key-value arguments.

Here is a simple example:

```python
from argumentize import argumentize

x = 100


def foo(a, b, c):
    return a + b + c + x


foo = argumentize(foo)

foo(1, 2, 3)  # 106
foo(1, 2, 3, x=10)  # 16
```

Argumentized can be any dependency not only a variable. Here is how you can use it with a function:

```python
from argumentize import argumentize


def foo(a, b, c):
    return a + b + c


def bar(a, b, c, d):
    return foo(a, b, c) + d


bar = argumentize(bar)

bar(1, 2, 3, 4)  # 10

bar(1, 2, 3, 4, foo=lambda a, b, c: a * b * c)  # 24
```

Argumentize can be used as a decorator:

```python

from argumentize import argumentize


@argumentize
def foo(a, b, c):
    return a + b + c


foo(1, 2, 3)  # 6

foo(1, 2, 3, b=10)  # 14
```

If you does not provide the value for argumented argument the default variable (either from globals or from the function
closure) will be used

# How to deploy
We use setup.py and setup.cfg to deploy the package to PyPI. To create a source distribution and upload it to PyPI, run the following commands:
```bash
python setup.py sdist
```

Install twine if you haven't already:
```bash
pip install twine
```

Then upload the package to PyPI:
```bash
twine upload dist/*
```

