pip install minihydra-leviathan
Reading in args
# run.py
from minihydra import just_args
args = just_args()
print(args, '\n')
print(args.hello)
print(args.number)
print(args.goodbye.cruel)
> python run.py hello=world number=42 goodbye.cruel='[world]'
{'hello': 'world', 'number': 42, {'goodbye': {'cruel': ['world']}}}
world
42
[world]
Via yaml
# path/to/args.yaml
hello: world
number: 42
goodbye:
cruel:
- world
# run.py
from minihydra import just_args
args = just_args(source='path/to/args.yaml')
print(args, '\n')
print(args.hello)
print(args.number)
print(args.goodbye.cruel)
> python run.py number=43
{'hello': 'world', 'number': 43, {'goodbye': {'cruel': ['world']}}}
world
43
[world]
As a decorator
# run.py
from minihydra import get_args
@get_args(source='path/to/args.yaml')
def main(args):
print(args)
if __name__ == '__main__':
main()
> python run.py
{'hello': 'world', 'number': 42, {'goodbye': {'cruel': ['world']}}}
Advanced
Further features include literals, function calls, instantiation, imports, interpolation, custom grammars, expanding module and yaml search paths, project directory inference, instantiation tinkering-syntax inference, portals, and pseudonyms.
For deeper documentation, please consider sponsoring.
Metadata
Release files for minihydra-leviathan 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minihydra_leviathan-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for minihydra_leviathan-1.0.1-py3-none-any.whl |
Release files / minihydra_leviathan-1.0.1-py3-none-any.whl
| Download URL | minihydra_leviathan-1.0.1-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9e5aad3a365601c623ffff8deaae31ed187f7a941d93f777931ff1460a980eb
|
|
BLAKE2b-256 checksum How to use checksums |
4159bfe0e278433fc35dcd76b1bb3e722a23d626b527f96b23b9a67114a863d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for minihydra-leviathan 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.