for k in common.__dict__.keys(): print(k) print('\n\n****** validators ******') for k in common.validators.__dict__.keys(): print(k) print('\n\n****** numeric ******') for k in common.validators.numeric.__dict__.keys(): print(k) print('\n\n****** models ******') for k in common.models.__dict__.keys(): print(k) print('\n\n****** posts ******') for k in common.models.posts.__dict__.keys(): print(k) print('\n\n****** users ******') for k in common.models.users.__dict__.keys(): print(k) print('\n\n****** helpers ******') for k in helpers.__dict__.keys(): print(k) print('-----------------------') print(helpers.say_hello('Python')) print(helpers.factorial(6))
import common.helpers as helpers validators.is_boolean('true') validators.is_json('{}') validators.is_numeric(10) validators.is_date('2018-0101') john_post = models.Post() john_posts = models.Posts() john = models.User() print('\n\n***** self *****') for k in dict(globals()).keys(): print(k) print('\n\n***** common *****') for k in common.__dict__.keys(): print(k) print('\n\n***** models *****') for k in common.models.__dict__.keys(): print(k) print(helpers.say_hello('Python')) print(helpers.factorial(5))
from common.helpers import digit_sum, factorial n = 100 print(digit_sum(factorial(n)))