Saravanan666/pypi-org huggingface dataset:
Package: django-async-tasks
It’s a simple system to process queue task in real time.Requirementspython 2.7Django 1.6 through Django 1.9django-redis-cacheInstallDownload it from PyPi withpip installdjango-async-tasksAdd “async_tasks” to your INSTALLED_APPS setting like this:INSTALLED_APPS = (
    ...
    'async_tasks',
)Configure settingsSet setting name that defined for Redis insettings.CACHES. The default used ‘default’ setting name.ASYNC_TASKS_REDIS_SETTING_NAME = 'default'Setup log path and log filename. The default used for pathos.path.join(BASE_DIR, 'logs')and filename'async-tasks.log'.ASYNC_TASKS_LOG_PATH = os.path.join(BASE_DIR, 'logs') # Log path
ASYNC_TASKS_LOG_FILENAME = 'async-tasks.log' # Log filenameAdd cron job to execute every minute:python manage.py django_async_tasksHow to use?Add task to executedelayed_task(your_function, **params), return identification codeCheck is task readyready_task(identification_code). Return statuses:'PROCESS','SUCCESS','FAIL'Get resultresult_task(identification_code)Examplefromasync_tasks.utilsimportdelay_task,ready_task,result_taskdeftest(a,b):returna+bdeftest_delay_task():idn=delay_task(test,**{'a':1,'b':2})status=Nonewhilestatusnotin['SUCCESS','FAIL']:status=ready_task(idn)ifstatus=='SUCCESS':printresult_task(idn)else:printstatusif__name__=="__main__":test_delay_task()
Package: django-async-test
asynciounit tests withDjangotransactional support.It supports Django 1.8+ for Python versions 3.5+ and usesasynctestunder the
covers to provide support for easily mocking coroutines.DocsAvailable atdjango-async-test.readthedocs.orgInstallationYou can install django-async-test either via the Python Package Index (PyPI)
or from github.To install using pip;$pipinstalldjango-async-testFrom github;$pipinstallgit+https://github.com/alexhayes/django-async-test.gitUsageasynctest.TestCasedoes a great job of mocking coroutines however if you’re
writing tests that manipulate the database in Django you’ll most likely want to
ensure that things are cleaned up after your test.Withdjango_async_test.TestCaseyou have the coroutine support ofasynctest.TestCasebut with the transaction support of Django’sdjango.test.TestCase.importdjango_async_testclassMyTestCase(django_async_test.TestCase):@django_async_test.patch('myapp.my_coroutine')deftest_foo(self,MockMyCoroutine):# Mock our coroutine.MockMyCoroutine.return_value='Hello World'# Create an instance of MyModelMyModel.objects.create(...)......In the above example, the test is run inside a transaction by Django’s TestCase,
thus the creation of a MyModel will be rolled back, cleaning up the database.Also, our co-routine will be patched correctly by asynctest.LicenseThis software is licensed under theMIT License. See theLICENSEfile.AuthorAlex Hayes <alex@alution.com>
Package: django-async-upload
django-async-upload is a django app to allow you to upload large files from within the django admin site asynchrously, that means that you can add any number of files on the admin page (e.g. through inline models) and continue editing other fields while files are uploading.django-async-upload is compatible with django-storages (tested with S3Storage)Installationpip install django-async-uploadAddadmin_async_uploadto yourINSTALLED_APPSAddurl(r'^admin_async_upload/',include('admin_async_upload.urls')),to your urls.pyAdd a model field eg:from admin_resumable.models import ResumableFileFieldclass Foo(models.Model):
    bar = models.CharField(max_length=200)
    foo = AsyncFileField()Optionally:SetADMIN_RESUMABLE_CHUNKSIZE, default is"1*1024*1024"SetADMIN_RESUMABLE_STORAGE, default is setting of DEFAULT_FILE_STORAGE and ultimately'django.core.files.storage.FileSystemStorage'.  If you don’t want the default FileSystemStorage behaviour of creating new files on the server with filenames appended with _1, _2, etc for consecutive uploads of the same file, then you could use this to set your storage class to something likehttps://djangosnippets.org/snippets/976/SetADMIN_RESUMABLE_CHUNK_STORAGE, default is'django.core.files.storage.FileSystemStorage'.  If you don’t want the default FileSystemStorage behaviour of creating new files on the server with filenames appended with _1, _2, etc for consecutive uploads of the same file, then you could use this to set your storage class to something likehttps://djangosnippets.org/snippets/976/SetADMIN_RESUMABLE_SHOW_THUMB, default is False. Shows a thumbnail next to the “Currently:” link.SetADMIN_SIMULTANEOUS_UPLOADSto limit number of simulteneous uploads, dedaults to3. If you have broken pipe issues in local development environment, set this value to1.Versions4.0.0   - inital fork of django-admin-async-upload 3.0.4 with support for Django 4 and laterCompatibilityTested on Django 4.2 running on python 3.11Thanks tooriginal django-admin-resumable-js by jonatronhttps://github.com/jonatron/django-admin-resumable-jsdjango-admin-resumable-js fork by roxelhttps://github.com/roxel/django-admin-resumable-jsdjango-admin-async-upload fork by DataGreedhttps://github.com/DataGreed/django-admin-async-uploadResumable.jshttps://github.com/23/resumable.jsdjango-resumablehttps://github.com/jeanphix/django-resumable
Package: django-async-upload-kg
Based on fork fromhttps://github.com/bit/django-async-upload. Allows install via pip:pip install django-async-upload-kgdjango-async-upload is a django app to allow you to upload large files from within the django admin site asynchrously, that means that you can add any number of files on the admin page (e.g. through inline models) and continue editing other fields while files are uploading.django-async-upload is compatible with django-storages (tested with S3Storage)Installationpip install django-async-uploadAddadmin_async_uploadto yourINSTALLED_APPSAddurl(r'^admin_async_upload/',include('admin_async_upload.urls')),to your urls.pyAdd a model field eg:from admin_resumable.models import ResumableFileFieldclass Foo(models.Model):
    bar = models.CharField(max_length=200)
    foo = AsyncFileField()Optionally:SetADMIN_RESUMABLE_CHUNKSIZE, default is"1*1024*1024"SetADMIN_RESUMABLE_STORAGE, default is setting of DEFAULT_FILE_STORAGE and ultimately'django.core.files.storage.FileSystemStorage'.  If you don’t want the default FileSystemStorage behaviour of creating new files on the server with filenames appended with _1, _2, etc for consecutive uploads of the same file, then you could use this to set your storage class to something likehttps://djangosnippets.org/snippets/976/SetADMIN_RESUMABLE_CHUNK_STORAGE, default is'django.core.files.storage.FileSystemStorage'.  If you don’t want the default FileSystemStorage behaviour of creating new files on the server with filenames appended with _1, _2, etc for consecutive uploads of the same file, then you could use this to set your storage class to something likehttps://djangosnippets.org/snippets/976/SetADMIN_RESUMABLE_SHOW_THUMB, default is False. Shows a thumbnail next to the “Currently:” link.SetADMIN_SIMULTANEOUS_UPLOADSto limit number of simulteneous uploads, dedaults to3. If you have broken pipe issues in local development environment, set this value to1.Versions4.0.0   - inital fork of django-admin-async-upload 3.0.4 with support for Django 4 and laterCompatibilityTested on Django 4.2 running on python 3.11Thanks tooriginal django-admin-resumable-js by jonatronhttps://github.com/jonatron/django-admin-resumable-jsdjango-admin-resumable-js fork by roxelhttps://github.com/roxel/django-admin-resumable-jsdjango-admin-async-upload fork by DataGreedhttps://github.com/DataGreed/django-admin-async-uploadResumable.jshttps://github.com/23/resumable.jsdjango-resumablehttps://github.com/jeanphix/django-resumable
Package: django-asyncviews
Django AsyncViews=================![Build](https://git.steadman.io/podiant/django-asyncviews/badges/master/build.svg)![Coverage](https://git.steadman.io/podiant/django-asyncviews/badges/master/coverage.svg)Asynchronous JSON/HTML view library## QuickstartInstall Django AsyncViews:```shpip install django-asyncviews```Add it to your `INSTALLED_APPS`:```pythonINSTALLED_APPS = (...'asyncviews',...)```Add AsyncViews' URL patterns:```pythonfrom asyncviews import urls as asyncviews_urlsurlpatterns = [...url(r'^', include(asyncviews_urls)),...]```## Running testsDoes the code actually work?```coverage run --source asyncviews runtests.py```## CreditsTools used in rendering this package:- [Cookiecutter](https://github.com/audreyr/cookiecutter)- [`cookiecutter-djangopackage`](https://github.com/pydanny/cookiecutter-djangopackage)
Package: django-atc-demo-ui
# ATC DEMO UIDjango ATC Demo UI is a Django app that allow to modify traffic shaping applied to a device via a Web UI.Even though it is a Django app, `ATC Demo UI` is mostly a [React](http://facebook.github.io/react/) application that uses [Bootstrap](http://getbootstrap.com/) to make the app responsive.## Requirements* [Django 1.10](https://github.com/django/django)* [atc_api](../django-atc-api)`ATC Demo UI` depends on `ATC API` so make sure you have installed and configured the [ATC API](../django-atc-api) first.## InstallationThe easiest way to install `django-atc-demo-ui` is to install it directly from [pip](https://pypi.python.org/pypi).### From pip```bashpip install django-atc-demo-ui```### From source```bashcd path/to/django-atc-demo-uipip install .```## Configuration1. Add `atc_demo_ui` and its dependencies to your `INSTALLED_APPS`' `settings.py` like this:```pythonINSTALLED_APPS = (...'bootstrap_themes','django_static_jquery','atc_demo_ui',)```2. Include the `atc_demo_ui` URLconf in your project `urls.py` like this:url(r'^atc_demo_ui/', include('atc_demo_ui.urls')),If you want to have `/` redirecting to `/atc/demo_ui`, you can update `urls.py````python...from django.views.generic.base import RedirectViewurlpatterns = [......url(r'^atc_demo_ui/', include('atc_demo_ui.urls')),url(r'^$', RedirectView.as_view(url='/atc_demo_ui/', permanent=False)),]```3. Start the development server```bashpython manage.py runserver 0.0.0.0:8000```4. Visit http://127.0.0.1:8000/atc_demo_ui to access ATC Demo UI.Some settings like the REST endpoint can be changed in your Dkango project'settings.py:```pythonATC_DEMO_UI = {'REST_ENDPOINT': '/api/v1/',}```see [ATC Demo UI settings](atc_demo_ui/settings.py) for more details.
Package: django-atc-profile-storage
# ATC Profile StorageATC Profile Storage is a Django app that allows to store predefined ATC profiles in DB.## Requirements* [Django 1.10](https://github.com/django/django)* [atc_api](../django-atc-api)`ATC Profile Storage` depends on `ATC API` so make sure you have installed and configured [ATC API](../django-atc-api) first.## InstallationThe easiest way to install `django-atc-profile-storage` is to install it directly from [pip](https://pypi.python.org/pypi).### From pip```bashpip install django-atc-profile-storage```### From source```bashcd path/to/django-atc-profile-storagepip install .```## Configuration1. Add `atc_profile_storage` to your `INSTALLED_APPS`' `settings.py` like this:```pythonINSTALLED_APPS = (...'atc_profile_storage','rest_framework',)```2. Include the `atc_profile_storage` URLconf in your project `urls.py` like this:```python...url(r'^api/v1/profiles/', include('atc_profile_storage.urls')),...```3. Migrate the Django DB:```bashpython manage.py migrate```4. Start the development server```bashpython manage.py runserver 0.0.0.0:8000```5. Visit http://127.0.0.1:8000/api/v1/profiles .
Package: django-athm
django-athmVer este README en español:README_ES.mdFeaturesPersist itemized transaction data as well as client information in your own database.The customizableathm_buttontemplate tag provides convenient access to the ATH Móvil Checkout button.Import your existing transactions from ATH Móvil using theathm_syncmanagement command.Various signals can be used to get notified of completed, cancelled or expired transactions.Refund one or more transactions through the Django Admin.DocumentationFor information on installation and configuration, see the documentation at:https://django-athm.github.io/django-athm/Local testing with coverageAssuming you've already installed all the packages, you can run the following command in the project root folder:DJANGO_SETTINGS_MODULE=tests.settingspytest--covdjango_athmLegalThis project isnotaffiliated with or endorsed byEvertec, Inc.orATH Móvilin any way.Dependencieshttpxfor performing network requests to the ATH Móvil APIphonenumberslitefor validating and parsing client phone numbersReferenceshttps://github.com/evertec/athmovil-javascript-apihttps://github.com/evertec/athmovil-webhookshttps://docs.djangoproject.com/en/4.1/ref/csrf/#ajaxhttps://docs.djangoproject.com/en/4.1/howto/custom-template-tags/
Package: django-atlas
django-atlas===============Geolocation models, data and tools using GeoDjangoRequirements------------The following were used for development/testing:1. Django 1.32. PostgreSQL 9.13. PostGIS 1.5.24. SQLite 3.7.95. libspatialite36. django-photologue 2.7 (fork maintained by Praekelt at https://github.com/praekelt/django-photologue)7. django-category 0.1 (at https://github.com/praekelt/django-category)8. django-tastypie 0.9.119. libgeoip1 1.4.8You might need to apply a PostGIS patch to Django that can be found here: https://code.djangoproject.com/ticket/16778. If you get a database encoding error when loadinginitial data, your version of Django has not been patched. You can also use SQLite and MySQL with django-atlas, although MySQL is very lacking in terms of GIS.Add the following to your INSTALLED_APPS:1. django.contrib.gis2. django.contrib.admin3. atlas4. photologue5. category6. tastypieGeoDjango has some additional installation requirements. They can be found here: https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/.Follow those instructions and create a spatial database. Then add it to the DATABASES dictionary in your settings as the default database.::DATABASES = {'default': {'ENGINE': 'django.contrib.gis.db.backends.postgis','NAME': 'demo_geo','USER': 'demo','PASSWORD': 'demo','HOST': 'localhost','PORT': '',}}Atlas uses MaxMind's IP geolocation library and datasets. The following settings need to be included for this to work:::GEOIP_PATH = '.../django-atlas/atlas/datasets/MaxMind/'GEOIP_CITY = 'GeoLiteCity.dat'GEOIP_COUNTRY = 'GeoIPv6.dat'You can also add a Google Maps API key setting (see below). This will enable the LonLatWidget to use Google Maps for selecting coordinates.::DJANGO_ATLAS = {'google_maps_api_key': 'XXX...',}Datasets--------The geo data required by django-atlas can be downloaded at https://github.com/downloads/praekelt/django-atlas/data_postgresql.tbz2 for PostgreSQL orhttps://github.com/downloads/praekelt/django-atlas/data_mysql.tbz2 for MySQL. Extract data.sql and load the data using ``psql -U user -W -d demo_geo < data.sql`` for PostgreSQL, or ``mysql -u user -p -D demo_geo < data.sql``for MySQL.MaxMind's IP geolocation datasets are available at http://www.maxmind.com/download/geoip/database/. MaxMind updates these datasets on a regular basis.Authors=======Praekelt Foundation-------------------* Rizmari Versfeld
Package: django-atlassian
Django-atlassian allows you to build a Atlassian Connect apps using Django, it includes:JWT supportJira’s django db backendConfluence’s django db backendInstallationDownload and install usingpip installdjango-atlassina$pipinstalldjango-atlassianExample ConfigurationBackend modeDATABASES={'jira':{'ENGINE':'django_atlassian.backends.jira','NAME':'https://your-site.atlassian.net','USER':'',# Your user'PASSWORD':'',# Your password'SECURITY':'',},DATABASE_ROUTERS=['django_atlassian.router.Router']Application modeIn this mode, you setup a database configuration to connect to a specific Jira/Confluence
cloud instance. All custom fields will be automatically introspected.Setup the router to make the connected host model be accessed through their own database:DATABASE_ROUTERS=['django_atlassian.router.Router']ALLOWED_HOSTS=['<ID>.ngrok.io']Create a basicatlassian-connect.jsontemplate file:{"name":"<Your app name>","description":"<Your app description>","key":"<Your app private key>","baseUrl":"<Your host set on ALLOWED_HOSTS>","vendor":{"name":"<Your company>","url":"<Your website>",},"authentication":{"type":"jwt"},"lifecycle":{"installed":"{% url 'django-atlassian-installed' %}"},"scopes":["read","write"],"apiVersion":1,"modules":{}}ContributingIf you’d like to contribute, the best approach is to send a well-formed pull
request, complete with tests and documentation. Pull requests should be
focused: trying to do more than one thing in a single request will make it more
difficult to process.ReferencesDatabase implementation:https://simpleisbetterthancomplex.com/media/2016/11/db.pdfDynamic model field injection:http://blog.jupo.org/2011/11/10/django-model-field-injection/https://github.com/Zagrebelin/smyt_test/tree/master/msythttps://code.djangoproject.com/wiki/DynamicModelshttp://lazypython.blogspot.com/2008/11/django-models-digging-little-deeper.htmlhttps://code.djangoproject.com/ticket/22555https://stackoverflow.com/questions/2357528/explanation-of-contribute-to-classhttps://code.djangoproject.com/wiki/DevModelCreation
Package: django-atom
=============================django-atom=============================.. image:: https://badge.fury.io/py/django-atom.png:target: https://badge.fury.io/py/django-atom.. image:: https://travis-ci.org/ad-m/django-atom.png?branch=master:target: https://travis-ci.org/ad-m/django-atomA different stuff for Django to faster make a world a better place.Documentation-------------The full documentation is at https://django-atom.readthedocs.org.Quickstart----------Install django-atom::pip install django-atomThen use it in a project::import atomExtensions----------slugify#######Example usage in ``settings.py`` add.. code:: pythonAUTOSLUG_SLUGIFY_FUNCTION = 'atom.ext.slugify.slugifier.ascii_slugify'Required ```unicode-slugify```, ```django-autoslug```.History-------0.1.0 (2015-08-01)##################* First release on PyPI.0.2.0 (2015-08-04)##################* Added AutocompleteChoiceFilter* Add CSS-class settings for CrispyFormFilter* Drop strict requirements for django-tinycontent0.3.0 (2015-08-04)##################* Split class to independent package to resolve dependencies issues0.6.0 (2015-10-25)##################* A lot0.10.0 (2015-11-21)###################* Add asci_slugifier* Add absolute_import to crispy_forms0.11.0 (2015-12-10)###################* Fix support of dj19 by autocomplete_light API changes0.12.0 (2016-12-4)##################* Add ``atom.ext.guardian.tests.PermissionStatusMixin``0.12.8 (2016-12-16)###################* Mark code as Python 3 compatible0.14.0 (2017-06-1)##################* Add ``atom.mixins.AdminTestCaseMixin``0.14.1 (2017-06-1)##################* Add base class validation in ``atom.mixins.AdminTestCaseMixin``0.14.2 (2017-06-1)##################* Fix username and message in ``atom.mixins.AdminTestCaseMixin``0.14.3 (2017-06-1)##################* Fix django 1.8-1.9 compatibility of ``atom.mixins``0.15.0 (2017-07-21)###################* Add management command ``generate_factory``, ``generate_routers``, ``generate_serializers``, ``generate_viewsets``, ``generate_viewsets_tests``* Add serializer ``atom.ext.contenttypes.ContentTypeSerializer`` , ``atom.ext.sites.serializer.SiteSerializer``* Add mixin ``atom.ext.rest_framework.ViewSetTestCaseMixin``0.15.1 (2017-08-4)##################* Fix management commands import0.15.2 (2017-08-4)##################* Fix README.rst format0.15.3 (2017-08-4)##################* Fix HISTORY.rst format0.16.0 (2017-09-23)###################* Add ``atom.ext.guardian.views.RaisePermissionRequiredMixin``* Add ``atom.ext.guardian.views.AttrPermissionRequiredMixin``0.16.1 (2017-09-24)##################* Fix ``redirect_unauthenticated_users`` support in ``atom.ext.guardian.views``
Package: django-atomic-celery
Don’t Use This PackageThis library usesdjango-atomic-signals. Unfortunately this is not a great way of achieving “don’t run this code
until the transaction commits” any more. There is plenty of extra description ondjango-atomic-signals’ README, and also on the similar librarydjango-transaction-signals, by Django core developer
Aymeric.If you want a supported method of executing a celery task on commit, then:on Django >= 1.9, use the built-inon_commithookon Django < 1.9, usedjango-transaction-hooks(the original source of 1.9’son_commit)Both give examples with celery tasks so you are in good hands.If your project is still using this library, please migrate. You will need to removedjango-atomic-signalsas well asdjango-atomic-celery.The current version ofdjango-atomic-celery, 2.0.0, simply errors upon import, directing you here.
Package: django-atomic-dispatch
Don’t Use This LibraryThis library usesdjango-atomic-signals. Unfortunately that library is deprecated, and is a bit too hacky. There is
plenty of extra description why ondjango-atomic-signals’ README, and also on the similar
librarydjango-transaction-signals, by Django core developer Aymeric.If you want a supported method of executing a signal dispatch only when the current transaction commits, then:on Django >= 1.9, use the built-inon_commithookon Django < 1.9, usedjango-transaction-hooks(the original source of 1.9’son_commit)Both give examples so you are in good hands. In most cases you will just need to use a regular signal and make itssend()happen inside a lambda that is passed toon_commit.If your project is still using this library, please migrate. You will need to removedjango-atomic-signalsas well asdjango-atomic-dispatch.The current version ofdjango-atomic-dispatch, 2.0.0, simply errors upon import, directing you here.
Package: django-atomic-migrations
Django Atomic MigrationsThis small package ensures that Django's migration tracking model has an
unique index for applied migrations.Django ticketUsageInstall the package:$pipinstalldjango-atomic-migrationsThen, add the application toINSTALLED_APPSin your Django project:INSTALLED_APPS = [
	...
	'django_atomic_migrations.AtomicMigrations',
	...
]If your project's database already exists, you should run$pythonmanage.pyadd-migrations-constraintto create the missing unique constraint.
Package: django-atomic-signals
Don’t Use This PackageWhen this library was created, there was an unmet demand for its main use case: being able to run code when the current
transaction commits, and only if it commits. However, signals are not the best way to do this, as Django core developer
Aymeric Augustin has covered on hisdjango-transaction-signalsproject (which is very similar to this one). You can read
more explanation and history there.If you want a supported method of running a function on commit, then:on Django >= 1.9, use the built-inon_commithookon Django < 1.9, usedjango-transaction-hooks(the original source of 1.9’son_commit)For other usecases, read Aymeric’s description of possible solutions.If your project is still using this library, please migrate.The current version ofdjango-atomic-signals, 2.0.0, simply errors upon import, directing you here.
Package: django-attachments-management
Django application to manage attached files to any django model.Installpipinstalldjango_attachments_managementConfigureAdd‘django_attachments’toINSTALLED_APPS.UsageAddGalleryFieldorLibraryFieldto django model.fromdjango.dbimportmodelsfromdjango_attachments.fieldsimportLibraryField,GalleryFieldclassArticle(models.Model):title=models.CharField(max_length=100)attachments=LibraryField(related_name='articles_with_attachment',on_delete=models.CASCADE)gallery=GalleryField(related_name='articles_with_gallery',on_delete=models.CASCADE)UseAttachmentsAdminMixinto enable attachments in admin interface.fromdjango.contribimportadminfrom.modelsimportArticlefromdjango_attachments.adminimportAttachmentsAdminMixinclassArticleAdmin(AttachmentsAdminMixin,admin.ModelAdmin):passadmin.site.register(Article,ArticleAdmin)Screenshots