Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Build Status

Cosmos Framework

Cosmos blog:

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.

Why use cosmos

It is supposed to save most of the time people spend on forms, lists, charts, models, security related code.

Test coverage

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).

Prepare Mongodb

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

replSet = rs0

Then from mongo console do 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 = or as appropriate in the /etc/mongodb.conf file.

Now do rs.config() to see the status


	"_id" : "rs0",
	"version" : 1,
	"members" : [
			"_id" : 0,
			"host" : "mongodb2:27017"

Index db collection for text search

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"})

Install cosmos

pip install cosmos

How to create project

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 run bower install and create an andmin account:

python new-admin

Now start the server:



  1. INSERT, READ, EDIT, DELETE objects by name
  2. Filter on READ
  3. Select columns on READ
  4. Role based security (RBAC) on objects and columns for all operations
  5. Sign in using Facebook, Google, Github, OpenId and username password
  6. Upload and get files with RBAC security
  7. Design forms
  8. Design page using widgets
  9. Design object list
  10. 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.

Running tests

To run backend tests use

python 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.

Code Climate

The environment is not setup properly yet. When done will move this to top. Code Climate Test Coverage


Python application framework for creating application with minimum amount of code.







No packages published