#!/usr/bin/env python3 from ..config import CRYPT_CONTEXT, DB from .model import Certificate, DistinguishedName, User, UserCapability def main(): DB.connect() DB.create_tables([Certificate, DistinguishedName, User, UserCapability]) admin = User.create(name="admin", password=CRYPT_CONTEXT.hash("secret")) UserCapability.create(user=admin, capability="admin") DB.close() if __name__ == "__main__": main()