Commits

EGh5  committed 4b927d0

setup.py created

  • Participants
  • Parent commits de1d3ef

Comments (0)

Files changed (4)

+Django Doorkeeper
+=================
+
+Features
+--------
+This application bannes bad bots making requests for exactly non-existent urls.
+Middleware-level is using.
+
+Installation
+------------
+
+Use standard python way::
+
+  python setup.py install
+ 
+Package doorkeeper will be created in your site Python or virtenv.
+
+Another way - copy folder doorkeeper as application in your site folder.
+
+You should add patterns of this urls as LAST tuple elements in your urls.py::
+
+  from doorkeeper.views import inspect
+  ...    
+  urlpatterns = patterns('',
+    ....
+    ....
+    url(r'php',inspect),
+    url(r'translators\.html',inspect),
+    url(r'dba',inspect),
+    )
+
+You can add this constants in your settings.py::
+
+  DOORKEEPER_PATIENCE=3  # number of bad attempts
+  DOORKEEPER_TERM=1200   # penalty time (sec.)
+
+Add to INSTALLED_APPS,::
+
+  'doorkeeper', 
+
+and to MIDDLEWARE_CLASSES (as high as possible)::
+
+  'doorkeeper.middleware.DoorkeeperMiddleware',
+ 
+
+Monitoring
+------------
+
+You can watch your catch in django-admin.
+ 
+NOTE: this application is not intendent for high-loaded django-site. 
+Please consider os-level utilities. fail2ban should be mentioned among them.
+
+
+Good luck in hunting!
+
+Eugene
+
+.. _Bitbucket repository: https://bitbucket.org/EGh5/django-doorkeeper

File doorkeeper/README.rst

-Django Doorkeeper
-=================
-
-Features
---------
-This application bannes bad bots making requests for exactly non-existent urls.
-Middleware-level is using.
-
-Installation
-------------
-
-You should add patterns of this urls as LAST tuple elements in your urls.py::
-
-  from doorkeeper.views import inspect
-  ...    
-  urlpatterns = patterns('',
-    ....
-    ....
-    url(r'php',inspect),
-    url(r'translators\.html',inspect),
-    url(r'dba',inspect),
-    )
-
-You can add this constants in your settings.py::
-
-  DOORKEEPER_PATIENCE=3  # number of bad attempts
-  DOORKEEPER_TERM=1200   # penalty time (sec.)
-
-Add to INSTALLED_APPS,::
-
-  'doorkeeper', 
-
-and to MIDDLEWARE_CLASSES (as high as possible)::
-
-  'doorkeeper.middleware.DoorkeeperMiddleware',
- 
-
-Monitoring
-------------
-
-You can watch your catch in django-admin.
- 
-NOTE: this application is not intendent for high-loaded django-site. 
-Please consider os-level utilities. fail2ban should be mentioned among them.
-
-
-Good luck in hunting!
-
-Eugene
-
-.. _Bitbucket repository: https://bitbucket.org/EGh5/django-doorkeeper

File doorkeeper/__init__.py

+"""
+Django-doorkeeper help to deals with malicious url request
+"""
+version = (1, 0,1)
+__version__ = '.'.join(map(str, version))
+from os.path import join, dirname
+from setuptools import setup
+
+
+version = __import__('doorkeeper').__version__
+
+LONG_DESCRIPTION = """
+Anti bad bot - bans for malicious url requests
+"""
+
+
+def long_description():
+    """Return long description from README.rst if it's present
+    because it doesn't get installed."""
+    try:
+        return open(join(dirname(__file__), 'README.rst')).read()
+    except IOError:
+        return LONG_DESCRIPTION
+
+setup(
+    name='django-doorkeeper',
+    version='1.0',
+    description='Anti bad bot - bans for malicious url requests',
+    author='Eugene Gavrish',
+    author_email='eug033@gmail.com',
+    url='https://bitbucket.org/EGh5/django-doorkeeper',
+    license='MIT',
+    py_modules=('django-doorkeeper',),
+    zip_safe=True,
+    packages=['doorkeeper',],
+    classifiers=[
+        'Environment :: Web Environment',
+        'Framework :: Django',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: MIT License',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+    ],
+)