python-warlock-help-1.3.3-1.oe2003sp4>  <@PT@7!.ܶujG7oe$#openeuler@compass-ci.com G7o-: -: 2><`6SYn.W1K(*U|"^FԢԞ],{QVǀȃ<~0=lZ}ܨS-hݠlgؒh " bQ\a%Nhc>~!M 0\ˡ,|S+Vj߫+;##~4dbl HY Ry!cG, -$ мp.ɻQK O>Ƭ`Y8PP:wS N3 (X$)9V\?_ދZ^? bb9>7=]<_!.Z2" @(5-'Z.y./.#X'25b9196e3593171fd6bab0d448d8f2c1a901713f0f9c0018ef338f3dd2188262ec0e321cfd2fef27a71eb09559d07b096b974243R]A(BW >9 ? d ( W   ' - 4 8  :  <  @  A  D H M R |    ( 78 @9 D: jF G H I X Y \ ] ^ b d e f l t u v z " 4 8 > Cpython-warlock-help1.3.31.oe2003sp4Development documents and examples for warlock [![PyPI](https://img.shields.io/pypi/v/warlock.svg)][warlock] [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/warlock.svg)][warlock] [![PyPI - Downloads](https://img.shields.io/pypi/dw/warlock.svg)][pypistats] [![Build Status](https://travis-ci.org/bcwaldon/warlock.svg?branch=master)][ci-builds] [![Coverage Status](https://coveralls.io/repos/github/bcwaldon/warlock/badge.svg?branch=master)][coveralls] Warlock is [available on PyPI][warlock]: ```shell pip install warlock ``` 1) Create your schema ```python >>> schema = { 'name': 'Country', 'properties': { 'name': {'type': 'string'}, 'abbreviation': {'type': 'string'}, 'population': {'type': 'integer'}, }, 'additionalProperties': False, } ``` 2) Create a model ```python >>> import warlock >>> Country = warlock.model_factory(schema) ``` 3) Create an object using your model ```python >>> sweden = Country(name='Sweden', abbreviation='SE') ``` 4) Let the object validate itself ```python >>> sweden.name = 5 Traceback (most recent call last): File "", line 1, in File "warlock/core.py", line 53, in __setattr__ raise InvalidOperation(msg) warlock.core.InvalidOperation: Unable to set 'name' to '5' >>> sweden.overlord = 'Bears' Traceback (most recent call last): File "", line 1, in File "warlock/core.py", line 53, in __setattr__ raise InvalidOperation(msg) warlock.core.InvalidOperation: Unable to set 'overlord' to 'Bears' ``` 5) Generate a [JSON Patch document](http://tools.ietf.org/html/draft-ietf-appsawg-json-patch) to track changes ```python >>> sweden.population=9453000 >>> sweden.patch '[{"path": "/population", "value": 9453000, "op": "add"}]' ``` [warlock]: https://pypi.org/project/warlock/ [pip]: https://pip.pypa.io/en/stable/ [ci-builds]: https://travis-ci.org/bcwaldon/warlock [coveralls]: https://coveralls.io/github/bcwaldon/warlock?branch=master [pypistats]: https://pypistats.org/packages/warlocke$#dc-64g.compass-ciApache-2.0http://openeuler.orgUnspecifiedhttp://github.com/bcwaldon/warlocklinuxnoarchAe$#rootrootpython-warlock-1.3.3-1.oe2003sp4.src.rpmpython-warlock-helppython3-warlock-doc    rpmlib(CompressedFileNames)rpmlib(FileDigests)rpmlib(PayloadFilesHavePrefix)rpmlib(PayloadIsXz)3.0.4-14.6.0-14.0-15.2-14.15.1_@Python_Bot - Package Spec generateddc-64g.compass-ci 16968672681.3.3-1.oe2003sp4python-warlock/usr/share/doc/-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection cpioxz2noarch-openEuler-linux-gnudirectoryRa?r2:utf-8abc44e03deaa7cedbb61a6fd1fe4ae73307b9ef7a73b972a0eb15b8401764da3?p7zXZ !#, Z] b2u jӫ`(y/#IIYz5`E`7=.rek34DM&Gnt#%2N:jG8j;Eky-@$uHJV(f7oO!'}(U~ YZ