Resource-manager

Latest version: v0.11.4

Safety actively analyzes 613797 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.11.0

- Added support for value unpacking inside functions:
python
def func(x):
a, b = get_pair(x)
return b - a

- Now the `run-config` console command accepts any valid Python expressions:
bash
run-config some_path.config value[0]

0.10.0

- Now config files are also looked up in `sys.path`, not just the `shortcuts` argument as it was before.
- Added the `update` method, that overwrites the scope with live Python objects:
python
config = read_config('some_path.config').update(value=15, another_value=[1, 2, 3])

- Added a console command that executes a config file given an entry point:
bash
run-config some_path.config value

Here `value` is the name of the entry point.

0.9.3

Default arguments and assertions inside functions are supported now:
python
def func(x, y=1):
assert y > 0, y
return x / y

0.9.2

- Fixed some bugs and misleading behavior
- Function definitions now support decorators
- Added the possibility to define closures with `def`:
python
def adder(func):
def wrapper(x):
return func(x) + 1

return wrapper

- Added the `__file__` name (similar to Python) that is automatically injected into the global scope:
python
some path in the same folder as the config
some_path = __file__.parent / 'meta.txt'

0.9.0

Replaced the custom parser and executor with the one shipped with python.
As a consequence:
- All python expressions are supported.
- The ` partial` syntax is completely removed.

0.7.2

Now this works:
python
x = (a + b) / 2
y = z if x > 2 else z + 1

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.