pydantic-xml icon indicating copy to clipboard operation
pydantic-xml copied to clipboard

python xml for humans

Results 15 pydantic-xml issues
Sort by recently updated
recently updated
newest added

Hi I'm migrating a library from pydantic_xml 0.6 to the most recent version. I see that the subclasses are instantiated with different logic compared to the older version. Indeed running...

question
v2

(Disclaimer: This is my work account and I'm posting this on behalf of my $work.) Hi. I'm working on upgrading our code to v2, and the only `pydantic_xml`-related snag I've...

question
v2

I have a field with an optional `decimal.Decimal` which was causing some [issues](https://github.com/pydantic/pydantic/discussions/7962) with Pydantic. The fix I found was to use `Annotated` to apply constraints to the `decimal.Decimal` instead...

question

Imagine I have the following xml: ``` Hello text_content_1 text_content_2 ... ``` That is, the metadata consists of a dynamic number of elements with dynamic tags and no attributes, each...

question

I'm not sure if this is a feature request, documentation request or a user question. I have some XML like this: ```xml first text second text third text ``` How...

question

You currently cannot serialize a non-generic model with a generic model inside of it. While `to_xml()` doesn't work, `model_dump_json()` still works, so it doesn't seem to be a inherent problem...

question
v2

The latest pydantic release has added support for Union discriminators that can be implemented via a custom function: https://docs.pydantic.dev/latest/concepts/unions/#discriminated-unions-with-callable-discriminator I recently attempted to utilise this with pydantic-xml but ran into...

enhancement
v2

This is a redo of PR #37 I have addressed all comments expect the larger one about `HeterogeneousSerializerFactory`, I will create a separate PR for that

I have the model, which has field with type: ```py children: list[ Union[ FieldBool, FieldInt8, FieldInt16, FieldInt32, FieldInt64, FieldUint8, FieldUint16, FieldUint32, FieldUint64, FieldEnum, FieldBitfield, FieldCompound, FieldStaticArray, FieldVector, FieldDeque, FieldSet, FieldBitVector,...

enhancement
question
v2

Hi. I'm using pydantic-xml to build xml files from json. I faced a problem. I need to add a value and I tried to do it manually, simply using f-strings....

enhancement