Skip to content

dataladdu/mongoladdu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongoladdu

How to install

  • use pip

    $ pip install mongoladdu
  • from source code

    $ python setup.py install

How to use it

  1. create folder named migrations
  2. create config.yml file with in migrations folder and place your environment specific configurations
dev:
  host: localhost
  port: 27017
  db_name: dev_db
  1. create migration scripts with in migrations folder. file names should follow patter <index>_<description>.py
def run(db):
    db.Test.insert({'name': 'value'})
  1. run migrate mongoladdu <env> run
mongoladdu dev run
  1. Alternate options for providing configuration

can be directly invoked from python code using, MongoLaddu().run_for_config('localhost', 27017, 'dev_db')