Skip to main content

pyruicore

Build Status   Coverage Status   codebeat badge   python3.8   issues stars   license

  • This package is used to load python dict data to python class.

Usage

from pyruicore import BaseModel, Field


class Department(BaseModel):
    name: str
    address: str


class User(BaseModel):
    age: int = Field(default_factory=lambda: 1)
    departs: List[Department]


user = User(
    departs=[
        {"name": "de1", "address": "address1"},
        Department(name="2", address="address2"),
    ]
)
user_dict = user.dict()
"""
user_dict = {
    "age": 1,
    "departs": [
        {"name": "de1", "address": "address1"},
        {"name": "2", "address": "address2"},
    ]
}
"""

Maintainers

@ruicore

Contributing

PRs are accepted, this is first workout version, may have many bugs, so welcome to point out bugs and fix it.

License

MIT © 2020 ruicore

Metadata

Release files for pyruicore 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyruicore 0.1.3
File Size Uploaded
pyruicore-0.1.3.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyruicore 0.1.3
File Interpreter ABI Platform
pyruicore-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 17.4 kB

Release files / pyruicore-0.1.3.tar.gz

Download URL pyruicore-0.1.3.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ad9c3ea145b4e61b4d0d9cb58c757d9cb41c096ba0e0d8019f3f5c1b03817293
BLAKE2b-256 checksum
How to use checksums
824e273bf7eb3b093be12baf60009bb270c36d543402361e6b1ca1a0cb99e6ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Darwin/20.2.0

Release files / pyruicore-0.1.3-py3-none-any.whl

Download URL pyruicore-0.1.3-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5daba4c5616713df5fa880c48117414a4bd8cb522ad6aff05ee98677fd455599
BLAKE2b-256 checksum
How to use checksums
db6c08fcce0d1d9ac25d603cd6f9c5041a8bf87f4a9ab3d28909af03a49ed48f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Darwin/20.2.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page