Skip to main content

A set of tool for synchronizing local modification to remoteWSGI server, makes life of designer easier

Project description

NowSync is a set of tool for synchronizing local modification to remote WSGI server, makes life of designer easier.

How it works

There is two part of NowSync, one is the server, it runs your WSGI application and its own WSGI application for file synchronizing. And the other part of NowSync is the client, it monitors changes in local folders, if those files are changed, it will upload those modifications to remote server.

Which means, the designer doesn’t have to run a local application, all they have to do is get a copy of the application in his local computer, and run the NowSync client.

Installation

To install NowSync, type:

easy_install nowsync

Or, if you perfer pip:

pip install nowsync

Configuration

To run NowSync, you need to write a configuration file, it will be read both by the client and server, it is in YAML format, here is an example:

---

# show we turn on the debug mode of NowSync server?
debug: True

# NowSync server
nowsync:
    interface: 0.0.0.0
    port: 5001
    # can be accessed by users only
    user_only: True
    # are we under a proxy?
    under_proxy: True

# guest WSGI app server to run
app:
    interface: 0.0.0.0
    port: 5000
    user_only: True
    under_proxy: True
    # the path of WSGI application to run
    # wsgi here is the module, and application is the variable name in
    # the module
    app_path: wsgi:application

client:
    # url to NowSync API
    url: http://develop.example.com:5001/api/

    # user name
    username: alvin
    password: password_goes_here

# path to directory to sync
sync_path: .

# files that we want to sync
sync_files: [
    'myproject/static/**',
    'myproject/templates/**',
]

# files that we don't want to sync
ignore_files: [
    '*.pyc',
    '.hg/*',
    '.git/*',
    '.*',
    'nowsync.yaml',
]

# users who can access to NowSync server or guest application
users:
    alvin: password_goes_here

...

Put the configuration file nowsync.yaml in the folder of your project. The structure may look like this:

myproject/
    + wsgi.py
    + nowsync.yaml
    + setup.py
    + myproject/
        + static/
        + templates/
        + models/
        + views/

How to use

To run nowsync server, here you type:

nowsync_server

And you should see:

running nowsync_server
INFO:nowsync.server:Start new process
INFO:werkzeug: * Running on http://0.0.0.0:5001
 * Running on http://0.0.0.0:5000/

With proper configuration in project folder, all designer has to do is get a copy of your project, and run:

cd myproject
nowsync_client

For now, it synchronizes files in myproject, your designer just modify the template, CSS and images, and all the modifications will reflect in the remote WSGI server.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nowsync-0.3b3.dev29.zip (49.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page