pydantic-fixedwidth 0.1.2__tar.gz → 0.1.3__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.
Potentially problematic release.
This version of pydantic-fixedwidth might be problematic. Click here for more details.
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/PKG-INFO +7 -1
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/README.md +6 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pyproject.toml +1 -1
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.devcontainer/devcontainer.json +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.devcontainer/onCreateCommand.sh +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.editorconfig +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.gitattributes +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.github/dependabot.yaml +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.github/workflows/ci.yaml +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.github/workflows/release.yaml +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.gitignore +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.pre-commit-config.yaml +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.python-version +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.vscode/extensions.json +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.vscode/settings.json +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/LICENSE +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/Makefile +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pydantic_fixedwidth/__init__.py +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pydantic_fixedwidth/fixedwidth.py +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pydantic_fixedwidth/py.typed +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/tests/__init__.py +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/tests/test_fixedwidth.py +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-fixedwidth
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: Custom Pydantic models for parsing and serializing fixed-width format of data.
|
|
5
5
|
Project-URL: Homepage, https://github.com/lasuillard/pydantic-fixedwidth
|
|
6
6
|
Project-URL: Repository, https://github.com/lasuillard/pydantic-fixedwidth.git
|
|
@@ -66,6 +66,7 @@ class SomeRequest(Fixedwidth):
|
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
|
|
69
|
+
# Format model to bytes
|
|
69
70
|
some_request = SomeRequest(
|
|
70
71
|
string="<DFG&",
|
|
71
72
|
hangul="한글",
|
|
@@ -76,4 +77,9 @@ b = some_request.format_bytes()
|
|
|
76
77
|
|
|
77
78
|
assert len(b) == 54
|
|
78
79
|
assert b == b"<DFG& \xed\x95\x9c\xea\xb8\x800000000381 20240123141120124277"
|
|
80
|
+
|
|
81
|
+
# Parse bytes into model
|
|
82
|
+
parsed_request = SomeRequest.parse_bytes(b)
|
|
83
|
+
|
|
84
|
+
assert parsed_request == some_request
|
|
79
85
|
```
|
|
@@ -45,6 +45,7 @@ class SomeRequest(Fixedwidth):
|
|
|
45
45
|
)
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
# Format model to bytes
|
|
48
49
|
some_request = SomeRequest(
|
|
49
50
|
string="<DFG&",
|
|
50
51
|
hangul="한글",
|
|
@@ -55,4 +56,9 @@ b = some_request.format_bytes()
|
|
|
55
56
|
|
|
56
57
|
assert len(b) == 54
|
|
57
58
|
assert b == b"<DFG& \xed\x95\x9c\xea\xb8\x800000000381 20240123141120124277"
|
|
59
|
+
|
|
60
|
+
# Parse bytes into model
|
|
61
|
+
parsed_request = SomeRequest.parse_bytes(b)
|
|
62
|
+
|
|
63
|
+
assert parsed_request == some_request
|
|
58
64
|
```
|
|
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
|