Cosmos blog: http://www.cosmosframework.com/
Python web framework for creating related data objects in mongodb without writing any code.
Please note that cosmos framework is in its pre-alpha
stage. Please give it some time to be matured.
It is supposed to save most of the time people spend on forms, lists, charts, models, security related code.
Currently there are 50+ test cases for backend / services and 30+ test cases for frontend. It covers about 80% of server side code and 40% of front end code. Tests covers all basic functionality. Target is to get to 90% or more coverage before 0.2.0 (release).
Current version of the framework has only mongodb (version 2.6 or newer) support. You should have mongodb installed configured for search and replication:
In /etc/mongodb.conf add the following line to enable replication
setParameter=textSearchEnabled=true
replSet = rs0
Then from mongo console do rs.initiate()
>rs.initiate()
{
"info2" : "no configuration explicitly specified -- making one",
"me" : "mongodb2:27017",
"info" : "Config now saved locally. Should come online in about a minute.",
"ok" : 1
}
If you see error like following
"errmsg" : "couldn't initiate : can't find self in the replset config"
you may need to change the bind_ip = 0.0.0.0
or as appropriate in the /etc/mongodb.conf
file.
Now do rs.config() to see the status
>rs.config()
{
"_id" : "rs0",
"version" : 1,
"members" : [
{
"_id" : 0,
"host" : "mongodb2:27017"
}
]
}
Before you can use builtin search API you have to enable search in mongodb for each collection.
Here is an example:
db.cosmos.pages.ensureIndex({"title": "text"})
pip install cosmos
cosmosadmin new-project adminpanel
This will create a simple demo project where you can create users/ create and assign roles to users and call GET/POST/PUT/DELETE APIs to read/insert/update/delete documents in json format.
You should now change settings in settings.py run bower install
and create an andmin account:
python cosmosmain.py new-admin
Now start the server:
python cosmosmain.py
- INSERT, READ, EDIT, DELETE objects by name
- Filter on READ
- Select columns on READ
- Role based security (RBAC) on objects and columns for all operations
- Sign in using Facebook, Google, Github, OpenId and username password
- Upload and get files with RBAC security
- Design forms
- Design page using widgets
- Design object list
- Test coverage
You are most welcome to contribute on this project. Please have your change with your test code ready and request a pull request for dev
branch.
To run backend tests use
python setup.py test
To run frontend tests use
karma start --single-run --browsers PhantomJS samples/adminpanel/test/karma.conf.js
To keep the process running remove the --single-run
option. You may also use Chrome or Firefox browser to run tests.
Released under the MIT License. Please look at the included LICENSE file for details.
JetBrains has generously provided us with unlimited license of the PyCharm IDE for this project. http://www.jetbrains.com/pycharm/
The environment is not setup properly yet. When done will move this to top.