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.

Files changed (23) hide show
  1. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/PKG-INFO +7 -1
  2. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/README.md +6 -0
  3. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pyproject.toml +1 -1
  4. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.devcontainer/devcontainer.json +0 -0
  5. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.devcontainer/onCreateCommand.sh +0 -0
  6. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.editorconfig +0 -0
  7. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.gitattributes +0 -0
  8. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.github/dependabot.yaml +0 -0
  9. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.github/workflows/ci.yaml +0 -0
  10. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.github/workflows/release.yaml +0 -0
  11. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.gitignore +0 -0
  12. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.pre-commit-config.yaml +0 -0
  13. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.python-version +0 -0
  14. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.vscode/extensions.json +0 -0
  15. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/.vscode/settings.json +0 -0
  16. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/LICENSE +0 -0
  17. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/Makefile +0 -0
  18. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pydantic_fixedwidth/__init__.py +0 -0
  19. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pydantic_fixedwidth/fixedwidth.py +0 -0
  20. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/pydantic_fixedwidth/py.typed +0 -0
  21. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/tests/__init__.py +0 -0
  22. {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.1.3}/tests/test_fixedwidth.py +0 -0
  23. {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.2
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
  ```
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pydantic-fixedwidth"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Custom Pydantic models for parsing and serializing fixed-width format of data."
5
5
  readme = "README.md"
6
6
  license = "MIT"