Skip to content

Commit

Permalink
Prepare for first PyPi release.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmegginson committed Mar 29, 2015
1 parent 1e1cbc7 commit b7bb667
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 8 deletions.
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
hxl-proxy
=========

Python-/flask-based web proxy for transforming a HXL dataset dynamically.
Python-/flask-based web proxy for transforming a HXL dataset
dynamically. Currently runs only in Python 2.7+, but Python 3 support
is close.

http://hxlstandard.org
# Installation

Installation from PyPi:

```
pip install hxl-proxy
```

Installation from source:

```
python setup.py install
```

Running unit tests:

```
python setup.py test
```

# Usage

Install libhxl-python and flask.
Launching a local server (usually on http://127.0.0.1:5000):

```
python run-server.py
```

Typically, the proxy will be running on port 5000 for local use. For
web deployment, see the hxl-standard.wsgi.TEMPLATE file and the flask
documentation.
For web deployment, see the hxl-standard.wsgi.TEMPLATE file and the
flask documentation.

For more on HXL, see http://hxlstandard.org

For more documentation about the underlying HXL engine and filters,
see https://github.com/HXLStandard/libhxl-python/wiki
27 changes: 27 additions & 0 deletions config.py.TEMPLATE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
########################################################################
# Configuration template for hxl-proxy
#
# Copy this to config.py (or similar), then change the values to suit.
# Before launching the application, set the environment variable
# HXL_PROXY_CONFIG to the full path to your config file, so that
# the hxl-proxy app can find it.
########################################################################

#
# If True, will show detailed debugging information on errors
# Should be False for a production system
#
DEBUG=True

#
# Name of a file for storing saved profile information
#
PROFILE_FILE='/tmp/hxl-proxy-profiles'

#
# Change this to a key known only to your server
# (Used to secure cookies)
#
SECRET_KEY='In charity, there can be no excess.'

# end
26 changes: 26 additions & 0 deletions hxl-proxy.wsgi.TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,30 @@ Assumes that hxl_proxy is installed as an app. If running locally, add
the directory containing the hxl_proxy module to sys.path.
"""

import sys
import os

# If you want to run in a virtualenv (recommended), then uncomment the
# following two lines, and set the value to the appropriate path

#activate_this = '/path/to/virtualenv/bin/activate_this.py'
#execfile(activate_this, dict(__file__=activate_this))

# If you are running from a source distribution, uncomment the
# following line and set to the root of the distro

#sys.path.insert(0, '/srv/www/hxl-proxy/')

# Set config file location
# (set to the location of your custom config.py)

os.environ['HXL_PROXY_CONFIG'] = '/path/config.py'


#
# Run ...
#

from hxl_proxy import app as application

# end
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
setup(
name = 'hxl-proxy',
packages = ['hxl_proxy'],
version = '0.0.1',
version = '0.1alpha',
description = 'Flask-based web proxy for HXL',
author='David Megginson',
author_email='contact@megginson.com',
url='https://github.com/HXLStandard/hxl-proxy',
install_requires=['flask', 'libhxl', 'ckanapi'],
install_requires=['flask', 'libhxl>=1.02beta', 'ckanapi'],
test_suite = "tests",
tests_require = ['mock']
)
File renamed without changes.
File renamed without changes.

0 comments on commit b7bb667

Please sign in to comment.