semvec/pypi-packages huggingface dataset:
readyrector 1.0
Easy to implement redirect middleware, which loads redirects from a configurable backend.
License: MIT
Keywords: redirect,middleware,django

***********
ReadyRector
***********

.. image:: https://badge.fury.io/py/readyrector.png
    :target: https://badge.fury.io/py/readyrector

Easy to implement redirect middleware, which loads redirects from a configurable backend.

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

.. code-block:: sh

    pip install readyrector


Usage
=====

.. code-block:: python

        # settings.py
        INSTALLED_APPS = (
            # ...
            'readyrector',
            # ...
        )

        # put at the end of the middleware list as a last resort
        MIDDLEWARE = (
            # ...
            'readyrector.middleware.RedirectDatabaseMiddleware',
        )


RedirectDatabaseMiddleware
--------------------------

Gets redirects from database records. Implement a view or API to manage these records.

RedirectURLConfMiddleware
-------------------------

Gets redirects from a URL conf file. Requires setting ``READYRECTOR_URLCONF``


Settings
========

``READYRECTOR_URLCONF``
-----------------------

- Default: ``''``

Required when ``RedirectURLConfMiddleware`` is used. Expects a path to a URL conf file.
falcon-filtering 0.2.0
Falcon filtering helper
License: MIT
Keywords: falcon filtering filter filters api

falcon-filtering-hook
======================

.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
    :target: LICENSE
.. image:: https://travis-ci.org/Darkheir/falcon-filtering-hook.svg?branch=master
    :target: https://travis-ci.org/Darkheir/falcon-filtering-hook
.. image:: https://codecov.io/gh/Darkheir/falcon-filtering-hook/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/Darkheir/falcon-filtering-hook
.. image:: https://api.codacy.com/project/badge/Grade/151e8f92301d431eb6144cf7915ef897
    :target: https://www.codacy.com/app/Darkheir/falcon-filtering-hook?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Darkheir/falcon-filtering-hook&amp;utm_campaign=Badge_Grade
.. image:: https://pyup.io/repos/github/Darkheir/falcon-filtering-hook/shield.svg
    :target: https://pyup.io/repos/github/Darkheir/falcon-filtering-hook/
    :alt: Updates


A small falcon hook to parse filtering elements from the request.

Usage
-----

The easiest way to use this hook is the following:

.. code:: python

    class Resource:
        filtering_fields = ("foo", "bar")  # List of fields allowed for filtering

        @falcon.before(FilteringHook())
        def on_get(self, req, resp, user):
            # Here req['context']['filters'] is set

The Hook will look in the query parameters for parameters looking like :code:`filter[key]=value`.

It will create a filters dict into the request context accessible at :code:`req.context['filters']`.
Inside this dict the key will be the one extracted from between the brackets.
i.e. :code:`key` in the example above.

Configuration options
---------------------

Allowing fields to be filtered
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For security reasons, the fields allowed for filtering must be specified in the :code:`filtering_fields` attribute of the resource.

All the fields not defined in it will be discarded by the hook.


Hook configuration
~~~~~~~~~~~~~~~~~~

One parameter can be passed to the hook:

* filtering_key : The base name of the key used for the filters. Default: :code:`filter`.

Example:

.. code:: python

    @falcon.before(PaginationFromRequestHook(
        filtering_key='custom_filter',
    ))
    def on_get(self, req, resp, user):
        # Get request
falcon-sorting 0.2.0
Falcon sorting helper
License: MIT
Keywords: falcon sorting sort hook api

falcon-sorting-hook
======================

.. image:: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
    :target: LICENSE
.. image:: https://travis-ci.org/Darkheir/falcon-sorting-hook.svg?branch=master
    :target: https://travis-ci.org/Darkheir/falcon-sorting-hook
.. image:: https://codecov.io/gh/Darkheir/falcon-sorting-hook/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/Darkheir/falcon-sorting-hook
.. image:: https://api.codacy.com/project/badge/Grade/a8a34e89d34b4a928e988fe1624e2eae
    :target: https://www.codacy.com/app/Darkheir/falcon-sorting-hook?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Darkheir/falcon-sorting-hook&amp;utm_campaign=Badge_Grade
.. image:: https://pyup.io/repos/github/Darkheir/falcon-sorting-hook/shield.svg
    :target: https://pyup.io/repos/github/Darkheir/falcon-sorting-hook/
    :alt: Updates


A small falcon hook to parse sorting elements from the request.

Usage
-----

The easiest way to use this hook is the following:

.. code:: python

    class Resource:
        sorting_fields = ("foo", "bar")  # List of fields allowed for sorting

        @falcon.before(SortingHook())
        def on_get(self, req, resp, user):
            # Here req['context']['sort'] is set

The Hook will look in the query parameters for parameters looking like :code:`sort=value`.

The default sorting order is ascending.
To sort in a descending order a minus (:code:`-`) sign needs to be specified before the value.
i.e. :code:`sort=-value`

It is possible to specify multiple sorting values by separating them with a comma.
i.e. :code:`sort=-value1,value2`

It will create a list in the request context accessible at :code:`req.context['sort']`.
This list consists of tuples where the first element is the name of the field to sort on
and the second the order to follow (either :code:`ASC` or :code:`DESC`)

i.e. :code:`[('foo', 'ASC'), ('bar', 'DESC')]`.


Configuration options
---------------------

Allowing fields for sorting
~~~~~~~~~~~~~~~~~~~~~~~~~~~

For security reasons, the fields allowed for sorting must be specified in
the :code:`sorting_fields` attribute of the resource.

All the fields not defined in it will be discarded by the hook.


Default sorting order
~~~~~~~~~~~~~~~~~~~~~

It is possible to specify a default sorting order by setting the :code:`default_sorting` attribute in the resource.

This attribute must be a string or a tuple that respects the convention we have for the request parameter.

The attributes specified as the default order must also be part of :code:`sorting_fields`.

Examples:

.. code:: python

    default_sorting = '-foo'
    # or
    default_sorting = ('foo', '-bar')

Hook configuration
~~~~~~~~~~~~~~~~~~

One parameter can be passed to the hook:

* sort_query_key : The name of the key used in the query to sort data. Default: :code:`sort`.

Example:

.. code:: python

    @falcon.before(PaginationFromRequestHook(
        sort_query_key='order',
    ))
    def on_get(self, req, resp, user):
        # Get request
git-remote-run 1.2
Allows running custom commands on a git remote.
License: MIT
Requires Python: >=3.3

git-remote-run
==============

This package defines a `git-remote-run` command, which allows running
custom commands on a git remote.

This can be used, for example, to set up the actual remote repository,
as in:

.. code:: bash

 $ git remote add remote-repo user@server:path/to/repo
 $ git remote-run remote-repo -c '
     mkdir -p $REPO_DIR
     git init --bare $REPO_DIR
     echo echo it works! > $REPO_DIR/hooks/update
     chmod +x $REPO_DIR/hooks/update'
 Initialized empty Git repository in /home/user/path/to/repo/
 $ git push remote-repo master
 ...
 remote: it works!

See `git remote-run -h` for more options.


How does it work?
-----------------

`git-remote-run` doesn't attempt any parsing of the git remote URL
on its own, nor does it make assumptions about the transport used.
Instead, it relies on git's built-in ability to run commands on the
remote side.

Git uses this ability in its `git archive --remote=...` command, to
create an archive of a remote repository. We abuse this ability
a little bit by sending a custom script to run as the `--exec`
parameter.


Author
------

Radek Czajka


License
-------

This project is licensed under the MIT License – see the LICENSE file for details.