Some checks failed
Check flake.lock / Check health of `flake.lock` (pull_request) Successful in 8s
Check Nix flake / Build nix outputs (ubuntu-latest) (pull_request) Failing after 1m19s
Check Nix flake / Perform Nix flake checks (ubuntu-latest) (pull_request) Failing after 1m20s
Check Nix formatting / Perform Nix format checks (pull_request) Failing after 1m19s
21 lines
497 B
Python
Executable File
21 lines
497 B
Python
Executable File
#!/usr/bin/env nix
|
|
#! nix shell nixpkgs#python312 nixpkgs#python312Packages.pyyaml --command python
|
|
|
|
import yaml
|
|
import pprint
|
|
|
|
with open('.sops.yaml','r') as in_yamlfile:
|
|
cur_yaml = yaml.safe_load(in_yamlfile)
|
|
|
|
cur_yaml['keys'].append('&test testkey')
|
|
|
|
pprint.pprint(cur_yaml)
|
|
|
|
# with open('new.yaml','w') as out_yamlfile:
|
|
# yaml.safe_dump(cur_yaml, out_yamlfile)
|
|
|
|
# with open('new.yaml','r') as inn_yamlfile:
|
|
# new_yaml = yaml.safe_load(inn_yamlfile)
|
|
|
|
# assert(cur_yaml == new_yaml)
|