This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

a simple static fileserver and directory index server in python (WSGI app)

About

Often for testing you will want a static fileserver and directory index as part of your WSGI stack. In addition, you may have requirements to run such as part of a production WSGI stack. FileServer fits these needs.

Motivation

I needed a directory index server a la Apache to test a PyPI clone I was using. After surveying what was out there, there didn’t seem anything out there that was easily consumable for my purposes. So I wrote one only depending on webob .

Contents

from fileserver import * should give you access to all of the usable components of fileserver:

  • file_response: return a webob response object appropriate to a file name
  • FileApp: WSGI app that wraps file_response
  • Directory Server: serves a directory tree and generated indices
  • main: command line entry point

FileApp and file_response are heavily borrowed from http://docs.webob.org/en/latest/file-example.html . I also borrowed from Paste’s StaticURLParser and static.Cling.

In addition there is a command line script, serve, which may be used to serve a directory with the wsgiref server.

Tests

doctests and a test runner, test.py, exist in the tests/ subdirectory of http://k0s.org/hg/FileServer . I currently use paste.fixture.TestApp to mock requests and inspect responses, but should probably move to WebTest .

Other Projects

While I didn’t find them suitable for my use, there are other standalone static fileservers available for python:


Jeff Hammel

http://k0s.org/hg/FileServer

Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
FileServer-0.3.tar.gz (4.5 kB) Copy SHA256 Checksum SHA256 Source Mar 5, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting