Skip to main content

A dynamic extensible CMD based command shell

Project description

Eve Genie ———– [![Documentation](https://readthedocs.org/projects/evegenie/badge/?version=latest)](http://evegenie.readthedocs.org/en/latest/) [![Build Status](https://travis-ci.org/drud/evegenie.svg?branch=master)](https://travis-ci.org/drud/evegenie) [![Coverage Status](https://coveralls.io/repos/drud/evegenie/badge.svg?branch=master&service=github)](https://coveralls.io/github/drud/evegenie?branch=master) A tool for making [Eve](http://python-eve.org) schema generation easier. Use case: You need to stand up an api quickly. You know what your data looks like in JSON but don’t yet know the syntax for Eve/Cerberus. ## Docs Documentation is within the [/docs directory](/docs/index.md) or online at [evegenie.readthedocs.org](http://evegenie.readthedocs.org/en/latest/) ## Requirements sudo pip install -r requirements.txt ## Example Usage Create a json file, sample.json: `javascript { "sample-resource": { "sample-string": "asdf", "sample-integer": 42, "sample-float": 1.0, "sample-list": ["a", "b", "c"], "sample-dict": { "sample-embedded-list": ["a", "b", "c"], "sample-embedded-dict": {"sample-integer2": 20} } }, "sample-resource2": { "sample-object-id": "objectid:sample-resource", "sample-intrange": "1-100", "sample-floatrange": "0.0-1.0", "sample-unknown": { "allow_unknown": true } } } ` Then generate your eve schemas using: `bash python geneve.py sample.json ` This will create a sample.settings.py file with the following contents: `python sample-resource = { 'schema': { 'sample-list': { 'type': 'list', 'schema': { 'type': 'string' } }, 'sample-integer': { 'type': 'integer' }, 'sample-float': { 'type': 'float' }, 'sample-dict': { 'type': 'dict', 'schema': { 'sample-embedded-list': { 'type': 'list', 'schema': { 'type': 'string' } }, 'sample-embedded-dict': { 'type': 'dict', 'schema': { 'sample-integer2': { 'type': 'integer' } } } } }, 'sample-string': { 'type': 'string' } } } sample-resource2 = { 'schema': { 'sample-object-id': { 'type': 'objectid', 'data_relation': { 'field': '_id', 'resource': 'sample-resource', 'embeddable': True } }, 'sample-unknown': { 'allow_unknown': True }, 'sample-intrange': { 'max': 100, 'type': 'integer', 'min': 1 }, 'sample-floatrange': { 'max': 1.0, 'type': 'float', 'min': 0.0 } } } eve_settings = { 'MONGO_HOST': 'localhost', 'MONGO_DBNAME': 'testing', 'RESOURCE_METHODS': ['GET', 'POST', 'DELETE'], 'BANDWIDTH_SAVER': False, 'DOMAIN': { 'sample-resource': sample-resource, 'sample-resource2': sample-resource2, }, } `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

cloudmesh.evegenie-1.2.4-py2.py3-none-any.whl (8.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cloudmesh.evegenie-1.2.4.macosx-10.12-x86_64.tar.gz.

File metadata

File hashes

Hashes for cloudmesh.evegenie-1.2.4.macosx-10.12-x86_64.tar.gz
Algorithm Hash digest
SHA256 462377e92fddb2beda2df391f75cd1185b7483af7a0725330faf3b84a48843e9
MD5 1a6d315a1aaa12ad104adfc29c9eec06
BLAKE2b-256 9d5a453246fa5b0fc0aaf3d1e30afe12273da27f39467242eec2d5866413decf

See more details on using hashes here.

File details

Details for the file cloudmesh.evegenie-1.2.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cloudmesh.evegenie-1.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5cae0a9c26360b4e76c3d97c8d75a8bd3f94c33f214e9a20f158049f719e3bd5
MD5 5b8034256e6a09cbd7feb37189940678
BLAKE2b-256 e56f4f38d79b7f6e20b9008674a0753af02f193eee7ffb980ca753a48c68cf49

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page