Skip to content

Commit fe98327

Browse files
author
Daniel Roschka
committed
docs: Add how to install Pydantic without binaries
Pydantic can be installed without binary files. This significantly reduces the additional size it adds to the compressed Lambda packages (down to 2MB from 25MB) at the expense of 30%-50% of its performance. While at it I also updated the amount of megabyte Pydantic adds to the package, as it wasn't clear if the stated number referred to compressed or uncompressed package size and I couldn't reproduce the 75MB either way.
1 parent 1394d00 commit fe98327

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: docs/utilities/parser.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,13 @@ This utility provides data parsing and deep validation using [Pydantic](https://
1414
**Extra dependency**
1515

1616
???+ warning
17-
This will increase the overall package size by approximately 75MB due to Pydantic dependency.
17+
18+
This will increase the compressed package size by approximately 25MB due to the Pydantic dependency.
19+
20+
To reduce the impact on the package size at the expense of 30%-50% of its performance [Pydantic can also be
21+
installed without binary files](https://pydantic-docs.helpmanual.io/install/#performance-vs-package-size-trade-off):
22+
23+
`SKIP_CYTHON=1 pip install --no-binary pydantic aws-lambda-powertools[pydantic]`
1824

1925
Install parser's extra dependencies using **`pip install aws-lambda-powertools[pydantic]`**.
2026

0 commit comments

Comments
 (0)