Saravanan666/pypi-org huggingface dataset:
Package: django-dramatiq-pg
dramatiq-pgintegration fordjango.InstallationInstall with pip$pipinstalldjango-dramatiq-pgAdd to yourINSTALLED_APPSlist in settings.pyINSTALLED_APPS=[...'django_dramatiq_pg',]Create a Registry, and register your tasksfromdjango_dramatiq_pg.registryimportRegistrytasks=Registry()@tasks.actordefmytask():...ConfigureDRAMATIQ_BROKER={"OPTIONS":{"url":"postgres:///mydb",},"MIDDLEWARE":["dramatiq.middleware.TimeLimit","dramatiq.middleware.Callbacks","dramatiq.middleware.Retries",],}DRAMATIQ_REGISTRY='myapp.registry.tasks'Start the worker process:$dramatiqdjango_dramatiq_pg.workerThis worker module will auto-discover any module called ‘actors’ inINSTALLED_APPS.RegistryIn a typicaldramatiqapplication, theBrokeris configured before any
tasks are registered. However, asDjangois in control of the intialisation
sequence, there is an issue of ordering; theactordecorator assumes the
broker is already configured.To resolve this,django_dramatiq_pgprovides aRegistryfor your tasks,
which is then bound to theBrokerwhen Django initialises.In your code, declare aRegistryinstance, and use its.actormethod to
decorate your task functions. Then telldjango_dramatiq_pgto use your
registry with theDRAMATIQ_REGISTRYsetting.If you do not specify one,django_dramatiq_pgwill create one on start.The registry can be accessed as the.registryattribute on thedjango_dramatiq_pgApp instance.SettingsDRAMATIQ_BROKERA dict of options to pass when instantiating the broker.DRAMATIC_BROKER[‘OPTIONS’]Arguments to pass to the Broker.DRAMATIC_BROKER[‘MIDDLEWARE’]A list of middleware classes to be passed to the broker.These can either be import strings, or instances.DRAMATIQ_ENCODERDefault: NoneImport path for encoder class.DRAMATIQ_ACTORS_MODULEDefault: ‘actors’Name of module use to auto-discover actors in INSTALLED_APPS.DRAMATIQ_REGISTRYImport path for the task Registry instance.This should refer to an instance ofdjango_dramatiq_pg.registry.Registry.This resolves the chicken/egg problem of declaring tasks before the broker is
configured.
Package: django-drf-auth
DRF AuthenticationQuickstartFor installing django-drf-auth, just run this command in your shellpip install django-drf-authsettingsINSTALLED_APPS = (
    # ...
    'django.contrib.sites',
    'rest_auth',
    'allauth',
    'allauth.account',
    'rest_auth.registration',
    'drf_auth',
)


FRONT_URL = '' 
EMAIL_HOST_USER = '' 
EMAIL_HOST_PASSWORD = '' 
EMAIL_PORT = 587 

REST_USE_JWT = True
SITE_ID = 1

ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_EMAIL_REQUIRED = TrueFRONT_URL -> this is your urlhttps://www.example.comURLSurlpatterns = [
    # ...
    path('drf_auth/', include('drf_auth.urls')),
]API Endpoints:RegisterMethod:POSTEndpoint:/registration/Payload:{   "username": "USERNAME",   "password1": "PASSWORD",   "password2": "PASSWORD",   "email": "EMAIL"   }Register Confirm EmailMethod:POSTEndpoint:/account-confirm-email/<str:key>/Payload:{   "key": "KEY", }LoginMethod:POSTEndpoint:/login/Payload:{   "username": "USERNAME",   "password": "PASSWORD"   }LogoutMethod:POSTEndpoint:/logout/Headers:Authorization: JWT YOUR_TOKEN_HEREChange PasswordMethod:POSTEndpoint:/password/change/Payload:{   "old_password": "OLD PASSWORD",   "new_password1": "NEW PASSWORD1", "new_password2": "NEW PASSWORD2"   }Reset PasswordMethod:POSTEndpoint:/password/reset/Payload:`{"email": "EMAIL ADDRESS",}`Reset Password ConfirmMethod:POSTEndpoint:/password/reset/confirm/<str:uid>/<str:token>/Payload:`{"uid": "UID","token": "token",}`Reset Password ConfirmMethod:GETEndpoint:/user/Headers:Authorization: JWT YOUR_TOKEN_HEREContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.LicenseMIT
Package: django-drf-cms
DRF-CMS is a Django app to manage non-relational websites content in a restful way.
Elements are key-value and linked to a page, letting the client decide how to compose them.Quick startAdd “cms” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'drf_cms',
]Include the drf-cms URLconf in your project urls.py like this:path('cms/', include('drf_cms.urls')),Runpython manage.py migrateto create the cms models.Publish instructions:
python setup.py sdist
twine upload dist/*
Package: django-drf-jwt
Django REST Framework JWT ExampleA simple app to use django-jwt-authentication using Django REST FrameworkRunning the Project LocallyFirst, add this to your requirements file of the project:-egit+ssh://git@github.com/ShahzaibMumtaz07/django_drf_jwt.git#egg=django_drf_jwtInstall the requirements:pipinstall-rrequirements.txtAdd app to the INSTALLED_APPS in the project:INSTALLED_APPS=[...,'django_drf_jwt',...,]Include the app urls in your project urls.py:fromdjango.urlsimportpath,includeurlpatterns=[path('django_drf_jwt/',include('django_drf_jwt.urls'))]Apply the migrations if not applied:pythonmanage.pymigrateFinally, run the development server:pythonmanage.pyrunserverThe API endpoints will be available at127.0.0.1:8000/django_drf_jwt/api-token-auth/
Package: django-drf-utils
django-drf-utilsReleasesThis project follows thesemantic versioning specificationfor its releases.DevelopmentRequirementsPython >=3.10Django >=3.2django-rest-framework >=3.12SetupCreate and activate a python3 venv.Install the library in the editable modepip install -e .[test,stubs]Install dev requirementspip install -r requirements-dev.txt.Install git hooks to automatically format code using black withpre-commit installInstallationFrom git inrequirements.txtTo install this package from this git repository, add thedjango-drf-utilspackage to therequirements.txtfile.
Package: django-drfxios
DrfXiossimplifies communication between frontend and Django Rest Framework API.Quick start>>> pip install django-drfxiossettings.INSTALLED_APPSINSTALLED_APPS=[...'drfxios',...]settings.pyDRFXIOS_ROUTER_PATH="<dotted.path.to.router>"# eg "api.urls.router"context_processorsTEMPLATES=[{...'OPTIONS':{'context_processors':[...'drfxios.context_processors.drfxios',...],},},]base.html<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.js"></script>
<script src="https://cdn.jsdelivr.net/npm/url-join@4.0.1/lib/url-join.min.js"></script>
<script src="{%static"drfxios/drfxios.js"%}"></script>

<script>
    dx = new DrfXios('api',{{DRFXIOS.MODEL_LIST|safe}})
</script>And you’re ready tu use DrfXios in your templates.Example:dx.getModel(<pk>)
dx.createModel(<data:obj>)
dx.deleteModel(<pk>)
dx.getModelList(<filter:obj>)
dx.updateModel(<data:obj>)
dx.patchModel(<data:obj>)All methods return JavaScript promises so you can use.then,.catchand.finallymethods.
Package: django-drip-marketing
Drip marketing for DjangoDocumentationThe full documentation is athttps://django-drip-marketing.readthedocs.io.QuickstartInstall Django Drip Marketing:pip install django-drip-marketingAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'drip_marketing.apps.DripMarketingConfig',...)Add Django Drip Marketing’s URL patterns:fromdrip_marketingimporturlsasdrip_marketing_urlsurlpatterns=[...url(r'^',include(drip_marketing_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 (2017-04-16)First release on PyPI.
Package: django-driverjs
django-driverjs is a wrapper for the [Driver.js](https://github.com/kamranahmedse/driver.js) library.InstallationRunpip installdjango-driverjs.
Once this step is complete add"driverjs"to yourINSTALLED_APPSsetting in yoursettings.pyfile and runpython manage.py migrateto update your database.Usage#1 On the django admin panel create a driver and its steps.#2 Include the static files (provided):<scriptsrc="{%static'Driverjs/js/driver.min.js'%}"></script><linkrel="stylesheet"href="{%static'Driverjs/css/driver.min.css'%}">#3 Load the tag and render the javascript:{% load driverjs %}{%setup_driver 'your_driver_slug' %}#4 Choose a place to start it with:[your_driver_slug]_driver.start();So if your driver’s slug is new_features, a new variable will be declared:new_features_driver
Package: django_drole
[![Build Status](https://travis-ci.org/iivvoo/django_drole.png?branch=master)](https://travis-ci.org/iivvoo/django_drole)
[![Coverage Status](https://coveralls.io/repos/iivvoo/django_drole/badge.png)](https://coveralls.io/r/iivvoo/django_drole)Django “Drole”Zope/Plone inspired role/permission authorization system for Django
Package: django-dropboxchooser-field
Dropbox chooser field for django.QuickstartInstall the package viapip:pipinstalldjango-dropboxchooser-fieldAdddropboxchooser_fieldtoINSTALLED_APPS:INSTALLED_APPS=(...'dropboxchooser_field',...)Add yourDrop-inapp key to thesettings.pyfile:DROPBOX_APP_KEY=''Usagefromdjangoimportformsfromdropboxchooser_field.fieldsimportDropboxChooserFieldclassMyForm(forms.Form):file_from_dropbox=DropboxChooserField(extensions=['jpg','png'])
Package: django-dropboxchooser-field3
Dropbox chooser field for django.QuickstartInstall the package viapip:pipinstalldjango-dropboxchooser-field3Adddropboxchooser_fieldtoINSTALLED_APPS:INSTALLED_APPS=(...'dropboxchooser_field',...)Add yourDrop-inapp key to thesettings.pyfile:DROPBOX_APP_KEY=''Usagefromdjangoimportformsfromdropboxchooser_field.fieldsimportDropboxChooserFieldclassMyForm(forms.Form):file_from_dropbox=DropboxChooserField(extensions=['jpg','png'])
Package: django-dropbox-storage
django-dropbox-storageA Dropbox Storage for your Django appsWhatdjango-dropbox-storageallows Django apps to use Dropbox as a storage backend for file uploading.InstallingFirst things first:$ pip install django-dropbox-storageThen open thesettings.pyof your project and include it to yourINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'django_dropbox_storage',
    ...
)If you want to usedjango_dropbox_storageas default storage for all file uploads, you need to adjustDEFAULT_FILE_STORAGEtoo:DEFAULT_FILE_STORAGE = 'django_dropbox_storage.storage.DropboxStorage'If you just want to use it on a single model field, you can simply import it:from django_dropbox_storage.storage import DropboxStorage

DROPBOX_STORAGE = DropboxStorage()

photo = models.ImageField(upload_to='photos', storage=DROPBOX_STORAGE ...)In order to let it work properly, you must set the next settings:DROPBOX_ACCESS_TOKEN = 'xxx'If you don't haveDROPBOX_ACCESS_TOKENyou can create one after creating a Dropbox app atDropbox for Developers.
If you have your DropboxApp keyandApp secret, you can setDROPBOX_CONSUMER_KEYandDROPBOX_CONSUMER_SECRETsettings insettings.py, then run:$ python manage.py get_dropbox_token [--settings=test_settings]And follow up on screen instructions, finally set theDROPBOX_ACCESS_TOKEN_SECRETin yoursettings.pymodule.You can also set default root folder setting the value ofDROPBOX_ROOT_FOLDER:DROPBOX_ROOT_FOLDER = '/Public'By default it's set to'/'(root folder).TestsTests are written following Django's best practices.In order to run them, you need to setDROPBOX_ACCESS_TOKENproperly.NOTE:if you're testing this package asstand-alone, you can set the access token in alocal_settings.pymodule put in the root folder.To launch the test suite:$ python manage.py test [--settings=test_settings]To check the unit tests coverage you can:$ pip install coverage
$ coverage run manage.py test [--settings=test_settings]
$ coverage report -mContributingWhen contributing, please follow these steps:Clone the repo and make your changes.Make sure your code has test cases written against it.Make sure all the tests pass.Lint your code with Flake8.Add your name to the list of contributers.Submit a Pull Request.AuthorsEmanuele BertoldiThis project is based on previous work by:Andres Torresdjango-dropboxMaximiliano Ceciliadjango-dropboxJosh Schneierdjango-storagesDanielle Madeleydjango-storagesKudos and many thanks to all of them!LicenseCopyright (c) 2018 Emanuele BertoldiMIT License
Package: django-dropbox-storage-fixed
django-dropbox-storageA Dropbox Storage for your Django appsWhatdjango-dropbox-storageallows Django apps to use Dropbox as a storage backend for file uploading.InstallingFirst things first:$ pip install django-dropbox-storageThen open thesettings.pyof your project and include it to yourINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'django_dropbox_storage',
    ...
)If you want to usedjango_dropbox_storageas default storage for all file uploads, you need to adjustDEFAULT_FILE_STORAGEtoo:DEFAULT_FILE_STORAGE = 'django_dropbox_storage.storage.DropboxStorage'If you just want to use it on a single model field, you can simply import it:from django_dropbox_storage.storage import DropboxStorage

DROPBOX_STORAGE = DropboxStorage()

photo = models.ImageField(upload_to='photos', storage=DROPBOX_STORAGE ...)In order to let it work properly, you must set the next settings:DROPBOX_ACCESS_TOKEN = 'xxx'If you don't haveDROPBOX_ACCESS_TOKENyou can create one after creating a Dropbox app atDropbox for Developers.
If you have your DropboxApp keyandApp secret, you can setDROPBOX_CONSUMER_KEYandDROPBOX_CONSUMER_SECRETsettings insettings.py, then run:$ python manage.py get_dropbox_token [--settings=test_settings]And follow up on screen instructions, finally set theDROPBOX_ACCESS_TOKEN_SECRETin yoursettings.pymodule.You can also set default root folder setting the value ofDROPBOX_ROOT_FOLDER:DROPBOX_ROOT_FOLDER = '/Public'By default it's set to'/'(root folder).TestsTests are written following Django's best practices.In order to run them, you need to setDROPBOX_ACCESS_TOKENproperly.NOTE:if you're testing this package asstand-alone, you can set the access token in alocal_settings.pymodule put in the root folder.To launch the test suite:$ python manage.py test [--settings=test_settings]To check the unit tests coverage you can:$ pip install coverage
$ coverage run manage.py test [--settings=test_settings]
$ coverage report -mContributingWhen contributing, please follow these steps:Clone the repo and make your changes.Make sure your code has test cases written against it.Make sure all the tests pass.Lint your code with Flake8.Add your name to the list of contributers.Submit a Pull Request.AuthorsEmanuele BertoldiThis project is based on previous work by:Andres Torresdjango-dropboxMaximiliano Ceciliadjango-dropboxJosh Schneierdjango-storagesDanielle Madeleydjango-storagesKudos and many thanks to all of them!LicenseCopyright (c) 2018 Emanuele BertoldiMIT License
Package: django-dropbox-storage-fork
django-dropbox-storageA Dropbox Storage for your Django appsWhatdjango-dropbox-storageallows Django apps to use Dropbox as a storage backend for file uploading.InstallingFirst things first:$ pip install django-dropbox-storageThen open thesettings.pyof your project and include it to yourINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'django_dropbox_storage',
    ...
)If you want to usedjango_dropbox_storageas default storage for all file uploads, you need to adjustDEFAULT_FILE_STORAGEtoo:DEFAULT_FILE_STORAGE = 'django_dropbox_storage.storage.DropboxStorage'If you just want to use it on a single model field, you can simply import it:from django_dropbox_storage.storage import DropboxStorage

DROPBOX_STORAGE = DropboxStorage()

photo = models.ImageField(upload_to='photos', storage=DROPBOX_STORAGE ...)In order to let it work properly, you must set the next settings:DROPBOX_ACCESS_TOKEN = 'xxx'If you don't haveDROPBOX_ACCESS_TOKENyou can create one after creating a Dropbox app atDropbox for Developers.
If you have your DropboxApp keyandApp secret, you can setDROPBOX_CONSUMER_KEYandDROPBOX_CONSUMER_SECRETsettings insettings.py, then run:$ python manage.py get_dropbox_token [--settings=test_settings]And follow up on screen instructions, finally set theDROPBOX_ACCESS_TOKEN_SECRETin yoursettings.pymodule.You can also set default root folder setting the value ofDROPBOX_ROOT_FOLDER:DROPBOX_ROOT_FOLDER = '/Public'By default it's set to'/'(root folder).TestsTests are written following Django's best practices.In order to run them, you need to setDROPBOX_ACCESS_TOKENproperly.NOTE:if you're testing this package asstand-alone, you can set the access token in alocal_settings.pymodule put in the root folder.To launch the test suite:$ python manage.py test [--settings=test_settings]To check the unit tests coverage you can:$ pip install coverage
$ coverage run manage.py test [--settings=test_settings]
$ coverage report -mContributingWhen contributing, please follow these steps:Clone the repo and make your changes.Make sure your code has test cases written against it.Make sure all the tests pass.Lint your code with Flake8.Add your name to the list of contributers.Submit a Pull Request.AuthorsEmanuele BertoldiThis project is based on previous work by:Andres Torresdjango-dropboxMaximiliano Ceciliadjango-dropboxJosh Schneierdjango-storagesDanielle Madeleydjango-storagesKudos and many thanks to all of them!LicenseCopyright (c) 2018 Emanuele BertoldiMIT License
Package: django-dropbox-upload-handler
Transfer Uploaded Files to DropboxQuickstartInstall Django Dropbox Upload Handler:pip install django-dropbox-upload-handlerAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'django_dropbox_upload_handler.apps.DjangoDropboxUploadHandlerConfig',...)Add DropboxFileUploadHandler to the default Upload Handlers:FILE_UPLOAD_HANDLERS=['django_dropbox_upload_handler.handler.DropboxFileUploadHandler']To Enable DropboxFileUploadHandler within a single view:forms.pyfromdjangoimportformsclassUploadFileForm(forms.Form):title=forms.CharField(max_length=50)file=forms.FileField()views.pyfromdjango.httpimportHttpResponseRedirectfromdjango.shortcutsimportrenderfrom.formsimportUploadFileForm# Imaginary function to handle the uploaded file dropbox file.fromsomewhereimporthandle_uploaded_filedefupload_file(request):ifrequest.method=='POST':self.request.upload_handlers.insert(0,DropboxFileUploadHandler(request))form=UploadFileForm(request.POST,request.FILES)ifform.is_valid():handle_uploaded_file(request.FILES['file'])returnHttpResponseRedirect('/success/url/')else:form=UploadFileForm()returnrender(request,'upload.html',{'form':form})Add Django Dropbox Upload Handler’s URL patterns:fromdjango_dropbox_upload_handlerimporturlsasdjango_dropbox_upload_handler_urlsurlpatterns=[...url(r'^',include(django_dropbox_upload_handler_urls)),...]Checking upload progress for API:When submitting the file include the parameter progres_id in the URL. ex:functiongetUUID(){letuuid=""for(leti=0;i<32;i++){uuid+=Math.floor(Math.random()*16).toString(16);}returnuuid}functionupload(file){letdata=newFormData()data.append('file',file)fetch('/path/to/upload?progress_id='+getUUID(),{method:"post",body:data}).then(response=>{//...})checkProgress(0,progressId,file.size)}functioncheckProgress(progressId,size){fetch('/upload_progress?progress_id='=progiressId).then(response=>{if(r.status===201)return{done:'true'}returnresponse.json()}).then(data=>{if(data.done){//..upload is completed}else{//.. still uploading - progress can be checked using:progress=Math.round(parseInt(data.uploaded)/parseInt(data.length)*100)setTimeout(()=>{checkProgress(progressId,size)},500)}})}FeaturesTransfers files uploaded through Django to DropboxIncludes a upload_progress view for ajax callsRunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2017-09-03)First release on PyPI.
Package: django-dropimages
# Django Dropimages #
Uses [Dropzone.js](http://www.dropzonejs.com/) and [django-braces](https://github.com/brack3t/django-braces) to simplify the upload of multiple images into a collection object.## Installation
Install from PyPI withpip:pip install –pre django-dropimages## Documentation
Add ‘django_dropimages’ to the list of installed apps.Addurl(r’^__dropimages__/’, include(django_dropimages.urls)),to your urls.pyAdd{% load drop_images %}at the start of the template,{% drop_images_js %}where the javascripts are loaded,
and{% drop_images  %}where you want the dropzone to show.Each image file dropped into the dropzone will create aDropimagesImagemodel, contained in aDropimagesGalleryunique for every dropzone instance.
You can customize in order to specify which model will hold the image instead ofDropimagesImage,
or completely override the called urls and use your own logic.## Configuration
Provides a setting dictionary that you can add in your project’s settings module to customize its behavior.### DROP_IMAGES_CONFIG#### keys:SHOW_ID_ON_COMPLETESpecify a DOM node id which will be set to ‘display: block’ once all the files are processed, useful to integrate
the dropzone into another modelform or wizard (see the examples).GALLERY_FIELD_IDSpecify the id of a select field to be filled with theDropimagesGalleryDjango instance pk once the upload is
complete, useful to integrate the dropzone into another modelform or wizard (see the examples).UPLOAD_URLOverrides the url where file data is POSTed, so you can use your own view to save the data.
An option?gallery_idis automatically appended to the url, which is the same  for every file uploaded but unique
among different dropzone instances.DELETE_URLOverrides the url to ask for immediate image removal from the dropzone, so you can use your own view.
Two options are automatically appended to the url;?gallery_idwhich is the same for every file into the dropzone
but unique among different dropzone instances, andoriginal_filenamewhich should be saved intoDropimagesImageor whichever model you use to save images in order to identify them.DROPIMAGE_MODELUse the specified model ( must be aappname.ModelNamestring ) to save the uploaded images.
Model must have a ForeignKey todropimages.DropImagesGallerycalleddropimages_galleryand adropimages_original_filenameCharField.DROPIMAGE_FIELDSave the image into the specified field name of theDROPIMAGE_MODELmodel.DICT_DEFAULT_MESSAGEThe message that gets displayed before any files are dropped.## Example
To navigate the example page (assuming you use [virtualenvwrapper](https://pypi.python.org/pypi/virtualenvwrapper)) :mkvirtualenv django-dropimages
pip install example/requirements.txt
add2virtualenv .
python example/manage.py migrate
python example/manage.py runserver