#!/usr/bin/env python3
#-*- coding: utf-8 -*-
import sys
sys.path.append('/Volumes/Sandisk/Projects/bravaorm')

from logging import debug

import os
import re
import json



import bravaorm

from model import *
from model import Blackwords

import time
import json


def main(arg):


    start = time.time()

    conn = bravaorm.Connection(db_user="root", db_password="root", db_host="localhost", db_port=3306, db_database="gofans", log_level="debug")

    adms = conn.administradores.include("modulos").all

    
    print(adms.toJSON())
    for ad in adms:
        print(ad)
        print(ad.toJSON())
        print()
    #    print(ad)
    #    print(ad.toJSON())

    print("\n\nFim conversa")
    conn.close()

if __name__ == "__main__":
    main(sys.argv)


