{"id":15445015,"url":"https://github.com/luiscoms/eve-embedded","last_synced_at":"2025-03-28T08:15:01.748Z","repository":{"id":145983736,"uuid":"76895464","full_name":"luiscoms/eve-embedded","owner":"luiscoms","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-09T23:24:15.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-02-02T08:44:46.102Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luiscoms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-19T20:38:14.000Z","updated_at":"2016-12-20T13:07:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"2241c676-5535-4cc2-83ff-92695e791971","html_url":"https://github.com/luiscoms/eve-embedded","commit_stats":{"total_commits":16,"total_committers":2,"mean_commits":8.0,"dds":0.25,"last_synced_commit":"32150de29ea293be6a96c66d6e19570224face2a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luiscoms%2Feve-embedded","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luiscoms%2Feve-embedded/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luiscoms%2Feve-embedded/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luiscoms%2Feve-embedded/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luiscoms","download_url":"https://codeload.github.com/luiscoms/eve-embedded/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245991585,"owners_count":20706129,"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-10-01T19:43:46.447Z","updated_at":"2025-03-28T08:15:01.729Z","avatar_url":"https://github.com/luiscoms.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Eve-Embedded\n===========\n\n[![Build Status](https://travis-ci.org/luiscoms/eve-embedded.svg?branch=master)](https://travis-ci.org/luiscoms/eve-embedded)\n[![Requirements Status](https://requires.io/github/luiscoms/eve-embedded/requirements.svg?branch=master)](https://requires.io/github/luiscoms/eve-embedded/requirements/?branch=master)\n[![Coverage Status](https://coveralls.io/repos/github/luiscoms/eve-embedded/badge.svg?branch=master)](https://coveralls.io/github/luiscoms/eve-embedded?branch=master)\n\nThis project servers as an example of a Python package with some boilerplate\ncode already in place.\n\n\nUsage\n----\n\nIn the schema set the url\n\n```python\nschema = {\n    \"firstname\": {\n        \"type\": \"string\",\n        \"minlength\": 1,\n        \"maxlength\": 10,\n    },\n    \"country\": {\n        \"type\": \"string\",\n        \"schema\": {\n            \"type\": \"string\",\n            \"data_relation\": {\n                \"api\": \"http://api.example.com/country\",\n                \"embeddable\": True\n            }\n        }\n    }\n}\n```\n\nThen install the module\n\n```python\nfrom eve_embedded import embedded\n\napp = Eve()\nembedded.install(app)\n```\n\n\nSpecial field types\n----\n\nWhen you are using specia field types, you can pass it as argumen like:\n\n```python\n\nskill_schema = {\n    \"title\": {\n        \"type\": \"string\",\n    },\n    \"level\": {\n        \"type\": \"string\",\n        \"schema\": {\n            \"type\": \"string\",\n            \"data_relation\": {\n                \"api\": \"http://api.example.com/levels\",\n                \"embeddable\": True\n            }\n        }\n    }\n}\n\nskill_type_schema = {\n    \"type\": \"skill\",\n    \"schema\": skill_schema\n}\n\nschema = {\n    \"firstname\": {\n        \"type\": \"string\",\n        \"minlength\": 1,\n        \"maxlength\": 10,\n    },\n    \"country\": {\n        \"type\": \"string\",\n        \"schema\": {\n            \"type\": \"string\",\n            \"data_relation\": {\n                \"api\": \"http://api.example.com/country\",\n                \"embeddable\": True\n            }\n        }\n    },\n    \"skills\": {\n        \"type\":  \"list\",\n        \"schema\": {\n            \"type\":  \"skill\",\n        }\n    }\n}\n\napp = Eve()\nembedded.install(app, dict(area=skill_type_schema))\n```\n\nRunning tests with `tox`\n----\n\nYou will need an instance of `mongo` running locally\n\nInstall `tox`\n```\n$ pip install tox\n```\n\nRun tests\n\n```\ntox\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluiscoms%2Feve-embedded","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluiscoms%2Feve-embedded","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluiscoms%2Feve-embedded/lists"}