python-warlock-help-1.3.3-1.oe1 >  A a7EW^^f 53i`pI=i Mm+blz,Z ~[: f CNy.$ Nز恧zQ5y|4$=dMS>XÜ9CA@9k{26RJɔF4:wd[!Jz璇HbgAi0 ٖ#/|:ړD)6 0C64c4f6a96ea79b8c95809e7022921f9b19bfe92b32f5a84acd45520083111bbb28089e56cfe914cc737ca9f814312713bb90c94ceȉa7EW^^fIxBdNPvkvJ@+[=o ۍJ\5qdUܣ;DB1U0 t)!UڳKʐQeJI$ʵDzz!$ڏN'Ţ&nvO2gw0PSU!&@eTwKo?(d+v{G;a1YO3uZ%v/@_m7ڊ]D*lɬP4&V{  >p< D? 4d " Q  % 0 E Q t z                    g( 8 9 : F G H I X Y \ ] $^ 3b Cc .d e f l t u v z     0Cpython-warlock-help1.3.31.oe1Development 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/warlocka7Cobs-worker1640081563-aarch64-0002openEuler:20.03:LTS:SP3:Epol / standard_aarch64http://openeuler.orgApache-2.0http://openeuler.orgUnspecifiedhttp://github.com/bcwaldon/warlocklinuxnoarchAa7Drootrootpython-warlock-1.3.3-1.oe1.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 generatedobs-worker1640081563-aarch64-0002 16407079071.3.3-1.oe1python-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 -fasynchronous-unwind-tables -fstack-clash-protectionobs://private/openEuler:20.03:LTS:SP3:Epol/standard_aarch64/b0b58d3acf5ff9f5f2b90d6cfc944ae8-python-warlockcpioxz2noarch-openEuler-linux-gnudirectory|y=oߥ.utf-80e2f0c2da6ff974562255803d017170ee9fc34f0d99f4af53f74fbde72726fd5?@7zXZ !#, Z] b2u jӫ`(y-7ft,imMATC_y} UdW?MQ׹t' O^p@ܡ 0ߛB7X/*w(U~ YZ