semvec/pypi-packages huggingface dataset:
pyreplace 1.0
Recursively find and replace in file names and contents.
License: BSD
Keywords: rename file tool command find replace

usage: pyreplace [-h] [-d DIRECTORY] [-r] [-v] [-g EXPRESSION]
                 [-f FIND REPLACE] [-fi] [-c FIND REPLACE] [-ci]

Recursively find and replace in file names and contents.

optional arguments:
  -h, --help            show this help message and exit
  -d DIRECTORY, --directory DIRECTORY
                        Set starting directory.
  -r, --dry-run         Dont make any changes, just list what would happen.
  -v, --verbose         Display changes made.
  -g EXPRESSION, --glob EXPRESSION
                        Find files with matching extension. Example: *.txt
  -f FIND REPLACE, --filename FIND REPLACE
                        Search filename for FIND and replace with REPLACE.
  -fi, --filename-insensitive
                        Ignore capital/lowercase when searching filename.
  -c FIND REPLACE, --contents FIND REPLACE
                        Search contents for FIND and replace with REPLACE.
  -ci, --contents-insensitive
                        Ignore capital/lowercase when searching contents.

Usage Examples:
Replace foo with bar in filenames matching *.txt:
pyreplace -g *.txt -f foo bar

Find and replace foo with bar in files matching *.txt (Contents):
pyreplace -g *.txt -c foo bar

As above with all files in current directory:
pyreplace -c foo bar

As above with all files in another directory:
pyreplace -d /home/foo -c foo bar
django_autotest 0.1.0
Django autotest is a command that automaticaly runs the test suite
License: BSD
Keywords: django,tests,autotest,

=================
django-autotest
=================

Django autotest is a custom command for your applications
that runs the test suite when you save a test file and displays
a desktop notification with the results.

===============
 Installation
===============


1. Install the package with ``pip install django_autotest`` or alternatively you can  
download the tarball and run ``python setup.py install``

2. Add ``autotest`` to your INSTALLED_APPS list in settings.py
   

::

	INSTALLED_APPS = ('autotest')



3. Add a PROJECT_ROOT variable to ``settings.py`` with the absolute path to your Django application. 

::

	from os.path import abspath, dirname 

	PROJECT_ROOT = abspath(dirname(__file__))
	
	# or if you have already defined that for another purposes ( templates for example )
	PROJECT_ROOT = MY_PROJECT_ROOT_DIRECTORY


=========
 Usage 
=========




==================
 Additional notes
==================



===============
 Requirements
===============


Django 1.2+

watchdog

For the notifications:

libnotify ( Linux )
Growl ( Windows and Mac )
django-section 0.0.3
Django app for determining site section by request.
License: BSD

Django Section
==============
**Django app for determining site section by request.**

.. contents:: Contents
    :depth: 5

Installation
------------

#. Add ``section.context_processors.section`` to your ``TEMPLATE_CONTEXT_PROCESSORS`` setting::

    TEMPLATE_CONTEXT_PROCESSORS = (
        ...other context processors...,
        "section.context_processors.section",
    )

#. Add ``SECTIONS`` setting to your settings file in the form::

    # Tuple of dictionaries used to match URL pattern names to site sections. 
    # example: ({'name': '<section name>', 'matching_pattern_names': ('<url_name1>', '<url_name2>')},)
    SECTIONS = (
        {'name': 'home', 'matching_pattern_names': ('home',)},
    )

Usage
-----

If you're using generic views or `RequestContext <http://docs.djangoproject.com/en/dev/ref/templates/api/#id1>`_ you'll now automagically have a ``section`` variable added to context and available in your templates containing the value of ``name`` as defined for the current view in your ``SECTIONS`` setting. 

**NOTE**: If the current path can not be resolved to a defined section, the first section as defined in the ``SECTION`` settings is returned. This allows you to setup a global fallback section, i.e. *home*.

Authors
=======

Praekelt Foundation
-------------------
* Shaun Sephton

Changelog
=========

0.0.2 (2011-08-24)
------------------
#. Docs, tests.
django-cronjobs 0.2.3
A simple Django app for running cron jobs.
License: BSD

===============
Django Cronjobs
===============

django-cronjobs is a simple Django app that runs registered cron jobs via a
management command.


Installing
==========

To install django-cronjobs, first install via pip or easy_install, then just
add ``cronjobs`` to your ``INSTALLED_APPS``.


Registering a cron job
======================

django-cronjobs includes a decorator to register a cronjob, and discovers
registered jobs in the module ``<appname>.cron``.

For example::

    # myapp/cron.py
    import cronjobs

    @cronjobs.register
    def periodic_task():
        pass

django-cronjobs will then recognize ``periodic_task`` as a valid job.


Running a cron job
==================

To run a registered cron job, use the ``cron`` management command::

    $ ./manage.py cron <job_name>

So to run ``periodic_task`` from above, you could use::

    $ ./manage.py cron periodic_task

Additional arguments can be passed after the name of the task.


Locks
=====

By default, cron jobs are locked so that only one copy of a given job can be
running at a time. If you need to override this behavior, you can pass the
``lock`` kwarg to ``register``::

    from cronjobs import register
    @register(lock=False)
    def my_cron_job():
        # Multiple instances of me can run simultaneously.

If you run multiple sets of cronjobs on the same file system and need the locks
to not collide, set ``CRONJOB_LOCK_PREFIX`` to something unique in your Django
settings.
jmbo-social 0.0.6
Jmbo social app collecting 3rd party social apps.
License: BSD

Jmbo Social
===========

Jmbo social app.

Authors
=======

Praekelt Foundation
-------------------
* Shaun Sephton
* Euan Jonker

Changelog
=========

0.0.5
-----
#. Made the URL for Twitter share shorter via TinyURL.com

0.0.4
-----
#. Corrected django-notification dependency link.

0.0.3
-----
#. Include templates.
beget 0.1.3
Django project generator
License: BSD

=====
Beget
=====

Beget is a very simple tool to create a default django project. It basically does little more than ``django-admin.py startproject projectname`` with the only differences being that it creates the project in a python distribution layout complete with setup.py for ease of installation and creates media and static directories.

The default settings.py is tailored to the author's preferences i.e. TIME_ZONE is set to 'Europe/London'.

Usage
-----

To use beget::

    > beget example_project

This will create the following directories::

    > tree example_project
    example_project
    ├── example_project
    │   ├── __init__.py
    │   ├── media
    │   ├── settings.py
    │   ├── static
    │   │   ├── css
    │   │   ├── images
    │   │   └── js
    │   ├── templates
    │   └── urls.py
    └── setup.py

beget has only one option (excluding ``--help`` of course)::

    > beget -h
    Usage: beget [options] projectname

    Options:
      -h, --help         show this help message and exit
      -k, --like-krak3n  Create config/common.py instead of settings.py

The ``-k`` or ``--like-krak3n`` option replaces settings.py with config/common.py as is the way of the krak3n::

    > beget --like-krak3n example_project && tree example_project
    example_project
    ├── example_project
    │   ├── config
    │   │   ├── common.py
    │   │   └── __init__.py
    │   ├── __init__.py
    │   ├── media
    │   ├── static
    │   │   ├── css
    │   │   ├── images
    │   │   └── js
    │   ├── templates
    │   └── urls.py
    └── setup.py
django-beefycachecontrol 0.2.1
Beefier Cache-Control HTTP headers created by @never_cache decorator in Django.
License: BSD

django-beefycachecontrol
========================

django-beefycachecontrol is a Django middleware that smacks misbehaving upstream caches into submission with beefier anti-cache HTTP headers.

Normally, when a view is decorated with @never_cache::

    @never_cache
    def my_view(request):
        ...

The resulting HTTP headers (among other things) include::

    Cache-Control	max-age=0

While this should be sufficient to prevent the response from being cached upstream, but there may be circumstances where this is not enough. Enter django-beefiercachecontrol!

With BeefyCacheControlMiddleware enabled, these HTTP headers become::

    Cache-Control	max-age=0, no-cache, no-store

Cache that and you'd be arrested by the internet cops!


Installation
************

1. ``easy_install django-beefycachecontrol`` or ``pip install django-beefycachecontrol``

2. Add ``beefycachecontrol`` to your ``INSTALLED_APPS``

3. In settings.py add ``'beefycachecontrol.middleware.BeefyCacheControlMiddleware'`` to ``MIDDLEWARE_CLASSES``


Usage
******
django-beefycachecontrol is a middleware. Once it is enabled, there is nothing more to do. It simply fixes up your no-cache related HTTP headers.
NoseKay 0.1.2
nose plugin for Kay framework testing
License: BSD
Keywords: nose kay-framework

#######
NoseKay
#######

nose plugin for `Kay framework <http://code.google.com/p/kay-framework/>`_ testing.

Installation
************

::

    $ easy_install NoseKay

or from the source::

    $ python setup.py install

Basic Usage
***********

Usage::

    $ cd /path/to/your/app
    $ nosetests --with-kay [app]

You can use --kay-app-dir to specify your application directory.::

    $ nosetests --with-kay --kay-app-dir /path/to/your/app [app]
should-dingus 0.3
Dingus call matcher for should-dsl
License: BSD
Keywords: dingus should dsl testing test mocking mock double stub fake record assert bdd python expectation

A custom Should-DSL matcher to use with Dingus
===============================================

This modules contains a custom matcher so you can use should_dsl_ with Dingus_ calls

A small warning: The | operator hack of should_dsl's doesn't really go well with the __or__() of a Dingus.
I think the | hack is nasty, and I'm not sure I like should_dsl_ for it. This is where Ruby seems really pretty to me.

.. _should_dsl: http://www.should-dsl.info/
.. _Dingus: http://pypi.python.org/pypi/dingus



You only need to import it ::

    >>> from should_dsl import should, should_not
    >>> from dingus import Dingus
    >>> import should_dingus


------------


**call**

Checks calls on a Dingus ::

    >>> stub = Dingus('stub')
    >>> def some_function():
    ...     stub()
    ...
    >>> some_function |should| call(stub)

*call* can also check that it should be called *once*::

    >>> def some_function():
    ...     stub()
    ...     stub()
    ...
    >>> stub.reset()
    >>> some_function |should| call(stub)
    >>> stub.reset()
    >>> some_function |should| call(stub).once
    Traceback (most recent call last):
    ...
    ShouldNotSatisfied: <Dingus stub> was called 2 times, expected 1

*call* can even check the parameters with *with_params*::

    >>> def some_function():
    ...     stub(True, kwak='tuut', braat='aap')
    ...
    >>> stub.reset()
    >>> some_function |should| call(stub).with_params(True, kwak='tuut', braat='aap')
    >>> stub.reset()
    >>> some_function |should| call(stub).with_params(True, kwak='tuut')
    Traceback (most recent call last):
    ...
    ShouldNotSatisfied: <Dingus stub> has not been called with params (True,) {'kwak': 'tuut'}

*call* *with_params* can be combined with *once*::

    >>> def some_function():
    ...     stub(True, kwak='tuut', braat='aap')
    ...
    >>> stub.reset()
    >>> some_function |should| call(stub).once.with_params(True, kwak='tuut', braat='aap')
    >>> stub.reset()
    >>> some_function |should| call(stub).with_params(True, kwak='tuut', braat='aap').once