Netargparse

Latest version: v2.0.1

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

Scan your dependencies

Page 1 of 3

2.0.1

Refactor internal argument destination, tests and docs

2.0.0

Add POSIX compliance to API mode argument handling
Escaping with `\`, enclosing with quotes and the overall argument handling when started as nap is now POSIX-compliant. E.g. in the previous version
- `?-x=hello\world` resulted in `hello\world`, now it results in `helloworld`
- `?-x=hello\ world` resulted in an error (when `x` was not set to `nargs="+"`), now it results in `hello world`
- `?-x="hello\world"` is not affected by this change

Standalone mode is unaffected and argument handling still depends on the host shell.

1.0.0

Restrict the function's return on autoformat
When the function started by NetArgumentParser returned e.g. a string, querying a json response worked but an xml response not. Vice versa, when the dictionary contained a numpy number, querying the xml response worked but the json response not, because the numpy number is not json serializable. Now, a **dictionary must be returned when autoformat is used** and the values of the dict must be either a nested dict, string or another non-dict/non-iterable that is convertible to str and json serializable. These rules apply to the nested dictionaries recursively.

Further, that what causes an error for the json conversion will also cause an error for the xml conversion and the other way round (better both response types work or do not work the same way than one response format works and the other not).

0.2.3

Fix nested dictionaries in autoformat in xml return
When the return of the function is e.g. `{"a": "a1", "x": {"b": "b1", "c": "c1"}}`, the xml message was wrong

[...]
<a>a1</a>
<x>{'b': 'b1', 'c': 'c1'}</x>
[...]


Corrected to

[...]
<a>a1</a>
<x>
<b>b1</b>
<c>c1</c>
</x>
[...]

0.2.2

Fix typo in src/ to test the improved automation in the CI/CD pipeline

0.2.1

- Add `cd.yml` for trusted publishers on PyPi
- Bump version for verified details on PyPi

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.