معرفی شرکت ها


extendable-pydantic-0.0.3


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

-
ویژگی مقدار
سیستم عامل -
نام فایل extendable-pydantic-0.0.3
نام extendable-pydantic
نسخه کتابخانه 0.0.3
نگهدارنده []
ایمیل نگهدارنده []
نویسنده -
ایمیل نویسنده Laurent Mignon <laurent.mignon@acsone.eu>
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/extendable-pydantic/
مجوز MIT License Copyright (c) 2021 Laurent Mignon (ACSONE) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[![CI](https://github.com/lmignon/pydantic-ext/actions/workflows/ci.yml/badge.svg)](https://github.com/lmignon/pydantic-ext/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/lmignon/pydantic-ext/branch/master/graph/badge.svg?token=Z9FWM57T14)](https://codecov.io/gh/lmignon/pydantic-ext) # pydantic-ext This addons provides a new type used to declare [Pydantic](https://pypi.org/project/pydantic/) model as [Extendable](https://pypi.org/project/extendable/) class. ```python from pydantic import BaseModel from extendable_pydantic import ExtendableModelMeta from extendable import context, registry class Location(BaseModel, metaclass=ExtendableModelMeta): lat = 0.1 lng = 10.1 class ExtendedLocation(Location, extends=Location): name: str _registry = registry.ExtendableClassesRegistry() context.extendable_registry.set(_registry) _registry.init_registry() loc = Location(**{"lat": 12.3, "lng": 13.2, "name": "My Loc"}) loc.dict() == {"lat": 12.3, "lng": 13.2, "name": "My Loc"} #> True loc.schema() #> {'title': 'Location', 'type': 'object', 'properties': {'lat': {'title': 'Lat', 'default': 0.1, 'type': 'number'}, 'lng': {'title': 'Lng', 'default': 10.1, 'type': 'number'}, 'name': {'title': 'Name', 'type': 'string'}}, 'required': ['name']} ``` ## Development `pip install -e .` Then, copy `extendable_pydantic_patcher.pth` to `$VIRTUAL_ENV/lib/python3.10/site-packages`.


نیازمندی

مقدار نام
- extendable>=0.0.3
- pydantic
- wrapt
xtr mypy;
xtr coverage[toml];
xtr pytest;


زبان مورد نیاز

مقدار نام
>=3.7 Python


نحوه نصب


نصب پکیج whl extendable-pydantic-0.0.3:

    pip install extendable-pydantic-0.0.3.whl


نصب پکیج tar.gz extendable-pydantic-0.0.3:

    pip install extendable-pydantic-0.0.3.tar.gz