{"id":13769902,"url":"https://github.com/jaimegildesagredo/booby","last_synced_at":"2025-05-11T02:33:49.242Z","repository":{"id":46939583,"uuid":"7164232","full_name":"jaimegildesagredo/booby","owner":"jaimegildesagredo","description":"Data modeling and validation Python library","archived":false,"fork":false,"pushed_at":"2021-09-21T01:11:40.000Z","size":982,"stargazers_count":177,"open_issues_count":11,"forks_count":18,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-14T04:35:11.261Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://booby.readthedocs.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaimegildesagredo.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-12-14T11:15:33.000Z","updated_at":"2024-06-25T13:52:07.000Z","dependencies_parsed_at":"2022-09-26T21:40:15.151Z","dependency_job_id":null,"html_url":"https://github.com/jaimegildesagredo/booby","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimegildesagredo%2Fbooby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimegildesagredo%2Fbooby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimegildesagredo%2Fbooby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaimegildesagredo%2Fbooby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaimegildesagredo","download_url":"https://codeload.github.com/jaimegildesagredo/booby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224986863,"owners_count":17403032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T17:00:32.614Z","updated_at":"2024-11-17T05:31:47.749Z","avatar_url":"https://github.com/jaimegildesagredo.png","language":"Python","funding_links":[],"categories":["Python","Model, Schema"],"sub_categories":[],"readme":"Booby: data modeling and validation\n===================================\n\n.. image:: https://img.shields.io/pypi/v/booby.svg\n    :target: https://pypi.python.org/pypi/booby\n    :alt: Latest version\n\n.. image:: https://readthedocs.org/projects/booby/badge\n    :target: http://booby.readthedocs.org/en/latest\n    :alt: Docs\n\n.. image:: https://img.shields.io/badge/Licence-Apache2-brightgreen.svg\n    :target: https://www.tldrlegal.com/l/apache2\n    :alt: License\n\n.. image:: https://img.shields.io/pypi/dm/booby.svg\n    :target: https://pypi.python.org/pypi/booby\n    :alt: Number of PyPI downloads\n\n.. image:: https://secure.travis-ci.org/jaimegildesagredo/booby.svg?branch=master\n    :target: http://travis-ci.org/jaimegildesagredo/booby\n    :alt: Build status\n\nBooby is a standalone data `modeling` and `validation` library written in Python. Booby is under active development (visit `this blog post \u003chttp://jaimegildesagredo.github.io/2014/01/04/booby-05-introducing-inspection-api.html\u003e`_ for more info and the roadmap) and licensed under the `Apache2 license \u003chttp://www.apache.org/licenses/LICENSE-2.0.html\u003e`_, so feel free to `contribute \u003chttps://github.com/jaimegildesagredo/booby/pulls\u003e`_ and `report errors and suggestions \u003chttps://github.com/jaimegildesagredo/booby/issues\u003e`_.\n\nUsage\n-----\n\nSee the sample code below to get an idea of the main features.\n\n.. code-block:: python\n\n    from booby import Model, fields\n\n\n    class Token(Model):\n        key = fields.String()\n        secret = fields.String()\n\n\n    class Address(Model):\n        line_1 = fields.String()\n        line_2 = fields.String()\n\n\n    class User(Model):\n        login = fields.String(required=True)\n        name = fields.String()\n        email = fields.Email()\n        token = fields.Embedded(Token, required=True)\n        addresses = fields.Collection(Address)\n\n    jack = User(\n        login='jack',\n        name='Jack',\n        email='jack@example.com',\n        token={\n            'key': 'vs7dfxxx',\n            'secret': 'ds5ds4xxx'\n        },\n        addresses=[\n            {'line_1': 'Main Street'},\n            {'line_1': 'Main St'}\n        ]\n    )\n\n    if jack.is_valid:\n        print jack.to_json(indent=2)\n    else:\n        print json.dumps(dict(jack.validation_errors))\n\n.. code-block:: json\n\n    {\n      \"email\": \"jack@example.com\",\n      \"login\": \"jack\",\n      \"token\": {\n        \"secret\": \"ds5ds4xxx\",\n        \"key\": \"vs7dfxxx\"\n      },\n      \"name\": \"Jack\",\n      \"addresses\": [\n        {\n          \"line_1\": \"Main St\",\n          \"line_2\": null\n        },\n        {\n          \"line_1\": \"Main Street\",\n          \"line_2\": null\n        }\n      ]\n    }\n\nInstallation\n------------\n\nYou can install the last stable release of Booby from PyPI using pip or easy_install.\n\n.. code-block:: bash\n\n    $ pip install booby\n\nAlso you can install the latest sources from Github.\n\n.. code-block:: bash\n\n    $ pip install -e git+git://github.com/jaimegildesagredo/booby.git#egg=booby\n\nTests\n-----\n\nTo run the Booby test suite you should install the development requirements and then run nosetests.\n\n.. code-block:: bash\n\n    $ pip install -r test-requirements.txt\n    $ nosetests tests/unit\n    $ nosetests tests/integration\n\nChanges\n-------\n\nSee `Changes \u003chttps://booby.readthedocs.org/en/latest/changes.html\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaimegildesagredo%2Fbooby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaimegildesagredo%2Fbooby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaimegildesagredo%2Fbooby/lists"}