Create something in Exosite.

        Args:
            auth: <cik>
            type: What thing to create.
            desc: Information about thing.
977784
def create(self, auth, type, desc, defer=False):
        
        return self._call('create', auth, [type, desc], defer)
277948
def create(self, path, value=b"", acl=None, ephemeral=False,
               sequence=False):
        
        super(XTransactionRequest, self).create(path, to_bytes(value), acl, ephemeral, sequence)
1352365
private Auth constructAuth(String authToken, String tokenSecret, String username) throws IOException {

        Auth auth = new Auth();
        auth.setToken(authToken);
        auth.setTokenSecret(tokenSecret);

        // Prompt to ask what permission is needed: read, update or delete.
        auth.setPermission(Permission.fromString("delete"));

        User user = new User();
        // Later change the following 3. Either ask user to pass on command line or read
        // from saved file.
        user.setId(nsid);
        user.setUsername((username));
        user.setRealName("");
        auth.setUser(user);
        this.authStore.store(auth);
        return auth;
    }
875849
async def create(
            cls, boot_source, os, release, *,
            arches=None, subarches=None, labels=None):
        """"""
        if not isinstance(boot_source, BootSource):
            raise TypeError(
                "boot_source must be a BootSource, not %s"
                % type(boot_source).__name__)
        if arches is None:
            arches = ['*']
        if subarches is None:
            subarches = ['*']
        if labels is None:
            labels = ['*']
        data = await cls._handler.create(
            boot_source_id=boot_source.id,
            os=os, release=release, arches=arches, subarches=subarches,
            labels=labels)
        return cls._object(data, {"boot_source_id": boot_source.id})
588698
function UseAuth(options) {
    return function (constructor) {
        if (options) {
            constructor.prototype.useAuth = options;
        }
        else {
            constructor.prototype.useAuth = { create: true, update: true, read: true, delete: true };
        }
    };
}
1052928
public function create_type($type, $desc) {
		$sql = "INSERT INTO cswal_token_type_table (token_type, token_desc) VALUES 
			(:type, :desc)";
		$params = array(
			'type'	=> $type,
			'desc'	=> $desc,
		);
		
		try {
			$id = $this->db->run_insert($sql, $params, 'cswal_token_type_table_token_type_id_seq');
		} catch (Exception $ex) {
			throw new Exception(__METHOD__ .": failed to create token type::: ". $ex->getMessage());
		}
		return $id;
	}
566005
function setAuthType(auth_type) {
    var headers = {
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    };

    if (auth_type == 'AccessToken') {
        headers['Authorization'] = _config.access_token;
    }
    else if (auth_type == 'AppCredentials') {
        headers['x-accela-appid'] = _config.app_id
        headers['x-accela-appsecret'] = _config.app_secret;
    }
    else {
        headers['x-accela-appid'] = _config.app_id
        headers['x-accela-agency'] = _config.agency;
        headers['x-accela-environment'] = _config.environment;
    }
    return headers;
}
47746
def add(self, auth, method, args, notimeout=False):
        """"""
        authstr = self._authstr(auth)
        self._requests.setdefault(authstr, []).append((method, args))
        self._notimeouts.setdefault(authstr, False)
        if notimeout:
            self._notimeouts[authstr] = notimeout
527466
public Result<Void> addDescription(AuthzTrans trans, String ns, String type, 
			String instance, String action, String description) {
		//TODO Invalidate?
		return dao().addDescription(trans, ns, type, instance, action, description);
	}
1367966
async function createAndOpenWallet(actor) {
    const walletConfig = {"id": actor + ".wallet"}
    const walletCredentials = {"key": actor + ".wallet_key"}
    await indy.createWallet(walletConfig, walletCredentials)
    return await indy.openWallet(walletConfig, walletCredentials)
}
113787
def create(self, type_, **kwargs):
        
        obj = self.factory.create("ns0:%s" % type_)
        for key, value in kwargs.items():
            setattr(obj, key, value)
        return obj
229146
def new(cls,
            username,
            password=None,
            email=None,
            first_name="",
            last_name="",
            login_method=None,
            role="MEMBER"
            ):
        
        data = {
            "first_name": first_name,
            "last_name": last_name,
            "email": email
        }

        if not password:
            password = utils.generate_random_string()

        username = username.strip().lower()
        if "@" in username and not email:
            if not utils.is_email_valid(username):
                exceptions.AuthError(_("Invalid username"))
            data["email"] = username
        elif email:
            if not utils.is_email_valid(email):
                exceptions.AuthError(_("Invalid username"))

        if not utils.is_username_valid(username):
            exceptions.AuthError(_("Invalid username"))
        if not utils.is_password_valid(password):
            raise exceptions.AuthError(_("Password is invalid"))

        if cls.get_by_username(username):
            raise exceptions.AuthError(_("Username exists already"))
        _email = data.get("email")
        if _email:
            if cls.get_by_email(_email):
                raise exceptions.AuthError(_("Email address exists already"))

        role = AuthUserRole.get_by_name(role or "MEMBER")
        if not role:
            raise exceptions.AuthError(_("Invalid user role"))

        data.update({
            "username": username,
            "password_hash": cls.encrypt_password(password),
            "email_verified": False,
            "login_method": login_method,
            "role": role,
            "status": cls.STATUS_ACTIVE
        })
        user = cls.create(**data)
        user.reset_secret_key()
        return user
1275973
static function make($type_uri, $count=1, $required=false,
                  $alias=null)
    {
        if ($alias !== null) {
            $result = Auth_OpenID_AX_checkAlias($alias);

            if (Auth_OpenID_AX::isError($result)) {
                return $result;
            }
        }

        return new Auth_OpenID_AX_AttrInfo($type_uri, $count, $required,
                                           $alias);
    }
340342
def create_object(container, portal_type, **data):
    

    if "id" in data:
        # always omit the id as senaite LIMS generates a proper one
        id = data.pop("id")
        logger.warn("Passed in ID '{}' omitted! Senaite LIMS "
                    "generates a proper ID for you" .format(id))

    try:
        # Special case for ARs
        # => return immediately w/o update
        if portal_type == "AnalysisRequest":
            obj = create_analysisrequest(container, **data)
            # Omit values which are already set through the helper
            data = u.omit(data, "SampleType", "Analyses")
            # Set the container as the client, as the AR lives in it
            data["Client"] = container
        # Standard content creation
        else:
            # we want just a minimun viable object and set the data later
            obj = api.create(container, portal_type)
            # obj = api.create(container, portal_type, **data)
    except Unauthorized:
        fail(401, "You are not allowed to create this content")

    # Update the object with the given data, but omit the id
    try:
        update_object_with_data(obj, data)
    except APIError:

        # Failure in creation process, delete the invalid object
        container.manage_delObjects(obj.id)
        # reraise the error
        raise

    return obj
636539
def create_with_role(name, options = {})
      headers = extract_headers!(options)
      json = client.post("/v1/auth/token/create/#{encode_path(name)}", JSON.fast_generate(options), headers)
      return Secret.decode(json)
    end
542090
def create(ctx, to, amount, symbol, secret, hash, account, expiration):
    
    ctx.blockchain.blocking = True
    tx = ctx.blockchain.htlc_create(
        Amount(amount, symbol),
        to,
        secret,
        hash_type=hash,
        expiration=expiration,
        account=account,
    )
    tx.pop("trx", None)
    print_tx(tx)
    results = tx.get("operation_results", {})
    if results:
        htlc_id = results[0][1]
        print("Your htlc_id is: {}".format(htlc_id))
1242888
def create(args):
    
    # for PUT HTTP method
    action = True

    if ((args.__dict__.get('domain') and args.__dict__.get('name')
         and args.__dict__.get('rtype') and args.__dict__.get('content'))):
        # for create sub-command

        domain = args.domain
        o = JSONConverter(domain)

        name, rtype, content, ttl, priority = get_record_params(args)
        record_dict = o.set_record(name, rtype, content, ttl, priority)

        json = set_json(domain, action, record=record_dict)

    else:
        # for bulk_create sub-command
        if args.__dict__.get('domain'):
            domain = args.domain
        else:
            domain = check_infile(args.infile)
        json = set_json(domain, action, filename=args.infile)

    password = get_password(args)
    token = connect.get_token(args.username, password, args.server)
    processing.create_records(args.server, token, domain, json)

    if args.auto_update_soa == 'True':
        update_soa_serial(args)