Package: mocherry
MoCherryMoCherry is built around CherryPy & mongoengine to support REST webserivces with very low memory footprint, support for MongoDB ORM, built-in production ready WSGI server and faster initilization.FeaturesIn-built REST webservice supportMongoDB ORM support with MongoEngine pluginSimilar usability & file system structure like Django to reduce the learning curveLow memory footprintIn-built CherryPy WSGI serverBuilt-in basic encryption supportMIT licensedInstallationMoCherry is already a part of python PyPi repository. So the following command will download and install MoCherry from PyPi repository and all it's required dependencies to your system or virtualenv.$pipinstallmocherryCreate Your First ProjectNow MoCherry consists of a cli script which will enable developers to create a sample project / app from command-line without manually download it from github. Steps as follows:Create project skeleton$mocherry-clistartproject"my_project_001"Downloadingsampleproject:https://github.com/techunits/mocherry/blob/master/mocherry/resources/samples/project.zip?raw=trueCreatingnewproject:my_project_001
$cdmy_project_001
$pythonmanage.pyrunserver# start WSGI server[20/Jan/2020:00:52:20]ENGINEListeningforSIGTERM.[20/Jan/2020:00:52:20]ENGINEBusSTARTING[20/Jan/2020:00:52:20]ENGINESethandlerforconsoleevents.[20/Jan/2020:00:52:20]ENGINEStartedmonitorthread'Autoreloader'.[20/Jan/2020:00:52:21]ENGINEServingonhttp://localhost:9090[20/Jan/2020:00:52:21]ENGINEBusSTARTEDCreate application skeletonLets assume you have already created a project by following above steps, then you have to go inside that project and create app skeleton as per your requirements.# Application name: app_001$mocherry-clistartapp"app_001"Downloadingsampleapp:https://github.com/techunits/mocherry/blob/master/mocherry/resources/samples/app.zip?raw=trueCreatingnewapp:app_001# Application name: app_002$mocherry-clistartapp"app_002"Downloadingsampleapp:https://github.com/techunits/mocherry/blob/master/mocherry/resources/samples/app.zip?raw=trueCreatingnewapp:app_002

$pythonmanage.pyrunserver# start WSGI server[20/Jan/2020:00:52:20]ENGINEListeningforSIGTERM.[20/Jan/2020:00:52:20]ENGINEBusSTARTING[20/Jan/2020:00:52:20]ENGINESethandlerforconsoleevents.[20/Jan/2020:00:52:20]ENGINEStartedmonitorthread'Autoreloader'.[20/Jan/2020:00:52:21]ENGINEServingonhttp://localhost:9090[20/Jan/2020:00:52:21]ENGINEBusSTARTEDMoCherry Management CommandsMoCherry framework also support custom management commands to enhance its CLI capabilities. With the framework sample code we have provided a test command to verify how it works$pythonmanage.pytestcmd
Success:ThisisatestcommandMoCherry Sample DatasetMoCherry provides sample data from the version 1.0.9 onwards. This should help developers to play around with the framework immediately without writing any code. You can create sample data by using following management command.$pythonmanage.pyload_sample_data
Database:mongodb://localhost:27017/mocherry_sample_app

NewSampleData:5e9abd4ab22cfec440086e60
NewSampleData:5e9abd4ab22cfec440086e61
NewSampleData:5e9abd4ab22cfec440086e62
NewSampleData:5e9abd4ab22cfec440086e63
NewSampleData:5e9abd4ab22cfec440086e64
NewSampleData:5e9abd4ab22cfec440086e65
NewSampleData:5e9abd4ab22cfec440086e66
NewSampleData:5e9abd4ab22cfec440086e67
NewSampleData:5e9abd4ab22cfec440086e68
NewSampleData:5e9abd4ab22cfec440086e69
NewSampleData:5e9abd4ab22cfec440086e6a
NewSampleData:5e9abd4ab22cfec440086e6b
NewSampleData:5e9abd4ab22cfec440086e6c
NewSampleData:5e9abd4ab22cfec440086e6d
NewSampleData:5e9abd4ab22cfec440086e6eSample Applicationshttps://github.com/techunits/mocherry-sample-apphttps://github.com/techunits/mocherry-sample-rest-app