@alloy-js/python 0.5.0-dev.0 → 0.5.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/src/builtins/python.js +46 -0
- package/dist/dev/src/builtins/python.js.map +1 -1
- package/dist/dev/src/components/ClassDeclaration.js +19 -10
- package/dist/dev/src/components/ClassDeclaration.js.map +1 -1
- package/dist/dev/src/components/ClassMethodDeclaration.js +20 -5
- package/dist/dev/src/components/ClassMethodDeclaration.js.map +1 -1
- package/dist/dev/src/components/DataclassDeclaration.js +14 -12
- package/dist/dev/src/components/DataclassDeclaration.js.map +1 -1
- package/dist/dev/src/components/DecoratorList.js +55 -0
- package/dist/dev/src/components/DecoratorList.js.map +1 -0
- package/dist/dev/src/components/EnumDeclaration.js +21 -12
- package/dist/dev/src/components/EnumDeclaration.js.map +1 -1
- package/dist/dev/src/components/FunctionBase.js +21 -10
- package/dist/dev/src/components/FunctionBase.js.map +1 -1
- package/dist/dev/src/components/FutureStatement.js +1 -1
- package/dist/dev/src/components/MethodBase.js +16 -4
- package/dist/dev/src/components/MethodBase.js.map +1 -1
- package/dist/dev/src/components/PropertyDeclaration.js +68 -17
- package/dist/dev/src/components/PropertyDeclaration.js.map +1 -1
- package/dist/dev/src/components/PydanticClassDeclaration.js +136 -0
- package/dist/dev/src/components/PydanticClassDeclaration.js.map +1 -0
- package/dist/dev/src/components/StaticMethodDeclaration.js +19 -5
- package/dist/dev/src/components/StaticMethodDeclaration.js.map +1 -1
- package/dist/dev/src/components/index.js +1 -0
- package/dist/dev/src/components/index.js.map +1 -1
- package/dist/dev/test/classdeclarations.test.js +85 -52
- package/dist/dev/test/classdeclarations.test.js.map +1 -1
- package/dist/dev/test/dataclassdeclarations.test.js +122 -89
- package/dist/dev/test/dataclassdeclarations.test.js.map +1 -1
- package/dist/dev/test/decoratorlist.test.js +84 -0
- package/dist/dev/test/decoratorlist.test.js.map +1 -0
- package/dist/dev/test/enums.test.js +41 -10
- package/dist/dev/test/enums.test.js.map +1 -1
- package/dist/dev/test/functiondeclaration.test.js +81 -61
- package/dist/dev/test/functiondeclaration.test.js.map +1 -1
- package/dist/dev/test/methoddeclaration.test.js +117 -26
- package/dist/dev/test/methoddeclaration.test.js.map +1 -1
- package/dist/dev/test/propertydeclaration.test.js +109 -7
- package/dist/dev/test/propertydeclaration.test.js.map +1 -1
- package/dist/dev/test/pydanticclassdeclarations.test.js +1137 -0
- package/dist/dev/test/pydanticclassdeclarations.test.js.map +1 -0
- package/dist/src/builtins/python.d.ts +30 -0
- package/dist/src/builtins/python.d.ts.map +1 -1
- package/dist/src/builtins/python.js +46 -0
- package/dist/src/builtins/python.js.map +1 -1
- package/dist/src/components/ClassDeclaration.d.ts +21 -0
- package/dist/src/components/ClassDeclaration.d.ts.map +1 -1
- package/dist/src/components/ClassDeclaration.js +6 -1
- package/dist/src/components/ClassDeclaration.js.map +1 -1
- package/dist/src/components/ClassMethodDeclaration.d.ts +5 -1
- package/dist/src/components/ClassMethodDeclaration.d.ts.map +1 -1
- package/dist/src/components/ClassMethodDeclaration.js +14 -3
- package/dist/src/components/ClassMethodDeclaration.js.map +1 -1
- package/dist/src/components/DataclassDeclaration.d.ts.map +1 -1
- package/dist/src/components/DataclassDeclaration.js +10 -4
- package/dist/src/components/DataclassDeclaration.js.map +1 -1
- package/dist/src/components/DecoratorList.d.ts +43 -0
- package/dist/src/components/DecoratorList.d.ts.map +1 -0
- package/dist/src/components/DecoratorList.js +47 -0
- package/dist/src/components/DecoratorList.js.map +1 -0
- package/dist/src/components/EnumDeclaration.d.ts +9 -0
- package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
- package/dist/src/components/EnumDeclaration.js +6 -1
- package/dist/src/components/EnumDeclaration.js.map +1 -1
- package/dist/src/components/FunctionBase.d.ts +31 -1
- package/dist/src/components/FunctionBase.d.ts.map +1 -1
- package/dist/src/components/FunctionBase.js +9 -2
- package/dist/src/components/FunctionBase.js.map +1 -1
- package/dist/src/components/FutureStatement.d.ts +1 -1
- package/dist/src/components/FutureStatement.js +1 -1
- package/dist/src/components/MethodBase.d.ts.map +1 -1
- package/dist/src/components/MethodBase.js +10 -2
- package/dist/src/components/MethodBase.js.map +1 -1
- package/dist/src/components/PropertyDeclaration.d.ts +29 -0
- package/dist/src/components/PropertyDeclaration.d.ts.map +1 -1
- package/dist/src/components/PropertyDeclaration.js +48 -1
- package/dist/src/components/PropertyDeclaration.js.map +1 -1
- package/dist/src/components/PydanticClassDeclaration.d.ts +120 -0
- package/dist/src/components/PydanticClassDeclaration.d.ts.map +1 -0
- package/dist/src/components/PydanticClassDeclaration.js +116 -0
- package/dist/src/components/PydanticClassDeclaration.js.map +1 -0
- package/dist/src/components/StaticMethodDeclaration.d.ts +3 -0
- package/dist/src/components/StaticMethodDeclaration.d.ts.map +1 -1
- package/dist/src/components/StaticMethodDeclaration.js +13 -3
- package/dist/src/components/StaticMethodDeclaration.js.map +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +1 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/test/classdeclarations.test.js +25 -0
- package/dist/test/classdeclarations.test.js.map +1 -1
- package/dist/test/dataclassdeclarations.test.js +25 -0
- package/dist/test/dataclassdeclarations.test.js.map +1 -1
- package/dist/test/decoratorlist.test.d.ts +2 -0
- package/dist/test/decoratorlist.test.d.ts.map +1 -0
- package/dist/test/decoratorlist.test.js +60 -0
- package/dist/test/decoratorlist.test.js.map +1 -0
- package/dist/test/enums.test.js +27 -0
- package/dist/test/enums.test.js.map +1 -1
- package/dist/test/functiondeclaration.test.js +16 -0
- package/dist/test/functiondeclaration.test.js.map +1 -1
- package/dist/test/methoddeclaration.test.js +67 -0
- package/dist/test/methoddeclaration.test.js.map +1 -1
- package/dist/test/propertydeclaration.test.js +71 -1
- package/dist/test/propertydeclaration.test.js.map +1 -1
- package/dist/test/pydanticclassdeclarations.test.d.ts +2 -0
- package/dist/test/pydanticclassdeclarations.test.d.ts.map +1 -0
- package/dist/test/pydanticclassdeclarations.test.js +829 -0
- package/dist/test/pydanticclassdeclarations.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/api/components/ClassDeclaration.md +10 -7
- package/docs/api/components/ClassEnumDeclaration.md +9 -6
- package/docs/api/components/ClassMethodDeclaration.md +7 -5
- package/docs/api/components/DataclassDeclaration.md +9 -5
- package/docs/api/components/DunderMethodDeclaration.md +7 -5
- package/docs/api/components/FunctionDeclaration.md +9 -5
- package/docs/api/components/FutureStatement.md +1 -1
- package/docs/api/components/MethodDeclaration.md +11 -6
- package/docs/api/components/PropertyDeclaration.md +11 -8
- package/docs/api/components/PydanticClassDeclaration.md +146 -0
- package/docs/api/components/StaticMethodDeclaration.md +7 -5
- package/docs/api/components/index.md +1 -0
- package/docs/api/index.md +3 -3
- package/docs/api/types/CommonFunctionProps.md +4 -3
- package/docs/api/types/PydanticModelConfigDictProps.md +32 -0
- package/docs/api/types/index.md +1 -0
- package/docs/api/variables/index.md +3 -0
- package/docs/api/variables/pydanticModule.md +27 -0
- package/docs/api/variables/pydanticSettingsModule.md +7 -0
- package/docs/api/variables/typingModule.md +9 -0
- package/package.json +4 -4
- package/src/builtins/python.ts +539 -1
- package/src/components/ClassDeclaration.tsx +23 -0
- package/src/components/ClassMethodDeclaration.tsx +9 -1
- package/src/components/DataclassDeclaration.tsx +18 -11
- package/src/components/DecoratorList.tsx +50 -0
- package/src/components/EnumDeclaration.tsx +11 -0
- package/src/components/FunctionBase.tsx +34 -3
- package/src/components/FutureStatement.tsx +1 -1
- package/src/components/MethodBase.tsx +6 -2
- package/src/components/PropertyDeclaration.tsx +48 -1
- package/src/components/PydanticClassDeclaration.tsx +222 -0
- package/src/components/StaticMethodDeclaration.tsx +7 -1
- package/src/components/index.ts +1 -0
- package/temp/api.json +1142 -84
- package/test/classdeclarations.test.tsx +27 -0
- package/test/dataclassdeclarations.test.tsx +25 -0
- package/test/decoratorlist.test.tsx +95 -0
- package/test/enums.test.tsx +29 -0
- package/test/functiondeclaration.test.tsx +17 -0
- package/test/methoddeclaration.test.tsx +70 -0
- package/test/propertydeclaration.test.tsx +66 -1
- package/test/pydanticclassdeclarations.test.tsx +836 -0
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
- [ModuleDoc](ModuleDoc.md) — A component that creates a ModuleDoc block for module-level documentation.
|
|
30
30
|
- [PropertyDeclaration](PropertyDeclaration.md) — Declares a Python property with optional getter, setter, and deleter methods.
|
|
31
31
|
- [PropertyDoc](PropertyDoc.md) — A component that creates a PropertyDoc block for `@property` decorated methods.
|
|
32
|
+
- [PydanticClassDeclaration](PydanticClassDeclaration.md) — Renders a Python class that subclasses Pydantic’s `BaseModel`: `class Name(BaseModel): ...`.
|
|
32
33
|
- [PyDoc](PyDoc.md) — A PyDoc comment.
|
|
33
34
|
- [PyDocExample](PyDocExample.md) — Create a PyDoc example, which is prepended by >>.
|
|
34
35
|
- [PythonBlock](PythonBlock.md) — A Python block component that can be used to render a block of Python code.
|
package/docs/api/index.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @alloy-js/python API Reference
|
|
2
2
|
|
|
3
|
-
- [components](components/index.md) (
|
|
3
|
+
- [components](components/index.md) (45 items)
|
|
4
4
|
- [contexts](contexts/index.md) (1 items)
|
|
5
5
|
- [functions](functions/index.md) (11 items)
|
|
6
|
-
- [types](types/index.md) (
|
|
7
|
-
- [variables](variables/index.md) (
|
|
6
|
+
- [types](types/index.md) (30 items)
|
|
7
|
+
- [variables](variables/index.md) (9 items)
|
|
@@ -6,9 +6,10 @@ Shared base interface for function-like components.
|
|
|
6
6
|
|
|
7
7
|
Extends [BaseDeclarationProps](../basedeclarationprops/),[CallSignatureProps](../../components/callsignature/)
|
|
8
8
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
| async
|
|
9
|
+
| | | |
|
|
10
|
+
| ---------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
11
|
+
| async | optional boolean | Indicates that the function is async. |
|
|
12
|
+
| decorators | optional [Children](../../../core/types/children/)\[] | Decorators rendered above `def`, in source order — `decorators[0]` is topmost. By Python’s bottom-up application order, the topmost entry is the **outermost** decorator (applied last) and wraps the result of every decorator below it. Each entry should produce a complete decorator line (typically starting with `@`). Falsy entries (other than `0`) are skipped, so conditional decorators can be provided inline when needed. When used through wrappers that emit an intrinsic decorator ([`ClassMethodDeclaration`](../components/ClassMethodDeclaration.md) → `@classmethod`, [`StaticMethodDeclaration`](../components/StaticMethodDeclaration.md) → `@staticmethod`, [`PropertyDeclaration`](../components/PropertyDeclaration.md) → `@property`), these decorators are rendered **above** the intrinsic line — the correct position for Pydantic’s `@field_validator` / `@model_validator` and other wrappers that must see the underlying function, not a descriptor. When used on plain [`MethodDeclaration`](../components/MethodDeclaration.md) / [`FunctionDeclaration`](../components/FunctionDeclaration.md), these decorators are rendered above `@abstractmethod` (if `abstract` is set) and above `def`. Do **not** pass intrinsic decorators here — i.e. `@classmethod`, `@staticmethod`, `@property`, or `@abstractmethod`. Those are emitted by the matching component ([`ClassMethodDeclaration`](../components/ClassMethodDeclaration.md), [`StaticMethodDeclaration`](../components/StaticMethodDeclaration.md), [`PropertyDeclaration`](../components/PropertyDeclaration.md), or the `abstract` flag) and would otherwise be stacked twice in the output, producing invalid Python. |
|
|
12
13
|
|
|
13
14
|
## Remarks
|
|
14
15
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# PydanticModelConfigDictProps
|
|
2
|
+
|
|
3
|
+
Keyword-style options for Pydantic v2 `ConfigDict`, using camelCase prop names that map to snake\_case Python arguments (for example `validateAssignment` → `validate_assignment`).
|
|
4
|
+
|
|
5
|
+
## Members
|
|
6
|
+
|
|
7
|
+
| | | |
|
|
8
|
+
| --------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------- |
|
|
9
|
+
| aliasGenerator | optional string | Resolve field aliases from a configured alias generator. |
|
|
10
|
+
| arbitraryTypesAllowed | optional boolean | Allow non-pydantic/arbitrary Python types in field annotations. |
|
|
11
|
+
| coerceNumbersToStr | optional boolean | Coerce numeric input values to strings for `str` fields. |
|
|
12
|
+
| extra | optional “allow” \| “forbid” \| “ignore” | Behavior for unknown input keys: allow, forbid, or ignore. |
|
|
13
|
+
| fromAttributes | optional boolean | Populate models from object attributes (ORM-style) instead of mapping keys. |
|
|
14
|
+
| frozen | optional boolean | Make models immutable (`frozen=True`). |
|
|
15
|
+
| hideInputInErrors | optional boolean | Hide input values in validation error messages. |
|
|
16
|
+
| jsonSchemaExtra | optional Record\<string, unknown> | Include JSON schema extras via a plain JSON-serializable object. |
|
|
17
|
+
| locByAlias | optional boolean | Use aliases in error locations instead of field names. |
|
|
18
|
+
| populateByName | optional boolean | Allow population by field name even when aliases are defined. |
|
|
19
|
+
| revalidateInstances | optional “always” \| “never” \| “subclass-instances” | Re-validate model/dataclass instances on assignment boundaries. |
|
|
20
|
+
| serJsonBytes | optional “utf8” \| “base64” \| “hex” | JSON serialization format for bytes values. |
|
|
21
|
+
| serJsonInfNan | optional “null” \| “constants” \| “strings” | JSON serialization behavior for Infinity/NaN values. |
|
|
22
|
+
| strict | optional boolean | Enable strict validation globally for the model. |
|
|
23
|
+
| strMaxLength | optional number | Upper-bound for constrained string lengths at model level. |
|
|
24
|
+
| strMinLength | optional number | Lower-bound for constrained string lengths at model level. |
|
|
25
|
+
| strStripWhitespace | optional boolean | Strip leading/trailing whitespace from all `str` fields. |
|
|
26
|
+
| strToLower | optional boolean | Convert all `str` values to lowercase. |
|
|
27
|
+
| strToUpper | optional boolean | Convert all `str` values to uppercase. |
|
|
28
|
+
| useEnumValues | optional boolean | Use enum `.value` instead of enum instances during serialization. |
|
|
29
|
+
| validateAssignment | optional boolean | Re-validate when attributes are assigned after model creation. |
|
|
30
|
+
| validateDefault | optional boolean | Validate default values in addition to provided input values. |
|
|
31
|
+
| validateReturn | optional boolean | Validate return values for call validators. |
|
|
32
|
+
| valJsonBytes | optional “utf8” \| “base64” \| “hex” | JSON validation format for bytes values. |
|
package/docs/api/types/index.md
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
- [ParameterDescriptor](ParameterDescriptor.md) — Information for a Python function parameter.
|
|
21
21
|
- [ParameterMarker](ParameterMarker.md) — type ParameterMarker = "*" | "/";
|
|
22
22
|
- [PropertyMethodDeclarationProps](PropertyMethodDeclarationProps.md) — Extends Omit<[CommonFunctionProps](../commonfunctionprops/), “name”>
|
|
23
|
+
- [PydanticModelConfigDictProps](PydanticModelConfigDictProps.md) — Keyword-style options for Pydantic v2 `ConfigDict`, using camelCase prop names that map to snake\_case Python arguments
|
|
23
24
|
- [PythonElements](PythonElements.md) — type PythonElements = "class" | "class-member" | "function" | "variable" | "object-member" | "constant" | "parameter" |
|
|
24
25
|
- [PythonLexicalScope](PythonLexicalScope.md) — Extends [OutputScope](../../../core/types/outputscope/)
|
|
25
26
|
- [PythonMemberScope](PythonMemberScope.md) — Extends [OutputScope](../../../core/types/outputscope/)
|
|
@@ -5,4 +5,7 @@
|
|
|
5
5
|
- [dataclassDecoratorKeySet](dataclassDecoratorKeySet.md) — dataclassDecoratorKeySet: Set<string>
|
|
6
6
|
- [dataclassesModule](dataclassesModule.md) — dataclassesModule: import("../create-module.js").ModuleRefkeys<{
|
|
7
7
|
- [enumModule](enumModule.md) — enumModule: import("../create-module.js").ModuleRefkeys<{
|
|
8
|
+
- [pydanticModule](pydanticModule.md) — pydanticModule: import("../create-module.js").ModuleRefkeys<{
|
|
9
|
+
- [pydanticSettingsModule](pydanticSettingsModule.md) — pydanticSettingsModule: import("../create-module.js").ModuleRefkeys<{
|
|
8
10
|
- [requestsModule](requestsModule.md) — requestsModule: import("../create-module.js").ModuleRefkeys<{
|
|
11
|
+
- [typingModule](typingModule.md) — `typing` stdlib symbols used heavily with Pydantic generics and annotations.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# pydanticModule
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
pydanticModule: import("../create-module.js").ModuleRefkeys<{
|
|
5
|
+
readonly ".": ["AfterValidator", "AliasChoices", "AliasGenerator", "AliasPath", "AllowInfNan", "AmqpDsn", "AnyHttpUrl", "AnyUrl", "AnyWebsocketUrl", "AwareDatetime", "Base64Bytes", "Base64Encoder", "Base64Str", "Base64UrlBytes", "Base64UrlStr", "BaseModel", "BeforeValidator", "ByteSize", "ClickHouseDsn", "CockroachDsn", "ConfigDict", "DirectoryPath", "Discriminator", "EmailStr", "EncodedBytes", "EncodedStr", "EncoderProtocol", "Extra", "FailFast", "Field", "FieldSerializationInfo", "FilePath", "FileUrl", "FiniteFloat", "FtpUrl", "FutureDate", "FutureDatetime", "GetCoreSchemaHandler", "GetJsonSchemaHandler", "GetPydanticSchema", "HttpUrl", "IPvAnyAddress", "IPvAnyInterface", "IPvAnyNetwork", "ImportString", "InstanceOf", "Json", "JsonValue", "KafkaDsn", "MariaDBDsn", "ModelWrapValidatorHandler", "MongoDsn", "MySQLDsn", "NaiveDatetime", "NameEmail", "NatsDsn", "NegativeFloat", "NegativeInt", "NewPath", "NonNegativeFloat", "NonNegativeInt", "NonPositiveFloat", "NonPositiveInt", "OnErrorOmit", "PastDate", "PastDatetime", "PaymentCardNumber", "PlainSerializer", "PlainValidator", "PositiveFloat", "PositiveInt", "PostgresDsn", "PrivateAttr", "PydanticDeprecatedSince20", "PydanticDeprecatedSince210", "PydanticDeprecatedSince211", "PydanticDeprecatedSince212", "PydanticDeprecatedSince26", "PydanticDeprecatedSince29", "PydanticDeprecationWarning", "PydanticErrorCodes", "PydanticExperimentalWarning", "PydanticForbiddenQualifier", "PydanticImportError", "PydanticInvalidForJsonSchema", "PydanticSchemaGenerationError", "PydanticUndefinedAnnotation", "PydanticUserError", "RedisDsn", "RootModel", "Secret", "SecretBytes", "SecretStr", "SerializationInfo", "SerializeAsAny", "SerializerFunctionWrapHandler", "SkipValidation", "SnowflakeDsn", "SocketPath", "Strict", "StrictBool", "StrictBytes", "StrictFloat", "StrictInt", "StrictStr", "StringConstraints", "Tag", "TypeAdapter", "UUID1", "UUID3", "UUID4", "UUID5", "UUID6", "UUID7", "UUID8", "UrlConstraints", "VERSION", "ValidateAs", "ValidationError", "ValidationInfo", "ValidatorFunctionWrapHandler", "WebsocketUrl", "WithJsonSchema", "WrapSerializer", "WrapValidator", "__version__", "computed_field", "conbytes", "condate", "condecimal", "confloat", "confrozenset", "conint", "conlist", "conset", "constr", "create_model", "dataclasses", "field_serializer", "field_validator", "model_serializer", "model_validator", "validate_call", "validate_email", "with_config"];
|
|
6
|
+
readonly alias_generators: ["to_camel", "to_pascal", "to_snake"];
|
|
7
|
+
readonly aliases: ["AliasChoices", "AliasGenerator", "AliasPath"];
|
|
8
|
+
readonly annotated_handlers: ["GetCoreSchemaHandler", "GetJsonSchemaHandler"];
|
|
9
|
+
readonly color: ["Any", "COLORS_BY_NAME", "COLORS_BY_VALUE", "Callable", "Color", "ColorTuple", "ColorType", "CoreSchema", "HslColorTuple", "JsonSchemaValue", "Optional", "PydanticCustomError", "PydanticDeprecatedSince20", "RGBA", "Union", "cast", "core_schema", "deprecated", "float_to_255", "hls_to_rgb", "ints_to_rgba", "math", "parse_color_value", "parse_float_alpha", "parse_hsl", "parse_str", "parse_tuple", "r_hex_long", "r_hex_short", "r_hsl", "r_hsl_v4_style", "r_rgb", "r_rgb_v4_style", "rads", "re", "repeat_colors", "rgb_to_hls"];
|
|
10
|
+
readonly config: ["ConfigDict", "with_config"];
|
|
11
|
+
readonly dataclasses: ["dataclass", "rebuild_dataclass"];
|
|
12
|
+
readonly errors: ["PydanticErrorCodes", "PydanticForbiddenQualifier", "PydanticImportError", "PydanticInvalidForJsonSchema", "PydanticSchemaGenerationError", "PydanticUndefinedAnnotation", "PydanticUserError"];
|
|
13
|
+
readonly fields: ["Field", "FieldInfo", "PrivateAttr", "computed_field"];
|
|
14
|
+
readonly functional_serializers: ["Annotated", "Any", "AnyType", "Callable", "GetCoreSchemaHandler", "Literal", "PlainSerializer", "PydanticUndefined", "PydanticUndefinedAnnotation", "PydanticUserError", "SerializationInfo", "SerializeAsAny", "SerializerFunctionWrapHandler", "TYPE_CHECKING", "TypeAlias", "TypeVar", "WhenUsed", "WrapSerializer", "annotations", "core_schema", "dataclasses", "field_serializer", "model_serializer", "overload", "partial", "partialmethod"];
|
|
15
|
+
readonly functional_validators: ["AfterValidator", "Annotated", "Any", "AnyType", "ArbitraryTypeWarning", "BeforeValidator", "Callable", "FieldValidatorModes", "FreeModelBeforeValidator", "FreeModelBeforeValidatorWithoutInfo", "GetCoreSchemaHandler", "InstanceOf", "Literal", "ModelAfterValidator", "ModelAfterValidatorWithoutInfo", "ModelBeforeValidator", "ModelBeforeValidatorWithoutInfo", "ModelWrapValidator", "ModelWrapValidatorHandler", "ModelWrapValidatorWithoutInfo", "PlainValidator", "Protocol", "PydanticDeprecatedSince212", "PydanticUndefined", "PydanticUserError", "Self", "SkipValidation", "TYPE_CHECKING", "TypeAlias", "TypeVar", "Union", "ValidateAs", "WrapValidator", "cast", "core_schema", "dataclasses", "field_validator", "model_validator", "overload", "partialmethod", "sys", "version_short", "warnings"];
|
|
16
|
+
readonly json_schema: ["Annotated", "Any", "AnyType", "Callable", "ComputedField", "CoreModeRef", "CoreRef", "CoreSchema", "CoreSchemaOrFieldType", "Counter", "DEFAULT_REF_TEMPLATE", "DefsRef", "Enum", "Examples", "GenerateJsonSchema", "GetJsonSchemaHandler", "Hashable", "Iterable", "JsonDict", "JsonRef", "JsonSchemaKeyT", "JsonSchemaMode", "JsonSchemaValue", "JsonSchemaWarningKind", "JsonValue", "Literal", "MISSING", "NewType", "NoDefault", "Pattern", "PydanticDeprecatedSince26", "PydanticDeprecatedSince29", "PydanticInvalidForJsonSchema", "PydanticJsonSchemaWarning", "PydanticOmit", "PydanticSchemaGenerationError", "PydanticUserError", "Sequence", "SkipJsonSchema", "TYPE_CHECKING", "TypeAlias", "TypeVar", "Union", "WithJsonSchema", "assert_never", "cast", "collections", "core_schema", "dataclasses", "deepcopy", "defaultdict", "deprecated", "final", "get_literal_values", "inspect", "math", "model_json_schema", "models_json_schema", "os", "overload", "pydantic_core", "re", "to_jsonable_python", "warnings"];
|
|
17
|
+
readonly main: ["BaseModel", "create_model"];
|
|
18
|
+
readonly networks: ["AmqpDsn", "AnyHttpUrl", "AnyUrl", "AnyWebsocketUrl", "ClickHouseDsn", "CockroachDsn", "EmailStr", "FileUrl", "FtpUrl", "HttpUrl", "IPvAnyAddress", "IPvAnyInterface", "IPvAnyNetwork", "KafkaDsn", "MariaDBDsn", "MongoDsn", "MySQLDsn", "NameEmail", "NatsDsn", "PostgresDsn", "RedisDsn", "SnowflakeDsn", "UrlConstraints", "WebsocketUrl", "validate_email"];
|
|
19
|
+
readonly plugin: ["BaseValidateHandlerProtocol", "NewSchemaReturns", "PydanticPluginProtocol", "SchemaKind", "SchemaTypePath", "ValidateJsonHandlerProtocol", "ValidatePythonHandlerProtocol", "ValidateStringsHandlerProtocol"];
|
|
20
|
+
readonly root_model: ["RootModel"];
|
|
21
|
+
readonly type_adapter: ["Any", "BaseModel", "Callable", "ConfigDict", "CoreSchema", "DEFAULT_REF_TEMPLATE", "ExtraValues", "FrameType", "GenerateJsonSchema", "Generic", "IncEx", "Iterable", "JsonSchemaKeyT", "JsonSchemaMode", "JsonSchemaValue", "Literal", "P", "ParamSpec", "PluggableSchemaValidator", "PydanticUndefinedAnnotation", "PydanticUserError", "R", "SchemaSerializer", "SchemaValidator", "Some", "T", "TypeAdapter", "TypeAdapterT", "TypeVar", "cast", "create_schema_validator", "final", "is_dataclass", "is_typeddict", "overload", "sys", "types"];
|
|
22
|
+
readonly types: ["AllowInfNan", "AwareDatetime", "Base64Bytes", "Base64Encoder", "Base64Str", "Base64UrlBytes", "Base64UrlStr", "ByteSize", "DirectoryPath", "Discriminator", "EncodedBytes", "EncodedStr", "EncoderProtocol", "FailFast", "FilePath", "FiniteFloat", "FutureDate", "FutureDatetime", "GetPydanticSchema", "ImportString", "Json", "JsonValue", "NaiveDatetime", "NegativeFloat", "NegativeInt", "NewPath", "NonNegativeFloat", "NonNegativeInt", "NonPositiveFloat", "NonPositiveInt", "OnErrorOmit", "PastDate", "PastDatetime", "PaymentCardNumber", "PositiveFloat", "PositiveInt", "Secret", "SecretBytes", "SecretStr", "SocketPath", "Strict", "StrictBool", "StrictBytes", "StrictFloat", "StrictInt", "StrictStr", "StringConstraints", "Tag", "UUID1", "UUID3", "UUID4", "UUID5", "UUID6", "UUID7", "UUID8", "conbytes", "condate", "condecimal", "confloat", "confrozenset", "conint", "conlist", "conset", "constr"];
|
|
23
|
+
readonly validate_call_decorator: ["validate_call"];
|
|
24
|
+
readonly version: ["VERSION", "version_info"];
|
|
25
|
+
readonly warnings: ["ArbitraryTypeWarning", "PydanticDeprecatedSince20", "PydanticDeprecatedSince210", "PydanticDeprecatedSince211", "PydanticDeprecatedSince212", "PydanticDeprecatedSince26", "PydanticDeprecatedSince29", "PydanticDeprecationWarning", "PydanticExperimentalWarning", "TypedDictExtraConfigWarning", "UnsupportedFieldAttributeWarning"];
|
|
26
|
+
}> & SymbolCreator
|
|
27
|
+
```
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# typingModule
|
|
2
|
+
|
|
3
|
+
`typing` stdlib symbols used heavily with Pydantic generics and annotations.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
typingModule: import("../create-module.js").ModuleRefkeys<{
|
|
7
|
+
readonly ".": ["Annotated", "Any", "ClassVar", "Generic", "Literal", "Optional", "Protocol", "TypeVar", "Union", "final", "override", "runtime_checkable"];
|
|
8
|
+
}> & SymbolCreator
|
|
9
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alloy-js/python",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.1",
|
|
4
4
|
"description": "Python bindings for Alloy",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
"author": "",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@alloy-js/core": "~0.23.
|
|
23
|
+
"@alloy-js/core": "~0.23.1 || >= 0.24.0-dev.6",
|
|
24
24
|
"change-case": "^5.4.4",
|
|
25
25
|
"pathe": "^2.0.3"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@alloy-js/cli": "~0.23.0 || >= 0.24.0-dev.
|
|
29
|
-
"@alloy-js/rollup-plugin": "~0.1.1 || >= 0.1.2-dev.
|
|
28
|
+
"@alloy-js/cli": "~0.23.0 || >= 0.24.0-dev.1",
|
|
29
|
+
"@alloy-js/rollup-plugin": "~0.1.1 || >= 0.1.2-dev.2",
|
|
30
30
|
"@microsoft/api-extractor": "~7.52.8",
|
|
31
31
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
32
32
|
"concurrently": "^9.2.0",
|