pydantic-fixedwidth 0.1.2__tar.gz → 0.2.0__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.2.0}/.devcontainer/devcontainer.json +1 -1
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.github/workflows/ci.yaml +2 -2
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.github/workflows/release.yaml +1 -1
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/PKG-INFO +8 -2
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/README.md +7 -1
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/pyproject.toml +1 -1
- pydantic_fixedwidth-0.2.0/uv.lock +504 -0
- pydantic_fixedwidth-0.1.2/uv.lock +0 -454
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.devcontainer/onCreateCommand.sh +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.editorconfig +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.gitattributes +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.github/dependabot.yaml +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.gitignore +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.pre-commit-config.yaml +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.python-version +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.vscode/extensions.json +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/.vscode/settings.json +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/LICENSE +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/Makefile +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/pydantic_fixedwidth/__init__.py +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/pydantic_fixedwidth/fixedwidth.py +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/pydantic_fixedwidth/py.typed +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/tests/__init__.py +0 -0
- {pydantic_fixedwidth-0.1.2 → pydantic_fixedwidth-0.2.0}/tests/test_fixedwidth.py +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "lasuillard/pydantic-fixedwidth",
|
|
3
3
|
"image": "mcr.microsoft.com/devcontainers/base:1-bookworm",
|
|
4
4
|
"features": {
|
|
5
|
-
"ghcr.io/devcontainers-
|
|
5
|
+
"ghcr.io/devcontainers-extra/features/pre-commit:2": {}
|
|
6
6
|
},
|
|
7
7
|
"onCreateCommand": "./.devcontainer/onCreateCommand.sh",
|
|
8
8
|
"postAttachCommand": "make install",
|
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
uses: actions/checkout@v4
|
|
21
21
|
|
|
22
22
|
- name: Set up uv
|
|
23
|
-
uses: astral-sh/setup-uv@
|
|
23
|
+
uses: astral-sh/setup-uv@v6
|
|
24
24
|
with:
|
|
25
25
|
version: latest
|
|
26
26
|
enable-cache: true
|
|
@@ -51,7 +51,7 @@ jobs:
|
|
|
51
51
|
uses: actions/checkout@v4
|
|
52
52
|
|
|
53
53
|
- name: Set up uv
|
|
54
|
-
uses: astral-sh/setup-uv@
|
|
54
|
+
uses: astral-sh/setup-uv@v6
|
|
55
55
|
with:
|
|
56
56
|
version: latest
|
|
57
57
|
enable-cache: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-fixedwidth
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
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
|
|
@@ -24,7 +24,7 @@ Description-Content-Type: text/markdown
|
|
|
24
24
|
[](https://opensource.org/licenses/MIT)
|
|
25
25
|
[](https://github.com/lasuillard/pydantic-fixedwidth/actions/workflows/ci.yaml)
|
|
26
26
|
[](https://codecov.io/gh/lasuillard/pydantic-fixedwidth)
|
|
27
|
-

|
|
27
|
+
[](https://pypi.org/project/pydantic-fixedwidth/)
|
|
28
28
|
|
|
29
29
|
Custom Pydantic models for serializing and deserializing fixed-width format data.
|
|
30
30
|
|
|
@@ -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
|
```
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://opensource.org/licenses/MIT)
|
|
4
4
|
[](https://github.com/lasuillard/pydantic-fixedwidth/actions/workflows/ci.yaml)
|
|
5
5
|
[](https://codecov.io/gh/lasuillard/pydantic-fixedwidth)
|
|
6
|
-

|
|
6
|
+
[](https://pypi.org/project/pydantic-fixedwidth/)
|
|
7
7
|
|
|
8
8
|
Custom Pydantic models for serializing and deserializing fixed-width format data.
|
|
9
9
|
|
|
@@ -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
|
```
|