Saravanan666/pypi-org huggingface dataset:
Package: django-utmcollector
Polls is a simple Django app to conduct Web-based polls. For each
question, visitors can choose between a fixed number of answers.Detailed documentation is in the “docs” directory.Quick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'polls',
]Include the polls URLconf in your project urls.py like this:url(r'^polls/', include('polls.urls')),Runpython manage.py migrateto create the polls models.Start the development server and visithttp://127.0.0.1:8000/admin/to create a poll (you’ll need the Admin app enabled).Visithttp://127.0.0.1:8000/polls/to participate in the poll.
Package: django-uuid-contour
Django UUID Contour Field by japrogramerGeneral commands affected by apps.pyuse label for ./manage migrate and other management commands other than testlabel = 'UUIDContour'use name for running testsname = 'uuid_contour'Use cases:This package provides 4 variations of uuid, (1,3,4,5)The Default is 4the immutable option equall to True is equivalent of this options being setkwargs['unique'] = Truekwargs['blank'] = Truekwargs['editable'] = FalseTo use the uuid1 define a field in your model like thisfrom uuid_contour.fields import UUIDContourclass UUID1Contour(models.Model):username = models.CharField(max_length=40)uu = UUIDContour(standard=1)To use ittt = uuid.uuid1([node[,clock_seq]])# The argument passed to the UUIDContour field can be either a uuid.UUID# or a str representation of a uuid with or without hyphensgermane = UUID3Contour._default_manager.create(username='something', uu=tt)You can use bytes to define a UUIDContourtt = b'\x81[\xb5~\xbc\xa9G6\x80WvIU\x92\xbc\x1e'germane = UUID1Contour._default_manager.create(username='uuid4',uu=tt)This standard can also take two additional arguments related to uuid1uu = UUIDContour(standard=1, node=None, clock_seq=None)To use the uuid3,5 provide standard 3 or 5class UUID5Contour(models.Model):username = models.CharField(max_length=40)uu = UUIDContour(standard=5)To use itusername = 'some value'tt = uuid.uuid5(uuid.NAMESPACE_DNS, username)germane = UUID1Contour._default_manager.create(username=username,uu=tt)To filter by a uuid, you can use a uuid.UUID instance or string version of theuuid with or without hyphensclass UUID4Contour(models.Model):username = models.CharField(max_length=40)uu = UUIDContour(immutable=True)And to query by a uuidtt = uuid.uuid4()o_uuid = tt.hexpertinent = UUID4Contour._default_manager.get(uu__exact=o_uuid)Verifying uuids: if you are allowing a user to set a uuid field, uuid contourprovides to regex to match hypenated and unhyohenated uuid str they are phand pu respectively, they can be crafted into your forms validation
Package: django-uuidfield
Provides a UUIDField for your Django models.InstallationInstall it with pip (or easy_install):pip install django-uuidfieldUsageFirst you’ll need to attach a UUIDField to your class. This acts as a char(32) to maintain compatibility with SQL versions:from uuidfield import UUIDField

class MyModel(models.Model):
    uuid = UUIDField(auto=True)Check out the source for more configuration values.Enjoy!
Package: django-uuid-pk
django uuidfield that can be used as primary keyThe reason of this project is that any other UUDField implementation that I found
does not reflect the expected behaviour when used as primary-key,
if the save() fails for any reason the value of the field persist so that checkingobj.pkcannot be used anymore to check if the object is stored or not.The code is mainly based on the dcramer’s implementation that can be found athttps://github.com/dcramer/django-uuidfield
Package: django-uuid-primary-key
=====Django UUID Primary Key=====Django UUID Primary Key is a simple Django model utility which provides to store primary key id as uuid.Detailed documentation is in the "docs" directory. [Todo: docs directory]Quick start-----------Install package::pip install django-uuid-primary-keyAdd "django_uuid_primary_key" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'django_uuid_primary_key',]
Package: django-uuidstore
A small Django app providing project-wide issue and storage of UUIDs.Although this is very much a work in progress, I’ve made a start on thedocumentation at readthedocs.orgDependenciesUID-Store currently depends ondjango-extensions.InstallationUse your favorite Python installer to install it from PyPI:$ pip install django-uuidstoreOr get the source from the application site:$ hg clone https://bitbucket.org/mhurt/django-uuidstore
$ cd django-uuidstore
$ python setup.py installConfigurationAdd'uuidstore'to yourINSTALLED_APPSsetting like this:INSTALLED_APPS = {
  ...
  'uuidstore'
}For Django 1.7 users, runpython manage.py migrateto create the
models. Otherwise simply runpython manage.py syncdb.Getting StartedFirst you’ll need to register your model with uuidstore:# models.py
...
...
import uuidstore.registry import register
register(MyModel)From this point onwards each time a MyModel instance is saved uuidstore will
detect it and, if create new ObjectUUID instance containing a UUID relating
your model instance.Release NotesDropped dependency on django-uuid-pk. Now we use the UUIDField from django-extensions.Added migrations for Django 1.7+ and South.Documentation updates.Added basic tests.
Package: django-uuid-upload
django-uuid-uploadLibrary for Django that automatically stores uploaded files asmydir/{uuid}.jpgormydir/{uuid}/original.jpg.Installationpip install django-uuid-uploadUsagefromdjango.dbimportmodelsfromdjango_uuid_uploadimportupload_to_uuidclassPost(models.Model):# Store uploaded files as posts/{uuid}.jpgimage=models.ImageField(upload_to=upload_to_uuid('posts'))# Or, store uploaded files as posts/{uuid}/original.jpgimage=models.ImageField(upload_to=upload_to_uuid('posts',make_dir=True))
Package: django-uuid-upload-path
django-uuid-upload-pathgenerates 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-uuid-upload-path release and copy or symlink theuuid_upload_pathdirectory into yourPYTHONPATH.  If using pip, runpip installdjango-uuid-upload-path.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-uuid-upload-path 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.More informationThe django-uuid-upload-path project was developed by Dave Hall. You can get the
code from thedjango-uuid-upload-path project
site.Dave Hall is a web developer, based in Cambridge, UK. You can
usually find him on the Internet in a number of different places:WebsiteTwitterGoogle Profile
Package: django-uw-graphene
Django UW GrapheneDescriptionThis package extends thegraphene-djangointerface for a streamlined query and mutation integration.InstallationInstall:pip install django-uw-grapheneadd to INSTALLED_APPS:INSTALLED_APPS=[...'uw_graphene',]DetailsSome API design decisions:Based onRelaytotalCountwas implemented as an ExtendedConnectionA base interface for CRUD mutations was implemented:GlobalId to Instance "auto fetching", including custom resolversNull value handlingCustom error handlingDocumentationThis library is intended to be used on top ofgraphene-django, here are some useful links:graphene-djangographeneRelayA More extensive documentation is availablehere.TODOReviewtest_utils
Package: django-uwkhtmltopdf
A simple Django app to generate pdfs from templates using wkhtmltopdf.The code is basically a fork of django-xhtml2pdf that uses wkhtmltopdf to avoid xhtml2pdf shortcomings.Please note that the app is thought to be simple not feature rich.UsageIn settings.py:WKHTMLTOPDF_CMD = ‘/path/to/wkhtmltopdf’In views.py:from django_uwkhtmltopdf.utils import generate_pdfdef myview(response):resp = HttpResponse(content_type=’application/pdf’)
result = generate_pdf(‘my_template.html’, file_object=resp)
return result
Package: django-uws
Django Universal Worker ServiceDjango implementation of the IVOA UWS pattern.The Universal Worker Service (UWS) pattern defines how to manage asynchronous execution of jobs on a service. Any application of the pattern defines a family of related services with a common service contract. Possible uses of the pattern are also described.Url:https://www.ivoa.net/documents/UWS/DOI: 10.5479/ADS/bib/2016ivoa.spec.1024HInstallationDjango UWS is available via Pypi:pipinstalldjango-uwsDjango Quick startadduwsto yourINSTALLED_APPSsetting likes this:INSTALLED_APPS=[...'uws',...]Additionally you may want to set the following settings:CELERY_TIMEZONE="Europe/Amsterdam"CELERY_USE_UTC=True# Recommended to use an environment variable to set the broker URL.CELERY_BROKER_URL=os.getenv("CELERY_BROKER_URL","amqp://guest@localhost:5672")Include the uws URLconf in your project urls.py like this:...path('uws/',include('uws.urls')),# 'uws/' can be replaced by the name of your service if necessary....Runpython manage.py migrate uwsto create the UWS models.
Optionally:python manage.py migrate uws --database uwsby specifyingDATABASE_ROUTERS=[..."uws.database_router.UWSDatabaseRouter",...]and a `uws` entry in your `DATABASES` settingAdd Celery configuration
Create acelery.pyfile in the Django<project>folder (next tosettings.py,wsgi.pyetc.) with the following content:importosfromceleryimportCelery# Set the default Django settings module for the 'celery' program.os.environ.setdefault("DJANGO_SETTINGS_MODULE","project.default_settings")app=Celery("project")# Change to something related to your Serviceapp.config_from_object("django.conf:settings",namespace="CELERY")app.autodiscover_tasks()Worker configurationThe worker configuration still uses a Django project layout and can be merged with an existing Django application serving the API or as a standalone worker instance. Setting it up is similar to the steps for the api:Create aworkers(or similarly named) directory to store the code for your workersCreate worker files. An example would be:fromuws.classesimportUWSJobfromuws.clientimportClientfromuws.workersimportWorkerclassEcho(Worker):"""A worker echoing all parameters"""def__init__(self):self._type="echo"defrun(self,job:UWSJob,job_token:str,client:Client)->None:data=[{"key":p.key,"value":p.value}forpinjob.parameters]client.add_results(job.jobId,data,job_token)Set the following Django settings (if not already present):CELERY_TIMEZONE="Europe/Amsterdam"CELERY_USE_UTC=TrueCELERY_BROKER_URL=os.getenv("CELERY_BROKER_URL","amqp://guest@localhost:5672")# Classes of available workersUWS_WORKERS=["workers.echo.Echo"]# Web path to UWS api, recommended to use an environment variableUWS_HOST=os.getenv("UWS_HOST","https://example.com/uws/")ContributingFor developer access to this repository, please send a message on theESAP channel on Rocket Chat.LicenseThis project is licensed under the Apache License version 2.0.
Package: django-uwsgi-admin
Django related examples/tricks/modules for uWSGI.Free software: MIT licenseInstallationpip install django-uwsgi-adminYou can also install the in-development version with:pip install https://github.com/ionelmc/django-uwsgi-admin/archive/master.zipDocumentationhttps://django-uwsgi-admin.readthedocs.io/Screenshotsdjango-debug-toolbarpanelWagtailadmin interface:django.contrib.admininterfaceDevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog2.0.1 (2023-01-13)UwsgiWorkersPanel no longer tries to generate stats if there’s no uwsgi.2.0.0 (2023-01-12)Removed the decorators module, something that only existed to avoid installing a separate package. Instead you should install the updateduwsgidecoratorspackage.Removeddjango_uwsgi.template.Loader(and the whole module) as it was broken and pretty hard to test without a custom build of uWSGI.Split all sections in the Status page into seperate admin pages: Actions, Applications, Jobs, Magic Table, Options, Status and Workers.Removed the old django debug toolbar and replaced with 2 new panes:django_uwsgi.panels.UwsgiWorkersPaneldjango_uwsgi.panels.UwsgiActionsPanel1.0.0 (2023-01-10)Removed therunuwsgimanagement command as it was very broken.
Yes, I’ve looked atdjango-uwsgi-ng(another fork, which has lots of changes for that command) and it’s still pretty unusable in general (expects a certain project layout,
and still generates weird if not broken configuration).Instead you should own your uWSGI configuration and not lets some tool generate it for you as some of the options have high impact on
the behavior and performance of uWSGI.Fixed stats page title.Made clear cache and reload actions be performed safely over POST requests (previously they were GET requests).0.3.0 (2023-01-09)Forked fromhttps://github.com/unbit/django-uwsgithis adds:Support for latest Django releases (3.2+).A basic integration test suite.Removed lots of old compat cruft.Integrated the uWSGI stats pane directly in the Django admin. Adding urls manually is no longer necessary.Removed the old wagtail-styled admin page (it was broken anyway).
Package: django-uwsgi-admin2
Fork ofhttps://github.com/unbit/uwsgi_djangowith better integration, packaging fixed etc etc …InstallationRunpip installdjango-uwsgi-admin2and adduwsgi_admintoINSTALLED_APPS. Thats it !NoteYou can also runpip install"django-uwsgi-admin2[uwsgi]"-uwsgiis not a mandatory dependency.Bonus: debug_toolbar uWSGIDebugPanelJust add'uwsgi_admin.panels.uWSGIDebugPanel'to yourDEBUG_TOOLBAR_PANELS.Eg:DEBUG_TOOLBAR_PANELS = (
    'debug_toolbar.panels.version.VersionDebugPanel',
    'debug_toolbar.panels.timer.TimerDebugPanel',
    'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel',
    'debug_toolbar.panels.headers.HeaderDebugPanel',
    'debug_toolbar.panels.request_vars.RequestVarsDebugPanel',
    'debug_toolbar.panels.sql.SQLDebugPanel',
    'debug_toolbar.panels.template.TemplateDebugPanel',
    'debug_toolbar.panels.cache.CacheDebugPanel',
    'debug_toolbar.panels.signals.SignalDebugPanel',
    'debug_toolbar.panels.logger.LoggingPanel',
    'uwsgi_admin.panels.uWSGIDebugPanel',
)Obligatory screenshotsAdminDebug Toolbar
Package: django-uwsgi-cache
uWSGI Django cache backend.Free software: BSD licenseInstallationpip installdjango-uwsgi-cacheand change settings to:CACHES = {
    'default': {
        'BACKEND': 'uwsgicache.UWSGICache',

        # and optionally, if you use a different cache name
        'LOCATION': 'foobar'
    }
}RequirementsDjango 1.4 or laterSettingsUWSGI_CACHE_FALLBACKFalse- raises Exception ifuwsgicannot be imported.True(default) - if uwsgi is not importable this cache backend will alias
to LocMemCache. Note that south or other mangement commands might try to load
the cache backend so this is why it’s the default.Changelog1.0.1 (2015-07-01)Stop depending explicitly onuwsgiinsetup.py(helps with development and such).1.0.0 (2014-12-10)Support for special timeout values in Django 1.6 and 1.7 (contributed by Laurent Payot)0.3.0 (2014-07-25)Python 3 support (contributed by Laurent Payot)Support forcache.clear(contributed by Omer Katz)0.? (?)N/A (contributed by Riccardo Magliocchetti)
Package: django-uwsgi-ng
django-uwsgiDjango related examples/tricks/modules for uWSGIForked from:https://github.com/unbit/django-uwsgiScreenshotsdjango-debug-toolbarpanelWagtailadmin interface:Emperor’s Vassal Admin Paneldjango.contrib.admininterfaceDocumentationRead the documentation at rtfd.orgContributorsSeeCONTRIBUTORSLicenseMIT
Package: django-uwsgi-spooler
A polyvalent Task model to get the most out of uWSGI’s spooler with minimal effort.InstallInstall django-threadlocals if you want automatic provisioning of Task.user and
Task.creation_ip.This app works without uwsgi installed (ie. runserver), but you can test your
wsgi app with a command like:uwsgi --env DEBUG=1 --spooler=/tmp/spool --spooler-processes 16 --http-socket=0.0.0.0:8000 --plugin=python --module=mrs.wsgi:application --honour-stdinAdddjango_uwsgi_spoolertoINSTALLED_APPSand execute migrations with
the./manage.py migratecommand.django_uwsgi_spooler.modelswill set uwsgi.spooler so you don’t have any
extra setup to do to enjoy uWSGI spooler, besides have it enabled if you want
tasks to actually run in the background.If you have CRUDLFA+ installed, it will register a CRUD for task, which will
gain a lot of features as we move forward to 1.0 release as you can imagine:
towards full control of the spooler as permited by uWSGI’s API.UsageYour callback is just a function that takes a task argument:def yourcallback(task):
    # do stuff ...You can start a task as such:Task(callback_name='yourmodule.yourcallback').spool()See a more elaborated example in django_uwsgi_spooler/example.py
Package: django-uzbplaces
=====UzbPlaces=====[![Documentation Status](https://readthedocs.org/projects/uzbplaces/badge/?version=latest)](http://uzbplaces.readthedocs.io/en/latest/?badge=latest)UzbPlaces is a simple Django app to integrate places in Uzbekistan. For eachprovince, there are regions.Detailed documentation is in the "docs" directory.Quick start-----------1. Add "uzbplaces" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'uzbplaces',]2. Add GEOPOSITION_GOOGLE_MAPS_API_KEY to your settings.py3. Add following to settings.py# Model TranslationMODELTRANSLATION_LANGUAGES = ('en', 'ru', 'uz')MODELTRANSLATION_ADMIN_SCRIPTS = ('http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js','http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js','modeltranslation/js/tabbed_translation_fields.js',)MODELTRANSLATION_ADMIN_STYLE = {'screen': ('modeltranslation/css/tabbed_translation_fields.css',),}4. Include the polls URLconf in your project urls.py like this::url(r'^uzbplaces/', include('uzbplaces.urls')),5. Run `python manage.py migrate` to create the polls models.6. Start the development server and visit http://127.0.0.1:8000/admin/(you'll need the Admin app enabled).7. Visit http://127.0.0.1:8000/uzbplaces/ to use.
Package: django-vacancies
VacanciesVacancies is a simple Django app to publish Web-based vacancies :)
For each vacancy, editors can choose between a various number of attributes.Detailed documentation is in the "docs" directory - one dayInstallpip install django-vacanciesQuick start1. Add "vacancies" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'vacancies',
        # or
        'vacancies.apps.VacanciesConfig', # <- prefered for localized app name
    ]

2. Include the vacancies URLconf in your project urls.py like this::

    path('vacancies/', include('vacancies.urls', namespace='vacancies')),

3. Run `python manage.py migrate` to create the vacancies models.

4. Start the development server and visit http://127.0.0.1:8000/admin/
   to create a vacancy (you'll need the Admin app enabled).

5. Visit http://127.0.0.1:8000/vacancies/ to view your wonderful vacancies.Admin IntegrationBy default django admin autodiscover is beeing used. If you have custom admin
site, register the vacancies models by yourself e.g.:# project/admin.pyfromdjango.contribimportadminfromdjango.contrib.auth.adminimportUser,UserAdmin,Group,GroupAdminfromdjango.utils.translationimportugettext_lazyas_...fromvacancies.adminimportVacancy,VacancyAdmin,ContactPerson,ContactPersonAdmin,Location,LocationAdminclassAdminSite(admin.AdminSite):site_title='My cool Admin'site_header=_('Database Interface')index_title=_('Administration')site=AdminSite()site.register(User,UserAdmin)site.register(Group,GroupAdmin)...site.register(Vacancy,VacancyAdmin)site.register(ContactPerson,ContactPersonAdmin)site.register(Location,LocationAdmin)CustomizeYou can create avacancies/vacancies_base.htmlBase Template to implement
you pug environemnt e.g.# vacancies/vacancies_base.html
{% extends "base.pug" %}DevelopmentContribute Locales# Inside cloned repository folder:mkdir.virtualenv&&python3-mvenv.virtualenv&&sv
pipinstalldjango
mkdirvacancies/locale/NEW_LOCALEcdvacancies
django-adminmakemessages--ignore=.virtualenv/*--ignore=fixtures/*--ignore=assets/*-a--no-location-ehtml,pug,py,txt# Use Po-Edit or other editor to edit localesPackage and Install Development Version# Inside cloned repository folder:# Adjust setup.cfgpythonsetup.pysdist# Inside Dev Project Apps Dir:ln-s../../django-vacancies/vacancies# Or:pipinstall--userdjango-vacancies/dist/django-vacancies-0.1.tar.gz
pipuninstalldjango-vacanciesDistribute# Inside cloned repository folder:pythonsetup.pysdist
twineupload--repository-urlhttps://upload.pypi.org/legacy/dist/*Credits:https://docs.djangoproject.com/en/2.2/intro/reusable-apps/https://djangosnippets.org/snippets/10643/
Package: django-vadmin
Your project description goes hereDocumentationThe full documentation is athttps://django-vadmin.readthedocs.io.QuickstartInstall django-vadmin:pip install django-vadminAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'vadmin',...)Add django-vadmin’s URL patterns:fromvadminimporturlsasvadmin_urlsurlpatterns=[...url(r'^',include(vadmin_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-11-17)First release on PyPI.
Package: django-vagrantize
# VagrantizeVagrantize is a simple Django app that adds a shortcut `run` managementcommand that will run the Django debug server on an externally visibleport. It is just a shortcut for Django's builtin `runserver` command thatis useful when doing development on a Django project using a Vagrant VM.It is basically just shorthand for `python manage.py runserver 0.0.0.0:8000`.## InstallationInstall using pip:```bashpip install django-vagrantize```## Quick Start1. Add "vagrantize" to your `INSTALLED_APPS`:```pythonINSTALLED_APPS = (...'vagrantize',)```2. Run the Django server using the `run` command:```bashpython manage.py run```Your application should be reachable at http://localhost:8000*on the host machine*.You may also specify an alternate port:```bashpython manage.py run 8080```