semvec/pypi-packages huggingface dataset:
django-el 0.2.2
Django elasticsearch integration.
License: MIT
Keywords: django elasticsearch

This is Django application that helps intergrate Django with elasticsearch.
It is built on top of ``elasticsearch-dsl``.

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

|python| |pypi| |license|

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


Project aims to support Python 3 and Django 1.8 (at least).

The library is in development, use it carefully, because until stable an API
is a subject to change.


Quickstart
----------

Configure your models to be indexable::

    from django.db import models
    from el.models import Indexed

    class Article(models.Model, Indexed):
        title = models.CharField(max_length=78)

    @classmethod
    def get_indexable(cls):
        return cls.objects.all()

    @classmethod
    def configure_mapping(cls, mapping):
        # mapping is an elasticsearch_dsl Mapping object
        mapping.field('title', 'string')
        return mapping


From this moment, the ``Article`` model will be autodiscovered and indexed.


Update search indexes::

    ./manage.py update_index


Use ``elasticsearch_dsl`` to query::

    # articles is a list of an Article instances
    articles = Article.search().query('match', title="Bob's article").execute()

    # articles is a list of elasticsearch_dsl hits
    articles = Article.search().query('match', title="Bob's article").execute(cast=False)


In contrast with ``elasticsearch_dsl``, ``django-el`` provides modified
``Search`` object which return django model instances instead of raw
elasticsearch results by default. You can control this feature using the
``cast`` argument.


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

Install ``django-el`` as usual python package using pip::

    pip install django-el


Configuration
-------------

Django-el is build on top of ``elasticsearch_dsl`` library and provides
django-way connections configuration through ``settings.py``::

    ELASTICSEARCH_CONNECTIONS = {
        'default': {
            'hosts': ['127.0.0.1:9200'],
            'serializer': 'project.serializers.MySerializer',
        }
    }

You can define project connections using ``ELASTICSEARCH_CONNECTIONS``
setting. It is just a hight-level interface over low-level
``elasticsearch_dsl.connections.connections.create_connection`` function.

The keys are (default, in this example) are connection aliases, and it's values
are ``create_connection`` arguments.


.. |pypi| image:: https://img.shields.io/pypi/v/django-el.svg?style=flat-square
    :target: https://pypi.python.org/pypi/django-el
    :alt: pypi

.. |license| image:: https://img.shields.io/github/license/asyncee/django-el.svg?style=flat-square
    :target: https://github.com/asyncee/django-el/blob/master/LICENSE.txt
    :alt: MIT License

.. |python| image:: https://img.shields.io/badge/python-3.x-blue.svg?style=flat-square
    :target: https://pypi.python.org/pypi/django-el
    :alt: 3.x
gitignore 0.0.8
gitignore command generates .gitingore files from the command line.
License: MIT
Keywords: gitignore,git,github,command line,cli

L - Commands
===========

Generate .gitignore files for you.

USAGE :
    type `gitignore ls` to find more details.
    example `gitignore jetbrain` this will generate gitignore file based on jetbrains IDE.
easythreads 1.0
async task pool
License: MIT
Keywords: easythreads,fengyun

#项目名:
easythreads
使用threading实现了一个线程池,使用方法很是简单,我们只需要把执行的函数塞入线程池里就可以了.

#Usage:

```
from easythreads import AsyncWorker

def task_a():
    print 'a..'    

def task_b(a,b,c):
    print 'b...'

pool = AsyncWorker(10)
pool.append(task_a)
pool.append(task_b,1,2,3)
pool.shutdown(block=False) 
```
expiredict 3.1
Support Expire and Max length Dict
License: MIT
Keywords: Expire ttl Dict Max Dict author fengyun

# expiredict

### 介绍

python的一个小模块，支持时间过期及限制key个数的dict,涵盖所有常用的dict方法。

[expiredict 更多介绍](http://xiaorui.cc  "xiaorui.cc")

New Future

1. support len

2. support clear

To Do List

1. logging

.....

### 安装
1. 源码安装

```
git@github.com:rfyiamcool/expiredict.git
python setup.py install
```
2. pip 安装

```
pip install expiredict
```

### 使用方法

```
import time 

from expiredict import ExpireDict
d = ExpireDict(10)
d['a'] = 'abc'
print d.clear()
print "clear data :%s"%d.keys()
d['a'] = 'abc'
print "dict length :%s"%len(d)
print "d.keys() : %s"%d.keys()
d.set_ttl('a',2)
print d.ttl('a')
print "return value : %s"%d['a']
time.sleep(3)
print d['a']
```