Saravanan666/pypi-org huggingface dataset:
Package: django-filesnow
FilesNow is a Django app to download documnets, images
from AWS S3 and serve is a temporary static content to customers.FilesNow is a way to serve AWS S3 documents/media files
without giving access to your s3 buckets.FilesNow itself cleans it’s downloaded presentable
files, as such maintainig a healthy file systemDependeciesAWS Boto3 Framework : pip install boto3
Configure AWS Credentilas using command : aws configureQuick startAdd “filesnow” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'filesnow',
]Include the polls URLconf in your project urls.py like this:path('filesnow/', include('filesnow.urls'))

    Your URL Pattern must end with concinated string of "+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)"

    It should look something like

    urlpatterns = [
path('admin/', admin.site.urls),
    path('filesnow/', include('filesnow.urls')) ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)Add the environment variables for media files within filesnow/settings.py:DOWNLOAD_LOC = < Describe Media Directory of your django Project or App >
    APP_MEDIA_URL = < Describe Media URL in case of App >

    Example :
    I have a django project with below descriptions
    django Project name => "docdocgo"
    django App name => "filesnow"
    django App Media directory => C:\\Users\\Jackuna\\PycharmProjects\\docdocgo\\media\\filesnow\\

    Incase we don't have a media directory, create a media directory under django parent project folder
    and then add a folder named by app name.
    docdocgo --> media --> filesnow

    Considering above below is the way we define it.

    DOWNLOAD_LOC = 'C:\\Users\\Jackuna\\PycharmProjects\\docdocgo\\media\\filesnow\\'
APP_MEDIA_URL = MEDIA_URL+'filesnow/'Start the development serverpython manage.py runserver 0.0.0.0:9090Visithttp://127.0.0.1:9090/filesnowand explore it.
Package: django-filestack
Add Model support for Filestack filesDocumentationThe full documentation is athttps://django-filestack.readthedocs.io.QuickstartInstall Django Filestack:pip install django-filestackAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'files.apps.FilesConfig',...)Add Django Filestack’s URL patterns:fromfilesimporturlsasfiles_urlsurlpatterns=[...url(r'^',include(files_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2019-03-24)First release on PyPI.
Package: django-filestorages
django-filestoragesDjango-getstorage is a tiny Python library for dealing with configurable
Django storages.It allows you to define a dictionary of file storage configurations
in yoursettingsand refer to them by name in your code.It should be obsolete onceDjango ticket 26029is resolved.InstallationUse the package managerpipto install django-filestorages.pipinstalldjango-filestoragesUsageWherever you need a storage, use thefilestorages.get_storagefunction.fromfilestoragesimportget_storagefile=models.FileField(storage=get_storage('some.configured.storage'))In your settings, you can define your storages using dotted paths:FILE_STORAGES={'default':{'BACKEND':"django.core.files.storage.FileSystemStorage",'OPTIONS':{'location':'/path/to/the/files/','base_url':'/files/',}},'some':{'BACKEND':'other.backend.Storage','OPTIONS':{'option':'value',},},'some.configured':{'OPTIONS':{'second_option':True,},},}In this exampleget_storage('some.configured.storage')returnsother.backend.Storage(option='value', second_option=True)If no matching backend is found,FILE_STORAGES['default']is used, falling back onDEFAULT_FILE_STORAGEif not set.LicenseMIT
Package: django-file-upload
django-file-uploadDjango File UploadInstallationpipinstalldjango-file-uploadUrls.pyfromdjango.urlsimportinclude,re_pathurlpatterns=[re_path(r'^f/',include('django_file_upload.urls',namespace='django_file_upload')),]orfromdjango.urlsimportre_pathfromdjango_file_uploadimportviewsasfile_viewsurlpatterns=[re_path(r'^upload$',file_views.file_upload,name='file_upload'),]Settings.pyINSTALLED_APPS=(...'django_file_upload',...)
Package: django-file-upload-to
django-file-upload-todjango-file-upload-togenerates short UUIDs to use as paths for uploaded media files in Django.FeaturesGenerate short (22 character), URL-safe base64-encoded UUIDs.Upload media files to short UUID filenames.InstallationCheckout the latest django-file-upload-to release and copy or symlink theuuid_upload_pathdirectory into yourPYTHONPATH.  If using pip, runpip install django-file-upload-to.Generating short UUIDsGenerate a short, URL-safe UUID as follows:::from uuid_upload_path import uuid

uuid()  // -> "hCdLEjlQQJW25-sXB3T_Gw"Generating upload pathsTo upload media files to short UUID filenames, just setupload_totouuid_upload_path.upload_to.::from uuid_upload_path import upload_to

class YourModel(models.Model):

    file = models.FileField(
        upload_to = upload_to,
    )Why use UUIDs as upload paths?Django tries to ensure that all your uploaded files are given unique names on the filesystem. It does this by checking if a file with the same name exists before saving a new one, and adding a suffix if the new file would otherwise conflict with the existing one.If you're saving files to disk using the built-indjango.core.files.storage.FileSystemStorage, this isn't much of a problem. However, if you're using a cloud file storage, such asstorages.backends.s3boto.S3BotoStorage, this uniqueness check can have a noticeable effect on the performance of file uploads. Worse, the default configuration ofS3BotoStorageis to overwrite existing files with the same name when uploading a new file!By generating a unique filename for each uploaded file, django-file-upload-to removes the need for a costly uniqueness check, and avoids accidentally overwriting existing files on remote cloud storages.Support and announcementsDownloads and bug tracking can be found at themain project website <https://github.com/panttojo/django-file-upload-to>_.More informationThe django-uuid-upload-path project was developed by Dave Hall and forked for make a little customizations.
You can get the code from thedjango-uuid-upload-path project site <https://github.com/etianen/django-uuid-upload-path>_.
Package: django-file-validator
django-file-validatorSimple project to validate FileFields/ImageFields, like max size of uploaded file.Until now, there is only one validator: MaxSizeValidator.NOT WORKING WITH NEW DJANGO 1.10.DependenciesDjango 1.8 or higher (not tested on previous versions) but lower than 1.10!!Installationpipinstalldjango-file-validatorUsageIn your models, import and use MaxSizeValidator:fromdjango_file_validator.validatorsimportMaxSizeValidatorclassYourModel(models.Model):...image=models.ImageField(null=True,blank=True,upload_to='uploads/yourmodel/img/',validators=[MaxSizeValidator()])...You can change the max size value passing a parameter on each attibute:fromdjango_file_validator.validatorsimportMaxSizeValidatorclassYourModel(models.Model):...default_image=models.ImageField(null=True,blank=True,upload_to='uploads/yourmodel/img/',validators=[MaxSizeValidator()])big_image=models.ImageField(null=True,blank=True,upload_to='uploads/yourmodel/img/',validators=[MaxSizeValidator(2048)])small_image=models.ImageField(null=True,blank=True,upload_to='uploads/yourmodel/img/',validators=[MaxSizeValidator(256)])...ConfigurationsFILE_SIZE_LIMIT_IN_KILOBYTESYou can change the default max size limit of uploaded files, just putting this variable on settings.py. Default value is 512 kB.FILE_SIZE_LIMIT_IN_KILOBYTES=512
Package: django-filmmap
FilmMap is an API to find movies that are playing in the San Francisco area. Feel free to fork the repository and
use it for your own data sets!Quick startAdd “filmmap” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'filmmap',
)Include the filmmap URLconfs in your project urls.py like this:urlpatterns = patterns('',
    url(r'^', include('filmmap.urls', namespace='filmmap')),
    url(r'^admin/', include(admin.site.urls)),
)Runpython manage.py syncdbto create the filmmap models.Runpython manage.py update_filmshttps://data.sfgov.org/resource/yitu-d5am.jsonto update the films database.Visithttp://127.0.0.1:8000/filmmap/to run the application!Feel free to fork therepositoryand create an API for your own data sets. Modify the api view inviews.py, the
the admin commentupdate_films.py, and the models inmodels.pyto reflect your particular data set.
Package: django-filter
Django-filter is a reusable Django application allowing users to declaratively
add dynamicQuerySetfiltering from URL parameters.Full documentation onread the docs.Versioning and stability policyDjango-Filter is a mature and stable package. It uses a two-part CalVer
versioning scheme, such as21.1. The first number is the year. The second
is the release number within that year.On an on-going basis, Django-Filter aims to support all current Django
versions, the matching current Python versions, and the latest version of
Django REST Framework.Please see:Status of supported Python versionsList of supported Django versionsSupport for Python and Django versions will be dropped when they reach
end-of-life. Support for Python versions will be dropped when they reach
end-of-life, even when still supported by a current version of Django.Other breaking changes are rare. Where required, every effort will be made to
apply a “Year plus two” deprecation period. For example, a change initially
introduced in23.xwould offer a fallback where feasible and finally be
removed in25.1. Where fallbacks are not feasible, breaking changes without
deprecation will be called out in the release notes.InstallationInstall using pip:pipinstalldjango-filterThen add'django_filters'to yourINSTALLED_APPS.INSTALLED_APPS=[...'django_filters',]UsageDjango-filter can be used for generating interfaces similar to the Django
admin’slist_filterinterface.  It has an API very similar to Django’sModelForms.  For example, if you had a Product model you could have a
filterset for it with the code:importdjango_filtersclassProductFilter(django_filters.FilterSet):classMeta:model=Productfields=['name','price','manufacturer']And then in your view you could do:defproduct_list(request):filter=ProductFilter(request.GET,queryset=Product.objects.all())returnrender(request,'my_app/template.html',{'filter':filter})Usage with Django REST FrameworkDjango-filter provides a customFilterSetand filter backend for use with
Django REST Framework.To use this adjust your import to usedjango_filters.rest_framework.FilterSet.fromdjango_filtersimportrest_frameworkasfiltersclassProductFilter(filters.FilterSet):classMeta:model=Productfields=('category','in_stock')For more details see theDRF integration docs.SupportIf you need help you can start adiscussion. For commercial support, pleasecontact Carlton Gibson via his website.
Package: django-filter-addons
django-filter-addonsA collection of addons fordjango-filterInstallationInstall the package from PyPi:pipinstalldjango-filter-addonsUsageImplement case-insensitivity on queryset ordering:fromdjango.contrib.auth.modelsimportUserfromdjango.db.models.functionsimportLowerfromdjango_filters.filtersimportCharFilterfromdjango_filters.filtersetimportFilterSetfromdjango_filters_addons.filtersimportOrderingFilterclassUserFilter(FilterSet):account=CharFilter(field_name='username')sort=OrderingFilter(fields={'username':'account','first_name':'first_name','last_name':'last_name','email':'email'},field_cases={'username':Lower,'email':Lower},)classMeta:model=Userfields=('first_name','last_name','email')Licensedjango-filter-addonsis released under theMIT license.
Package: django-filter-drf-camel-case
Django-Filter DRF Camel Case HelpersA collection of utility classes that make using camel cased query parameters easier withDjango REST
Frameworkanddjango-filter.
Filter set query parameters can be written using conventional snake cased naming in Python code, but will be treated as
camel case in the API. Additionally, schemas generated usingDRF Spectacularwill use the correct camel case notation.UsageTo get the full benefit of this package, just swap out the normalDjangoFilterBackendandOrderingFilterclasses
provided by thedjango_filterpackage with those implemented indjango_filter_drf_camel_case.fromdjango.dbimportmodelsfromdjango_filters.rest_frameworkimportfiltersfromdjango_filters.rest_frameworkimportfiltersetfromrest_framework.viewsetsimportModelViewSetfromdjango_filter_drf_camel_caseimportOrderingFilterfromdjango_filter_drf_camel_caseimportDjangoFilterBackendclassPost(models.Model):title=models.CharField(max_length=255)created_at=models.DateTimeField(auto_add_now=True)follow_up=models.ForeignKey("Post",null=True,on_delete=models.SET_NULL)classPostFilters(filterset.FilterSet):created_at=filters.IsoDateTimeFromToRangeFilter()sort=OrderingFilter(fields=("created_at","title","follow_up__title"))classMeta:model=Postfields={"title":{"exact","contains"},"follow_up__title":{"exact"},}classPostViewSet(ModelViewSet):queryset=Post.objects.all()filter_backends=[DjangoFilterBackend]filterset_class=PostFiltersThe supported query parameters will be:titlecreatedAtcreatedAt__ltauthor__fullNameThe sort keys are:createdAt/-createdAttitle/-titlefollowUp__title/-followUp__titleUnderscore vs DunderscoreTo avoid ambiguous query parameters based on lookup expressions, these utilities will respect the  default use of the
dunderscore (__) pattern by django-filter to separate fields from lookup expressions and relationships.If you want to avoid this dunderscore behavior, then the recommendation is to use explicit keys, using underscores
instead of dunderscores where you want. A possible alternative filterset would befromdjango.dbimportmodelsfromdjango_filters.rest_frameworkimportfiltersfromdjango_filters.rest_frameworkimportfiltersetfromdjango_filter_drf_camel_caseimportOrderingFilterclassPost(models.Model):title=models.CharField(max_length=255)created_at=models.DateTimeField(auto_add_now=True)follow_up=models.ForeignKey("Post",null=True,on_delete=models.SET_NULL)classPostFilters(filterset.FilterSet):created_at=filters.IsoDateTimeFromToRangeFilter()follow_up_title=filters.CharFilter(field_name="follow_up__title")sort=OrderingFilter(fields={"created_at":"createdAt","title":"title","follow_up__title":"followUpTitle",})classMeta:model=Postfields=("title",)Resulting in the query parameters:titlecreatedAtcreatedAtLtfollowUpTitleThe sort keys are:createdAt/-createdAttitle/-titlefollowUpTitle/-followUpTitle
Package: django_filtered_feed
So the average-joe RSS is binary ie either you subscribe to a feed or you don’t. This approach results in a ridiculous amount of junk in our inbox. What if we could subscribedefinethe feed that we would like to subscribe to? Thanks to the stellardjango syndication frameworkanddjango filters, I was able to hack together a fix.If you have aBookmodel like so:class Book(models.Model):
    name = models.CharField(max_length=256)
    pages = models.IntegerField()

def __unicode__(self):
    return self.nameAdjango_filterFilterSetlike so:class BookFilterSet(django_filters.FilterSet):
    pages = django_filters.NumberFilter(lookup_type='lt')
    class Meta:
        model = Book
        fields = ['pages']AFilteredFeedclass like so:class BookFilteredFeed(BaseFilteredFeed):
    model = Book
    filter_set = BookFilterSet
    title = "BookFeed"
    link = "http://localhost:8000"
    description = "Get alerts for new books - less than given number of pages!"

    def item_link(self, item):
        return reverse('book_detail', args=[item.id])Hook up the necessary urls like so:urlpatterns = patterns('',
    url(r'^books/feed$', BookFilteredFeed.as_view(), name='book_feed'),
)And finally, if we have the following 3 books in our DB:Introduction to Python (100 pages)Introduction to C (300 pages)Javascript - The good parts (300 pages)Hittinghttp://localhost:8000/books/feedwill give you an RSS feed includes:Introduction to PythonIntroduction to CJavascript - The good partsAnd hittinghttp://localhost:8000/books/feed?pages=200will give you an RSS feed that just includes:Introduction to PythonYou users will forever remain grateful for sparing them the deluge that follows a binary subscription. You will be hailed the king of syndication, worshipped as a rock star and live happily ever after. The best part is that it takes a minute to get started:pip install django_filtered_feedFollowed ofcourse by includingfiltered_feedin yourINSTALLED_APPS.INSTALLED_APPS = (
    ...
    'filtered_feed',
    ...
)History0.1.0 (2014-08-18)First release on PyPI.
Package: django-filtered-form
InstallationIn your virtualenv, usepip installdjango-filteredform.You don’t need to install it into yoursettings.INSTALLED_APPS, as it
does not provide any models or templates, only forms.UsageDeclarative way to define filters on fields on a django model form:from django import forms
from people.models import Person
from filtered_form.forms import FilteringForm

class PersonAdminForm(FilteringForm):
    class Meta:
        model = Person

    instance_filters = {
        'units': 'company.units'
    }
    filters = {
        'units': models.Q(is_active=True),
        'colours__in': ['red','blue','green']
    }instance_filtersinstance_filtersare things that allow for relational filters to be applied.For instance, if you have a triple of models,Person,UnitandCompany,
and every person and unit have a foreign key to a company, you can
use an instance filter to easily select only the associated company’s units for
a queryset when viewing a person.Alternatively, you can supply a queryset method (that does not require arguments),
for more filtering:instance_filters = {
    'units': 'company.units.active'
}plainfiltersA more conventional filter structure, that allows you to supply aQobject, or
a dict of key-value pairs, which will be passed to.filter()on the queryset.You can quite easily shoot yourself in the foot if your filter keys are not valid
arguments for a filter function on that queryset.FormSetsYou can either create a form using this method, and then pass that to your formset
class or factory. Or, you can have a formset class based onfiltered_form.forms.FilteredFormSet,
which will also set up the queryset values on the empty form correctly, which is very
useful if you are using dynamic forms.Version History1.0.3Fix a bug where new objects could not be created in the django admin.1.0.1Improve documentation.Allow for a callable in the value of aninstance_filter.Allow for a dict in the value of afilter.1.0Initial Release.
Package: django-filteredlist
FilteredListView provides a basic class based view for django to easily filter a ListView.
The provided template currently is in german and for bootstrap3.Quick startAdd “django_filteredlist” to your INSTALLED_APPS:INSTALLED_APPS = [
    ...
    'django_filteredlist',
]Create a FilteredListView:class MyView(FilteredListView, ListView):
    allowed_filters = ('employee_name', 'project')
    lookup_expressions = { 'project': 'projects__name__icontains' }
    verbose_names = (('employee_name', 'Name'), ('project', 'Working on'),)Add search form to your list template:{% extends 'base.html' %}

{% block content %}

    {{ search }}

    <!-- YOUR LIST HERE -->

{% endblock %}
Package: django-filtered-mail
django-filtered-mail====================Django Email Backend which only sends to whitelisted recipientsThis email backend behaves just like the default SMTP backendexcept that it only sends messages to a select set of addresses.Use the setting `EMAIL_ALLOWED_RECIPIENTS` to specify allowed addresses asregular expressions. The filter uses the Python 'match' method to checkthe regular expressions against the email recipients.It only matches the email addresses and not the optional 'name' part ofrecipients. All addresses are lowercased before matching.Example settings:EMAIL_BACKEND = 'django_filtered_mail.mail.EmailBackend'EMAIL_ALLOWED_RECIPIENTS = (r'^.*@dreamsolution.nl$',r'^some.one@gmail.com$',)
Package: django-filter-ex
Django-filter is a reusable Django application allowing users to declaratively
add dynamicQuerySetfiltering from URL parameters.Full documentation onread the docs.RequirementsPython: 2.7, 3.6Django: 1.11DRF: 3.7, 3.8Django filter EX is a fork from Django filter 1.1.0 witch contains a small patch to improve performance of
the default filterset on chained filters. It passes all the tests and works for my use-case.InstallationInstall using pip:pipinstalldjango-filterThen add'django_filters'to yourINSTALLED_APPS.INSTALLED_APPS=[...'django_filters',]UsageDjango-filter can be used for generating interfaces similar to the Django
admin’slist_filterinterface.  It has an API very similar to Django’sModelForms.  For example, if you had a Product model you could have a
filterset for it with the code:importdjango_filtersclassProductFilter(django_filters.FilterSet):classMeta:model=Productfields=['name','price','manufacturer']And then in your view you could do:defproduct_list(request):filter=ProductFilter(request.GET,queryset=Product.objects.all())returnrender(request,'my_app/template.html',{'filter':filter})Usage with Django REST FrameworkDjango-filter provides a customFilterSetand filter backend for use with
Django REST Framework.To use this adjust your import to usedjango_filters.rest_framework.FilterSet.fromdjango_filtersimportrest_frameworkasfiltersclassProductFilter(filters.FilterSet):classMeta:model=Productfields=('category','in_stock')For more details see theDRF integration docs.SupportIf you have questions about usage or development you can join themailing list.