lush-pydanticx
Pydantic v2 的一些小扩展. 这里不做“框架”,只收一些重复出现、但又不值得单独开一个包的函数/类型.
例子
把 Json[T] 字段在序列化时转成 bytes:
from typing import Any
from pydantic import BaseModel, Json, field_serializer
from lush_pydanticx import json_to_bytes_serializer
class Payload(BaseModel):
data: Json[dict[str, Any]]
@field_serializer("data")
def _ser(self, value: Any) -> bytes:
return json_to_bytes_serializer(value)
开发
uv sync -p 3.10 --frozen
uv run -p 3.10 pytest
Metadata
Release files for lush-pydanticx 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lush_pydanticx-0.1.2.tar.gz | 4.3 kB | Without provenance | Details for lush_pydanticx-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lush_pydanticx-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for lush_pydanticx-0.1.2-py3-none-any.whl |
Total release size: 7.2 kB
Release files / lush_pydanticx-0.1.2.tar.gz
| Download URL | lush_pydanticx-0.1.2.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f48c0b714285b768f1c8e696d41de4db749414e80749d936a0127853cbcc0e68
|
|
BLAKE2b-256 checksum How to use checksums |
36b8e4604ab751c1fcf01e53c193d1c6a514b9465dda77708c4e25e2737ed79f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / lush_pydanticx-0.1.2-py3-none-any.whl
| Download URL | lush_pydanticx-0.1.2-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cb5d0fb41b6e0f4c662dcf2fd7783987b00fc0ad914274b930159b3652571a7
|
|
BLAKE2b-256 checksum How to use checksums |
7760078d3dd860c1bda8c4a82b5508011ad1d9fa5fa6eb1ed0c6556233fb69d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for lush-pydanticx 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.