Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install zopyx-gridfs

How to install zopyx_gridfs

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install zopyx-gridfs
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.3.0 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
Windows (64-bit)
0.3.0 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
Mac OS X (10.5+)
0.3.0 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
Linux (32-bit)
0.3.0 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
Linux (64-bit)
0.3.0 Available View build log
0.2.2 Available View build log
0.2.1 Available View build log
 
Author
Dependencies
Imports
Lastest release
version 0.3.0 on Jan 5th, 2011

zopyx_gridfs

This is a tiny GridFS (MongoDB) to web gateway based on the Pyramid web framework.

Installation

  • requires Python 2.6

  • create a virtualized environment using virtualenv

  • inside the virtualenv environment:

    bin/easy_install zopyx_gridfs
    
  • Create a server.ini configuration file containing:

    [app:zopyx_gridfs]
    use = egg:zopyx_gridfs
    reload_templates = true
    debug_authorization = false
    debug_notfound = false
    debug_routematch = false
    debug_templates = true
    default_locale_name = en
    # MongoDB specific configurations
    mongo_host = localhost
    mongo_port = 27017
    database = test
    
    [pipeline:main]
    pipeline =
        egg:WebError#evalerror
        zopyx_gridfs
    
    [server:main]
    use = egg:Paste#http
    host = 0.0.0.0
    port = 6543
    
    # Begin logging configuration
    
    [loggers]
    keys = root
    
    [handlers]
    keys = console
    
    [formatters]
    keys = generic
    
    [logger_root]
    level = INFO
    handlers = console
    
    [handler_console]
    class = StreamHandler
    args = (sys.stderr,)
    level = NOTSET
    formatter = generic
    
    [formatter_generic]
    format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
    
  • Start the GridFS server using (this will start a HTTP server on localhost:6543):

    bin/paster serve server.ini
    

Usage:

Downloading files

You can access files stored inside GridFS through HTTP:

http://localhost:6543/<collection>/<filename>

where collection refers to collection used by GridFS and filename is the _id used to store the file inside GridFS.

The server will return a 404 response if the requested file could not be found.

Uploading files

For uploading files into a collection you need to use the build-in upload form:

http://localhost:6543/<collection>/upload_form

Author

ZOPYX Limited
c/o Andreas Jung
Charlottenstr. 37/1
D-72070 Tuebingen, Germany
www.zopyx.com
0.3.0
  • added upload support
0.2.2
  • using proper routing mechanism of Pyramid
0.2.0
  • switching to traversal instead of using URL parameters
0.1.2
  • better header handling
0.1.0
  • Initial version

Subscribe to package updates

Last updated Jan 5th, 2011

Download Stats

Last month:6

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.