[Lunar-commits] <moonbase> django-piston: new module for creating Django web APIs (0.2.2).

Jannis Pohlmann jannis at xfce.org
Fri Aug 14 03:19:44 CEST 2009


commit c62be81bfa7221c7edd59b4c23368575862e2dce
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Fri Aug 14 03:19:44 2009 +0200

    django-piston: new module for creating Django web APIs (0.2.2).
---
 python/django-piston/BUILD        |    7 +++++++
 python/django-piston/DEPENDS      |    1 +
 python/django-piston/DETAILS      |   30 ++++++++++++++++++++++++++++++
 python/django-piston/POST_INSTALL |   16 ++++++++++++++++
 4 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/python/django-piston/BUILD b/python/django-piston/BUILD
new file mode 100644
index 0000000..88773ee
--- /dev/null
+++ b/python/django-piston/BUILD
@@ -0,0 +1,7 @@
+(
+
+  python setup.py config &&
+  prepare_install && 
+  python setup.py install
+
+) > $C_FIFO 2>&1
diff --git a/python/django-piston/DEPENDS b/python/django-piston/DEPENDS
new file mode 100644
index 0000000..3811a73
--- /dev/null
+++ b/python/django-piston/DEPENDS
@@ -0,0 +1 @@
+depends django
diff --git a/python/django-piston/DETAILS b/python/django-piston/DETAILS
new file mode 100644
index 0000000..bf06327
--- /dev/null
+++ b/python/django-piston/DETAILS
@@ -0,0 +1,30 @@
+          MODULE=django-piston
+         VERSION=0.2.2
+          SOURCE=$MODULE-$VERSION.tar.gz
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE
+      SOURCE_URL=http://bitbucket.org/jespern/django-piston/downloads/
+      SOURCE_VFY=sha1:fe8205377add48f0a786ef0afa5c02d4d3b72814
+        WEB_SITE=http://bitbucket.org/jespern/django-piston/
+         ENTERED=20090814
+         UPDATED=20090814
+           SHORT="Framework for creating APIs for Django sites"
+      MAINTAINER=jannis at lunar-linux.org
+
+cat << EOF
+Piston is a relatively small Django application that lets you
+create application programming interfaces (API) for your sites.
+
+It has several unique features:
+
+    * Ties into Django's internal mechanisms.
+    * Supports OAuth out of the box (as well as Basic/Digest or custom
+      auth.)
+    * Doesn't require tying to models, allowing arbitrary resources.
+    * Speaks JSON, YAML, Python Pickle & XML (and HATEOAS.)
+    * Ships with a convenient reusable library in Python
+    * Respects and encourages proper use of HTTP (status codes, ...)
+    * Has built in (optional) form validation (via Django), throttling,
+      etc.
+    * Supports streaming, with a small memory footprint.
+    * Stays out of your way.
+EOF
diff --git a/python/django-piston/POST_INSTALL b/python/django-piston/POST_INSTALL
new file mode 100644
index 0000000..2ce733b
--- /dev/null
+++ b/python/django-piston/POST_INSTALL
@@ -0,0 +1,16 @@
+# determine the current major Python version
+python_major=`installed_version Python | cut -d. -f1-2`
+
+# determine the Python site-packages path
+python_dir="/usr/lib/python${python_major}/site-packages"
+
+# determine the easy_install .egg file cache
+pth_file="$python_dir/easy-install.pth"
+
+# clear the cache
+rm $pth_file
+
+# put all the .egg files/dirs into the cache
+for egg in $python_dir/*.egg; do
+  echo `basename $egg` >> $pth_file
+done


More information about the Lunar-commits mailing list