Docs/API reference

FieldConstraint · Python

Describe a field name, its type and whether it is required.

Download .md
Developers2 min read8 sections
Source reference · Match your SDK version. Availability and known issues
In this guide

Purpose and lifecycle

Node stores readonly name, fieldType and required properties. Python wraps a native constraint and exposes properties.

DatasetSchema.addField/add_field accepts these three values directly; it does not accept a FieldConstraint object.

Definition and availability

Source snapshot: 1.0.0-alpha.3. Package export. Declared in source; this is not a runtime test result.

Signatures and source locations are generated from the SDK wrappers. Clean snapshots link to the recorded commit. Modified snapshots link to main, which may differ; file hashes identify the local inputs.

class FieldConstraint
python1 lines · copy-ready

Members

MemberKindReturn / value typeSource status
__init__methodNot annotated; see behavior notesPresent in source
namepropertystrPresent in source
field_typepropertyFieldTypePresent in source
requiredpropertyboolPresent in source

__init__()

Store a field name, FieldType and required flag. Pass those values to DatasetSchema.addField/add_field to apply validation.

Returns / value: Not annotated; see behavior notes.

def __init__(self, name: str, field_type: FieldType, required: bool)
python1 lines · copy-ready
ParameterTypeRequired / defaultMeaning
namestrRequiredField, header or attribute name for this operation.
field_typeFieldTypeRequiredA FieldType enum member.
requiredboolRequiredWhether an empty or missing field is rejected.

name

Unique field name or context-specific item name.

Returns / value: str.

def name(self) -> str
python1 lines · copy-ready

field_type

Read the declared value. Its exact type is shown in the signature.

Returns / value: FieldType.

def field_type(self) -> FieldType
python1 lines · copy-ready

required

Reject empty/whitespace-only required fields; default false for job fields.

Returns / value: bool.

def required(self) -> bool
python1 lines · copy-ready

Errors and operational limits

Invalid native type arguments may raise a binding error.

Source availability, package publication and runtime validation are separate facts. These pages describe the source snapshot, not a claim that all platforms or every API path have passed production acceptance.