def post(self, user_id):
        """
        Creates a new user

        Arguments
        ---------
        user: string
            Username to create
        password: string
            Password
        email: string
            Email address

        Returns
        -------
        result: tuple
            message, HTTP code
        """
        try:
            marsh_schema = parse_json_schema().load(request.json)
            args = marsh_schema
        except ValidationError as errors:
            logger.debug('Validation error: {}'.format(errors))
            return errors.messages, 500
        args_needed = ['password', 'confirm_password', 'user']
        if all(arg in args for arg in args_needed):
            if args['password'] != args['confirm_password']:
                return {'msg': 'Passwords do not match'}, 400
            logger.debug('Creating User: {}'.format(args['user']))
            pass_hash = bcrypt.generate_password_hash(args['password']).decode('utf-8')
            email = args['email'] if args['email'] else None
            create_user(username=args['user'],
                        password=pass_hash, email=email)
            return {'msg': 'User created'}, 200
        return {'msg': 'Error'}, 500

        Creates a new user

        Arguments
        ---------
        user: string
            Username to create
        password: string
            Password
        email: string
            Email address

        Returns
        -------
        result: tuple
            message, HTTP code
        
crackq/cq_api.py