Skip to content

A Q&A wizard builder for setting up parameters [ e.g. variable(s) / configuration(s) ] to run a service.

License

Notifications You must be signed in to change notification settings

seekasra/wizzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wizzer logo stability HitCount


# wizzer #### [What's wizzer?](#whats-wizzer) #### [How to use?](#how-to-use) #### [Credits](#credits) ---

What's wizzer?

wizzer is a Python module to help programmers initialise their domain specific variable(s)/configuration(s) using a wizard-like question answer chat scenario. The need for this module began to develope when there was such need for Intent-Based Networking (IBN). Where the user would express their intention and expect the system to translate and trigger setup automatically.

** This is a pre-LLM era repository.

How to use?

  1. import wizzer package.
import wizzer
  1. have your questions (configuration parameters) ready. accepted formats are arrays, dictionaries or a single string. You can also pass the questions to "convert module" to get back a ready to use dictionary.

    • Here we have an array forexample:
q1 = [
        'driver',
        'hostname',
        'username',
        'password',
        'port',
]
  • Now you can ask above attributes from the user. This will return a new dictinary with all answers filled-in as corresponding values.
q = wizzer.ask(q1)
What's the driver ?  iosxr
What's the hostname ?  ios-xe-mgmt.cisco.com
What's the username ?  developer
What's the password ?  C1sco12345
What's the port ?  8181
  • You can review the configurations by running:
wizzer.review(q)
driver :  iosxr
hostname :  ios-xe-mgmt.cisco.com
username :  developer
password :  C1sco12345
port :  8181
  1. Here we have a dictionary forexample:
q2 = {
        'driver': '',
        'hostname': '',
        'username': '',
        'password': '',
        'port': '',
}
  • Now you can ask above attributes from the user. This will return a new dictinary with all answers filled-in as corresponding values.
q = wizzer.ask(q2)
What's the driver ?  iosxr
What's the hostname ?  ios-xe-mgmt.cisco.com
What's the username ?  developer
What's the password ?  C1sco12345
What's the port ?  8181
  • You can review the configurations by running:
wizzer.review(q2)
driver :  iosxr
hostname :  ios-xe-mgmt.cisco.com
username :  developer
password :  C1sco12345
port :  8181

credits

Icon in the wizzer logo by Anatoly Dudko

About

A Q&A wizard builder for setting up parameters [ e.g. variable(s) / configuration(s) ] to run a service.

Resources

License

Stars

Watchers

Forks

Packages