polyxml 0.22.0__tar.gz → 0.23.2__tar.gz
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.
- {polyxml-0.22.0 → polyxml-0.23.2}/Cargo.lock +6 -6
- {polyxml-0.22.0 → polyxml-0.23.2}/Cargo.toml +3 -3
- {polyxml-0.22.0 → polyxml-0.23.2}/PKG-INFO +5 -5
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/README.md +4 -4
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/cpp/mod.rs +2 -2
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/csharp/mod.rs +1 -1
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/go/mod.rs +2 -2
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/java/mod.rs +1 -1
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/python/mod.rs +1 -1
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/rust/mod.rs +1 -1
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/typescript/mod.rs +1 -1
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/transcoder.rs +4 -2
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_python_codegen.rs +1 -1
- {polyxml-0.22.0 → polyxml-0.23.2}/pyproject.toml +5 -6
- {polyxml-0.22.0 → polyxml-0.23.2}/python/polyxml/__init__.py +1 -1
- {polyxml-0.22.0 → polyxml-0.23.2}/README.md +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/Cargo.toml +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/benches/core_benchmarks.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/benches/support/tag_dispatch_fixtures.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/benches/tag_dispatch.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/java/codec.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/java/models.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/codegen/mod.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/converters.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/error.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/ir/mod.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/ir/tarjan.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/json.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/lib.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/parser.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/schema.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/schema_parser/mod.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/serializer.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/src/value.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_conformance.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_core.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_cpp_codegen.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_csharp_codegen.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_go_codegen.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_java_codegen.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_json.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_pattern_codegen.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_rust_codecs.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_rust_codegen.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_schema_audit.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_schema_ir.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_security.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_transcoder.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_ts_codegen.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/tests/test_xsi_type.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/Cargo.toml +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/README.md +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/src/lib.rs +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/tests/test_conformance.py +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/tests/test_generated_models.py +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/tests/test_json.py +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/tests/test_polyxml.py +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-python/tests/test_xsi_type.py +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/python/polyxml/AGENT_GUIDE.md +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/python/polyxml/compat/__init__.py +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/python/polyxml/compat/xsdata.py +0 -0
- {polyxml-0.22.0 → polyxml-0.23.2}/python/polyxml/py.typed +0 -0
|
@@ -608,7 +608,7 @@ dependencies = [
|
|
|
608
608
|
|
|
609
609
|
[[package]]
|
|
610
610
|
name = "polyxml"
|
|
611
|
-
version = "0.
|
|
611
|
+
version = "0.23.2"
|
|
612
612
|
dependencies = [
|
|
613
613
|
"criterion",
|
|
614
614
|
"heck",
|
|
@@ -628,14 +628,14 @@ dependencies = [
|
|
|
628
628
|
|
|
629
629
|
[[package]]
|
|
630
630
|
name = "polyxml-c"
|
|
631
|
-
version = "0.
|
|
631
|
+
version = "0.23.2"
|
|
632
632
|
dependencies = [
|
|
633
633
|
"polyxml",
|
|
634
634
|
]
|
|
635
635
|
|
|
636
636
|
[[package]]
|
|
637
637
|
name = "polyxml-cli"
|
|
638
|
-
version = "0.
|
|
638
|
+
version = "0.23.2"
|
|
639
639
|
dependencies = [
|
|
640
640
|
"clap",
|
|
641
641
|
"glob",
|
|
@@ -649,7 +649,7 @@ dependencies = [
|
|
|
649
649
|
|
|
650
650
|
[[package]]
|
|
651
651
|
name = "polyxml-js"
|
|
652
|
-
version = "0.
|
|
652
|
+
version = "0.23.2"
|
|
653
653
|
dependencies = [
|
|
654
654
|
"napi",
|
|
655
655
|
"napi-build",
|
|
@@ -659,7 +659,7 @@ dependencies = [
|
|
|
659
659
|
|
|
660
660
|
[[package]]
|
|
661
661
|
name = "polyxml-python"
|
|
662
|
-
version = "0.
|
|
662
|
+
version = "0.23.2"
|
|
663
663
|
dependencies = [
|
|
664
664
|
"lexical-core",
|
|
665
665
|
"polyxml",
|
|
@@ -669,7 +669,7 @@ dependencies = [
|
|
|
669
669
|
|
|
670
670
|
[[package]]
|
|
671
671
|
name = "polyxml-wasm"
|
|
672
|
-
version = "0.
|
|
672
|
+
version = "0.23.2"
|
|
673
673
|
dependencies = [
|
|
674
674
|
"polyxml",
|
|
675
675
|
"quick-xml",
|
|
@@ -3,13 +3,13 @@ resolver = "2"
|
|
|
3
3
|
members = ["crates/polyxml-core", "crates/polyxml-python"]
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
|
-
version = "0.
|
|
6
|
+
version = "0.23.2"
|
|
7
7
|
edition = "2021"
|
|
8
8
|
rust-version = "1.80"
|
|
9
9
|
license = "MIT"
|
|
10
10
|
authors = ["Bailey Nguyen <bailey.tan.nguyen@gmail.com>"]
|
|
11
|
-
repository = "https://github.com/
|
|
12
|
-
homepage = "https://github.
|
|
11
|
+
repository = "https://github.com/polyxml/PolyXML"
|
|
12
|
+
homepage = "https://polyxml.github.io/PolyXML/"
|
|
13
13
|
keywords = ["xml", "deserializer", "serializer", "data-binding", "polyglot"]
|
|
14
14
|
categories = ["parsing", "encoding"]
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: polyxml
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.2
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -26,10 +26,10 @@ Author-email: Bailey Nguyen <bailey.tan.nguyen@gmail.com>
|
|
|
26
26
|
License: MIT
|
|
27
27
|
Requires-Python: >=3.12
|
|
28
28
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
29
|
-
Project-URL: Documentation, https://
|
|
30
|
-
Project-URL: Homepage, https://github.com/
|
|
31
|
-
Project-URL: Issues, https://github.com/
|
|
32
|
-
Project-URL: Repository, https://github.com/
|
|
29
|
+
Project-URL: Documentation, https://polyxml.github.io/PolyXML/
|
|
30
|
+
Project-URL: Homepage, https://github.com/polyxml/PolyXML
|
|
31
|
+
Project-URL: Issues, https://github.com/polyxml/PolyXML/issues
|
|
32
|
+
Project-URL: Repository, https://github.com/polyxml/PolyXML
|
|
33
33
|
|
|
34
34
|
# PolyXML Python Bindings
|
|
35
35
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://crates.io/crates/polyxml)
|
|
4
4
|
[](https://docs.rs/polyxml)
|
|
5
|
-
[](https://github.com/
|
|
5
|
+
[](https://github.com/polyxml/PolyXML/blob/main/LICENSE)
|
|
6
6
|
|
|
7
7
|
**PolyXML** is a high-performance streaming XML data-binding engine and polyglot schema compiler built in Rust. It serves as the foundational native core powering the `polyxml` CLI and language bindings across Python, C/C++, Java, TypeScript, Go, and C#.
|
|
8
8
|
|
|
@@ -145,12 +145,12 @@ let val = polyxml::deserialize_with_limit(xml_bytes, schema, 64)?;
|
|
|
145
145
|
|
|
146
146
|
## Documentation & Repository
|
|
147
147
|
|
|
148
|
-
- **Full Documentation**: [https://
|
|
148
|
+
- **Full Documentation**: [https://polyxml.github.io/PolyXML/](https://polyxml.github.io/PolyXML/)
|
|
149
149
|
- **API Reference**: [https://docs.rs/polyxml](https://docs.rs/polyxml)
|
|
150
|
-
- **Source Code**: [https://github.com/
|
|
150
|
+
- **Source Code**: [https://github.com/polyxml/PolyXML](https://github.com/polyxml/PolyXML)
|
|
151
151
|
|
|
152
152
|
---
|
|
153
153
|
|
|
154
154
|
## License
|
|
155
155
|
|
|
156
|
-
Licensed under the [MIT License](https://github.com/
|
|
156
|
+
Licensed under the [MIT License](https://github.com/polyxml/PolyXML/blob/main/LICENSE).
|
|
@@ -268,7 +268,7 @@ impl CppCodegen {
|
|
|
268
268
|
}
|
|
269
269
|
writeln!(
|
|
270
270
|
out,
|
|
271
|
-
"// @generated by PolyXML Compiler (https://github.com/
|
|
271
|
+
"// @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)"
|
|
272
272
|
)
|
|
273
273
|
.unwrap();
|
|
274
274
|
writeln!(out, "// Target: Modern C++20/C++23 (Header-Only)").unwrap();
|
|
@@ -306,7 +306,7 @@ impl CppCodegen {
|
|
|
306
306
|
}
|
|
307
307
|
writeln!(
|
|
308
308
|
out,
|
|
309
|
-
"// @generated by PolyXML Compiler (https://github.com/
|
|
309
|
+
"// @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)"
|
|
310
310
|
)
|
|
311
311
|
.unwrap();
|
|
312
312
|
writeln!(out, "// Target: Modern C++20/C++23 Module Interface Unit").unwrap();
|
|
@@ -263,7 +263,7 @@ impl CSharpCodegen {
|
|
|
263
263
|
writeln!(out, "// <auto-generated/>").unwrap();
|
|
264
264
|
writeln!(
|
|
265
265
|
out,
|
|
266
|
-
"// @generated by PolyXML Compiler (https://github.com/
|
|
266
|
+
"// @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)"
|
|
267
267
|
)
|
|
268
268
|
.unwrap();
|
|
269
269
|
writeln!(out, "#nullable enable\n").unwrap();
|
|
@@ -316,12 +316,12 @@ impl GoCodegen {
|
|
|
316
316
|
}
|
|
317
317
|
writeln!(
|
|
318
318
|
out,
|
|
319
|
-
"// Code generated by PolyXML Compiler (https://github.com/
|
|
319
|
+
"// Code generated by PolyXML Compiler (https://github.com/polyxml/PolyXML). DO NOT EDIT."
|
|
320
320
|
)
|
|
321
321
|
.unwrap();
|
|
322
322
|
writeln!(
|
|
323
323
|
out,
|
|
324
|
-
"// @generated by PolyXML Compiler (https://github.com/
|
|
324
|
+
"// @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)\n"
|
|
325
325
|
)
|
|
326
326
|
.unwrap();
|
|
327
327
|
|
|
@@ -323,7 +323,7 @@ impl JavaCodegen {
|
|
|
323
323
|
out.push_str("\n\n");
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
out.push_str("// @generated by PolyXML Compiler (https://github.com/
|
|
326
|
+
out.push_str("// @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)\n");
|
|
327
327
|
if !self.options.use_records {
|
|
328
328
|
out.push_str("// Target: Java 21+ (Mutable JavaBeans)\n\n");
|
|
329
329
|
} else if self.options.backend.is_jackson() {
|
|
@@ -247,7 +247,7 @@ impl PythonCodegen {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
out.push_str("# @generated by PolyXML Compiler (https://github.com/
|
|
250
|
+
out.push_str("# @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)\n");
|
|
251
251
|
out.push_str("from __future__ import annotations\n\n");
|
|
252
252
|
|
|
253
253
|
self.emit_imports(&mut out, ir);
|
|
@@ -230,7 +230,7 @@ impl RustCodegen {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
out.push_str("// @generated by PolyXML Compiler (https://github.com/
|
|
233
|
+
out.push_str("// @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)\n");
|
|
234
234
|
out.push_str(
|
|
235
235
|
"#![allow(dead_code, unused_imports, unused_mut, unused_variables, unused_assignments, non_camel_case_types, non_snake_case)]\n\n",
|
|
236
236
|
);
|
|
@@ -262,7 +262,7 @@ impl TypeScriptCodegen {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
out.push_str("/**\n");
|
|
265
|
-
out.push_str(" * @generated by PolyXML Compiler (https://github.com/
|
|
265
|
+
out.push_str(" * @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)\n");
|
|
266
266
|
out.push_str(" * Target: TypeScript 5+\n");
|
|
267
267
|
if let Some(ref ns) = ir.target_namespace {
|
|
268
268
|
let _ = writeln!(out, " * Target Namespace: {}", ns);
|
|
@@ -16,7 +16,8 @@ use crate::serializer::XmlSerializer;
|
|
|
16
16
|
///
|
|
17
17
|
/// If a `ModelSchema` is provided, typed data-binding is used, respecting numeric, boolean,
|
|
18
18
|
/// and collection types as well as field aliases.
|
|
19
|
-
/// If `schema` is None,
|
|
19
|
+
/// If `schema` is None, XML events are assembled into a JSON value tree.
|
|
20
|
+
/// The complete input and output are held in memory.
|
|
20
21
|
pub fn xml_to_json(
|
|
21
22
|
xml: &[u8],
|
|
22
23
|
schema: Option<Arc<ModelSchema>>,
|
|
@@ -35,7 +36,8 @@ pub fn xml_to_json(
|
|
|
35
36
|
///
|
|
36
37
|
/// If a `ModelSchema` is provided, typed data-binding is used, mapping JSON properties to XML
|
|
37
38
|
/// elements, attributes, and namespaces.
|
|
38
|
-
/// If `schema` is None,
|
|
39
|
+
/// If `schema` is None, the complete JSON input is parsed into a value tree
|
|
40
|
+
/// before XML output is written into a byte buffer.
|
|
39
41
|
pub fn json_to_xml(
|
|
40
42
|
json: &[u8],
|
|
41
43
|
schema: Option<Arc<ModelSchema>>,
|
|
@@ -422,7 +422,7 @@ fn test_python_generated_tag_and_custom_header() {
|
|
|
422
422
|
let default_codegen = PythonCodegen::new(PythonOptions::default());
|
|
423
423
|
let default_code = default_codegen.generate_module(&ir);
|
|
424
424
|
assert!(default_code
|
|
425
|
-
.contains("# @generated by PolyXML Compiler (https://github.com/
|
|
425
|
+
.contains("# @generated by PolyXML Compiler (https://github.com/polyxml/PolyXML)"));
|
|
426
426
|
assert!(default_code.contains("from __future__ import annotations"));
|
|
427
427
|
|
|
428
428
|
// With custom header: prepends custom header
|
|
@@ -4,7 +4,7 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "polyxml"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.23.2"
|
|
8
8
|
description = "High-performance, polyglot XML data-binding engine built in Rust"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Bailey Nguyen", email = "bailey.tan.nguyen@gmail.com" }
|
|
@@ -41,10 +41,10 @@ dev = [
|
|
|
41
41
|
]
|
|
42
42
|
|
|
43
43
|
[project.urls]
|
|
44
|
-
Homepage = "https://github.com/
|
|
45
|
-
Documentation = "https://
|
|
46
|
-
Repository = "https://github.com/
|
|
47
|
-
Issues = "https://github.com/
|
|
44
|
+
Homepage = "https://github.com/polyxml/PolyXML"
|
|
45
|
+
Documentation = "https://polyxml.github.io/PolyXML/"
|
|
46
|
+
Repository = "https://github.com/polyxml/PolyXML"
|
|
47
|
+
Issues = "https://github.com/polyxml/PolyXML/issues"
|
|
48
48
|
|
|
49
49
|
[tool.maturin]
|
|
50
50
|
features = ["pyo3/extension-module"]
|
|
@@ -86,4 +86,3 @@ ignore = [
|
|
|
86
86
|
|
|
87
87
|
[tool.ruff.lint.isort]
|
|
88
88
|
known-first-party = ["polyxml"]
|
|
89
|
-
|
|
@@ -21,7 +21,7 @@ QUICKSTART FOR AI AGENTS & DEVELOPERS:
|
|
|
21
21
|
3. Serialize a model instance back into XML bytes:
|
|
22
22
|
>>> xml_bytes = polyxml.serialize(user, indent=2)
|
|
23
23
|
|
|
24
|
-
See `AGENT_GUIDE.md` or https://
|
|
24
|
+
See `AGENT_GUIDE.md` or https://polyxml.github.io/PolyXML/ for complete documentation.
|
|
25
25
|
"""
|
|
26
26
|
|
|
27
27
|
import importlib
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{polyxml-0.22.0 → polyxml-0.23.2}/crates/polyxml-core/benches/support/tag_dispatch_fixtures.rs
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|