semvec/pypi-packages huggingface dataset:
fast-utils 0.0.6
fast-utils is a collection of small Python function that can make you scripts more fast.
License: BSD

Welcome to fast-utils's documentation!
======================================

fast-utils is a collection of small Python function that can make you scripts more fast.
This collection is organized package of receipts and experiments founded in the Internet.


.. image:: https://api.travis-ci.org/Lispython/fast_utils.png
	   :target: https://travis-ci.org/Lispython/fast-utils


Notice
------

"Premature optimization is the root of all evil" -- `Donald Knuth <http://en.wikipedia.org/wiki/Donald_Knuth>`_.


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

To use fast-utils  use `pip` or `easy_install`::

  pip install fast-utils

or ::

  easy_install fast-utils


CONTRIBUTE
----------

If you know how make some things more fast.


#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
   There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
#. Fork `the repository`_ on Github to start making your changes to the **develop** branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published.

.. _`the repository`: https://github.com/Lispython/fast-utils/
django-dynamic-finder 0.2
A Django version of the Rails Dynamic Finder, using Django Managers.
License: BSD

Django Dynamic Finder
=====================
A Django version of the Rails Dynamic Finder, using Django Managers.


# Install
```sh
$ pip install django-dynamic-finder
```

# Setup
```python
# settings.py

INSTALLED_APPS = (
    ...
    'django_dynamic_finder',
    ...
)
```

```python
# project/app/models.py

from django.db import models

from django_dynamic_finder import DynamicFinderManager

class Model(models.Model):
    name = models.CharField(max_length=50)
    
    objects = DynamicFinderManager()
```

# Usage
```python
>>> Model.objects.get_by_name('Jonh')
# >>> Model.objects.get(name='Jonh')
<Model: #1 - Jonh>

>>> Model.objects.filter_by_name('Jonh')
# >>> Model.objects.filter(name='Jonh')
["<Model: #1 - Jonh>"]

>>> Model.objects.exclude_by_name('Jonh')
# >>> Model.objects.exclude(name='Jonh')
["<Model: #2 - Alice>", "<Model: #3 - Bob>"]

>>> Model.objects.filter_by_name_or_name('Jonh', 'Alice')
# >>> Model.objects.filter(Q(name='Jonh') | Q(name='Alice'))
["<Model: #1 - Jonh>", "<Model: #2 - Alice>"]

>>> Model.objects.exclude_by_name_or_id('Jonh', 3)
# >>> Model.objects.exclude(Q(name='Jonh') | Q(id=3))
["<Model: #2 - Alice>"]

>>> Model.objects.filter_by_name_or_id_or_name('Jonh', 3, 'Alice')
# >>> Model.objects.filter(Q(name='Jonh') | Q(id=3) | Q(name='Alice'))
["<Model: #1 - Jonh>", "<Model: #2 - Alice>", "<Model: #3 - Bob>"]
```