A dynamic extensible CMD based command shell
Project description
Eve Genie ———– [](http://evegenie.readthedocs.org/en/latest/) [](https://travis-ci.org/drud/evegenie) [](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
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloudmesh.evegenie-1.2.4.macosx-10.12-x86_64.tar.gz.
File metadata
- Download URL: cloudmesh.evegenie-1.2.4.macosx-10.12-x86_64.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
462377e92fddb2beda2df391f75cd1185b7483af7a0725330faf3b84a48843e9
|
|
| MD5 |
1a6d315a1aaa12ad104adfc29c9eec06
|
|
| BLAKE2b-256 |
9d5a453246fa5b0fc0aaf3d1e30afe12273da27f39467242eec2d5866413decf
|
File details
Details for the file cloudmesh.evegenie-1.2.4-py2.py3-none-any.whl.
File metadata
- Download URL: cloudmesh.evegenie-1.2.4-py2.py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cae0a9c26360b4e76c3d97c8d75a8bd3f94c33f214e9a20f158049f719e3bd5
|
|
| MD5 |
5b8034256e6a09cbd7feb37189940678
|
|
| BLAKE2b-256 |
e56f4f38d79b7f6e20b9008674a0753af02f193eee7ffb980ca753a48c68cf49
|