Skip to content

Instantly share code, notes, and snippets.

@inhzus
Last active May 27, 2019 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inhzus/85633200d8f2fdabec66e23e78d6d085 to your computer and use it in GitHub Desktop.
Save inhzus/85633200d8f2fdabec66e23e78d6d085 to your computer and use it in GitHub Desktop.
import argparse
from . import user_service, doc_service, repo_service
parser = argparse.ArgumentParser()
# ... set argument
args = parser.parse_args()
print(getattr(
globals()[f'{args.sub}_service'],
getattr(args, args.sub))
(**vars(args)))
# -*- coding: utf-8 -*-
def update(id_, name, **_):
return f'{id_}, {name}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment