Saravanan666/pypi-org huggingface dataset:
Package: django-payu-api
PayU APIPayU API is a solution that allows you to make payments through the PayU payment gateway.RequirementsPayU API requires Python 2.7 or Python 3.3 or newer and Django 1.11.InstallationTo install payu-api, run the following command inside this directory::python setup.py installYou can also install the package with a symlink, so that changes to the source files will be immediately available to other users of the package on your system::python setup.py developIf you have the Pythoneasy_installutility available, you can also type the following to download and install in one step:easy_install intgr-payu-apiOr if you're usingpip:pip install intgr-payu-apiTo install payu-api from SVN directly:pip install -e svn+http://example.com/svn/intgr_bir_api/trunk#egg=bir_apior, if you need install from branch:pip install -e svn+http://example.com/svn/intgr_bir_api/branches/dev_0_2#egg=bir_apiOr if you'd prefer you can simply place the includedpayu_apidirectory somewhere on your python path, or symlink to it from somewhere on your Python path.AuthorsThis project was implemented byIntegree Bussines Solutionsfrom Warsaw, Poland
Package: django-payu-latam
# django-payu-latamdjango-payu-latam is a Django application for Payu. Currently only works for supported credit cards in the supported countries in Latam.Supported countries:
* Argentina
* Brazil
* Chile
* Colombia
* Mexico
* Panama
* Peru## Installing` pip installdjango-payu-latam`## Python libraryIf you want to use Payu in any Python script or web framework, we recommend you to use our python library:[payu-python](https://github.com/GearPlug/payu-python)## Usage## Requirements
* [Django](https://github.com/django/django)
* [payu-python](https://github.com/GearPlug/payu-python)## Contributing
We are always grateful for any kind of contribution including but not limited to bug reports, code enhancements, bug fixes, and even functionality suggestions.#### You can report any bug you find or suggest new functionality with a new [issue](https://github.com/GearPlug/django-payu-latam/issues).#### If you want to add yourself some functionality to the wrapper:
1. Fork it (https://github.com/GearPlug/django-payu-latam)
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am ‘Adds my new feature’)
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request
Package: django-pbx-admin
Pbx AdminDjango Printbox admin interfaceReleaseJust add tag with version number (ie. 1.2.3) to release.SettingsTo proper display error messages, you have to setup message tags like these.fromdjango.contribimportmessagesMESSAGE_TAGS={messages.DEBUG:'debug',messages.INFO:'info',messages.SUCCESS:'success',messages.WARNING:'warning',messages.ERROR:'danger',}CSS CompilingInstall SASS fromhttps://sass-lang.com/installRun ./scripts/css_compile.shLocal developmentActivate pbx2 viertual environmentInstall local django-pbx-adminpip install -e .Add project folder as content root (in PyCharm Settings > Project > Project Structure -> Add Content Root)
Package: django-pci-auth
django-pci-authWarningThis application validates passwords viaun-encrypted AJAXcommunication. Pleaseuse with SSL only!IntroductionProvides change password validation with AJAX support and history check.FeaturesChange password validation with AJAX via dajaxice.Password history check.Installation$ virtualenv .
$ bin/pip install django-pci-authCreditsOriginal funding for this project provided byAuric Systems International.Changes0.1.1 (2014-10-20)Set nolockout boolean default value to False0.1.0 (2014-10-13)Remove manage, settings, urls0.0.9 (2014-10-07)Rename GitHub organization from django-security to django-pci to emphasize focus on providing assistance with building PCI compliant websites with Django.0.0.8 (2014-10-06)Clean up0.0.7 (2014-10-06)Move demo to django-pciAdd pytz depAllow the use of a custom user model
[daniell]0.0.6 (2012-12-05)Add a note re: SSL0.0.5 (2012-12-04)Feature complete0.0.4 (2012-11-28)Pre-release, includes most features promised.
Package: django-pde
quick setuppipinstalldjango-pde;pipinstallhttps://github.com/danleyb2/django-pde/archive/master.zip# from srcdjango-adminstartprojectmyproject;cdmyproject;pythonmanage.pystartappmyapp;# add pde to INSTALLED_APPSpythonmanage.pypde-nmyapp;#creates a new package for myapp
Package: django-pdf-download
## What is thisThis is a class based mixin to download a class based view as a PDF.The PDF is generated with firefox and selenium **(tested on ubuntu 14.04 LTS)**.This is not really performant but generates good PDF's with selectable text.This is how this is done:## Example usage:```pythonclass InvoiceDetail(PdfDownloadMixin, TemplateView):template_name = "invoice_print.html"# PDF mixin attributespdf_filename = 'invoice.pdf'```## Options:**pdf_filename**The filename of the PDF file download.Default: *download.pdf***pdf_folder**The folder where the pdf files are saved.Default: *'/tmp/'***pdf_remove_file**If true then created files are removed after creation.Default: *True***pdf_authenticate**Authenticate the request to fetch the webpage for print *(current user of PDF download request is used)*Default: *True***pdf_load_time**Default: *2* seconds**pdf_get_param**GET parameter to indicate file should be downloaded as pdf: *(Example: http://mysite.com/mypage/?pdf willl download page as PDF)*Default: *'pdf'*## Installation```$ pip install django-pdf-download```System requirements tested on (ubuntu 14.04):```sudo apt-get install firefox xvfb cups-pdf```*cups-pdf* is only used once to setup headless printing (quirk in firefox you can not save as PDF unless you printed via another printer at least once).You can do this by running the following command (available after installation of the package):```$ activate_headless_print```
Package: django-pdfgen
Wrapper around reportlabhttp://www.reportlab.com/that provides an alternative syntax.Reportlab uses a XML dialect called RML. Django-pdfgen supports two languages that generate RML,
a more plain-text styled language and an XML like language.A cheat Sheet for the XML-style language:https://www.dropbox.com/s/gv86h2uu2l5awqi/sheet.pdf
Package: django-pdfkit
Django view that converts HTML to PDF using webkit - viapdfkitandwkhtmltopdf.PrerequisitesYou need to installwkhtmltopdf.The versions in Debian/Ubuntu repositories (installed usingapt-getinstall wkhtmltopdf)
have reduced functionality and you will most likely want to install one of the
stable binaries provided athttp://wkhtmltopdf.org/downloads.htmlwhich provide
increased functionality (headless, patched Qt, better rendering support).Installation of the pre-compiled binaries on Ubuntu is as simple as;wgethttp://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xztar-xfwkhtmltox-0.12.3_linux-generic-amd64.tar.xzsudocp-rwkhtmltox/*/usr/Installpipinstalldjango-pdfkitUsageSimply use the class basedPDFViewwhich is a drop in replacement forTemplateView.# urls.pyfromdjango_pdfkitimportPDFView...url(r'^my-pdf/$',PDFView.as_view(template_name='my-pdf.html'),name='my-pdf'),...Then in your browser gotohttp://localhost:8000/my-pdf/and it will magically
render as a PDF.See thedocsfor more information.AuthorAlex Hayes <alex@alution.com>
Package: django-pdf-reactor
What is Django PDF Reactor?Use PDFGen wrapper for Pyppeteer to create PDF files in Django. Support for async generation in Django Channels worker or with Django 3.1 async views.ChannelsMore about generating PDF in channels with Websocket support.Async viewMore about generating PDF in async viewStunnel SupportChromium will not visithttps://localhost:8000, so runbrew install stunnelAdd ssl_proxy filepid=
cert=/usr/local/etc/stunnel/stunnel.pem
foreground=yes
debug=7

[https]
accept=8000
connect=8001
TIMEOUTclose=1Startsudo stunnel ssl_proxySupport for PDF/AFor MacOSX:brew install poppler ghostscriptFor Ubuntu / Debian:apt-get install poppler ghostscriptA PDF/A document is just a PDF document that uses a specific subset of PDF that is designed to ensure it is 'self-contained'. It's not permitted to be reliant on information from external sources (e.g. font programs and hyperlinks).From wikipedia:Other key elements to PDF/A compatibility include:Audio and video content are forbidden.JavaScript and executable file launches are forbidden.All fonts must be embedded and also must be legally embeddable for
unlimited, universal rendering. This also applies to the so-calledPostScript standard fonts such as Times or Helvetica.Colorspaces specified in a device-independent manner.Encryption is disallowed.Use of standards-based metadata is mandated.Is it any good?Yes.CreditsPDFGen-PythonPyppeteer
Package: django-pdf-render
PDF Render is a Django app that provides functions to
render PDF files from Django templates.To do so, it bundles all files required for template rendering
and sends them to a separateserverfor processing. Using Chromium on a separate server ensures PDFs
that are consistent with browser-rendered templates.Quick startRun a pdf-render-server:docker run -p 3000:3000 kuboschek/pdf-render-serverAdd PDF_RENDER_SERVER to your settings:PDF_RENDER_SERVER = 'http://localhost:3000'Use the functions from ‘pdfrender’ to render PDFs in your views:pdfrender.render_to_bytes(template_name, context)
pdfrender.render_to_response(template_name, context, filename=None)
pdfrender.render_to_file(template_name, fp, context)
Package: django-pdfy
========================django-pdfy========================django-pdf lets you to render any view as pdf, css and images are also availablein your templates... image::https://secure.travis-ci.org/rochapps/django-pdfy.png:alt: Build Status:target: https://secure.travis-ci.org/rochapps/django-pdfRequirements============1. django>=1.32. xhtml2pdf==0.0.55. mock (for testing)Install=======Use pip to install::pip install django-pdfyQuick start===========1. Define ``STATIC_ROOT`` and ``STATIC_URL`` in your settings.py file.2. Subclass RenderPDF, set the ``template_name`` attribute.For example, in myapp/views.py::from myapp.models import Transactionfrom pdfy.views import RenderPDFfrom django.views.generic import ListViewclass TransactionListView(RenderPDF, ListView):template_name = 'mypdf.html'model = TransactionIn myapp/urls.py::from myapp.views import TransactionListViewurlpatterns = patterns('',url(r'^transactions/$', TransactionListView.as_view()),)Running the Tests------------------------------------You can run the tests with via::python setup.py testor::python runtests.pyLicense--------------------------------------django-secure-input is released under the BSD License. See the`LICENSE <https://github.com/rochapps/django-pdf/blob/master/LICENSE>`_ file for more details.Contributing--------------------------------------If you think you've found a bug or are interested in contributing to this projectcheck out `django-pdfy on Github <https://github.com/rochapps/django-pdfy>`_.Development sponsored by `RochApps, LLC<http://www.rochapps.com/services>`_.
Package: django-pedant
# django-pedantMake Django templates fail fast on a variety of errors.<img src="vote_pedant.jpg" alt="This image is slightly off center."/><br><sub>Source: [Flickr:karen_od](https://www.flickr.com/photos/karen_od/33199)</sub>It's happened to all of us. We forget a template variable in a context, orhave a bug in a property accessed in a template. Django, a battle-forged webframework, was designed to **serve the damn webpage no matter what**, much tothe chagrin of web developers who have found easily fixable bugs going unfixedfor months. It's the worst. It's literally like getting stabbed in the back and left tobleed out, muttering "Et tu, Django?" with your last breaths. *Literally.* It'sthat bad.Enter django-pedant, the pedantic template renderer's friend.## What is this package pedantic about?I think you mean "about what is this package pedantic?" Seriously, though, Djangois very lenient in at least the following ways:- Exceptions raised in computing `{% if expression %}` expressions other builtin tags.In general, errors in custom tags are allowed to propagate.- `KeyError` and `AttributeError` in `{{ context_variable }}` expressions.- `UnicodeDecodeError` is caught in some places and replaced with `''` (TODO)- In evaluating `{{ expr|filter }}` expressions, `FilterExpression.resolve` has`ignore_failures=True` in some case, which swallows `VariableDoesNotExist` errors.## UsageTo decorate your view which might hide template failures, simply do:```pythonfrom pedant.decorators import fail_on_template_errors@fail_on_template_errorsdef my_view(request):# [...]return render_to_string('foo.html')```If there are errors in `foo.html`, the view will now raise a `PedanticTemplateRenderingError`if there were any errors in rendering the template that Django swallows.To simply *log* if there are template failures, you can use the `log_on_template_errors` decorator:```pythonimport loggingfrom pedant.decorators import log_on_template_errorslogger = logging.getLogger('myapp.views')@log_on_template_errors(logger, log_level=logging.INFO)def my_view(request):# [...]return render_to_string('foo.html')```This will log template errors to the `myapp.views` logger at `INFO`. The default log levelis `logging.ERROR`.For using pedantic rendering in your view tests, you can simply inherit from `PedanticTestCase`:```pythonfrom django.template import Template, Contextfrom pedant.utils import PedanticTestCaseclass TestBuggyTemplate(PedanticTestCase):def test(self):Template('{{ foo }}').render(Context({'bar': 'baz'}))```That test will fail since `foo` is undefined in the template. `PedanticTestCase` inherits fromthe standard Django `TestCase`. `PedanticTestCaseMixin` is also provided if you don't want toincur the transactional overhead of Django's test case (e.g. for unit tests).## Test```sh$ tox```
Package: django-pell
Django PellCustom django widget built onpell.UsageclassEditorForm(forms.Form):"""Simple form which exposes the Django Pell Widget."""editor=forms.CharField(widget=PellWidget(),help_text='Pell is "the simplest and smallest WYSIWYG text editor for web, with no dependencies"',label=False,)defeditor_view(request):"""Simple view which renders the EditorForm."""returnrender(request,"editor.html",context={"form":EditorForm()},)<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>Document</title></head>{{ form.media }}<body>{{ form.as_p }}</body></html>For a complete example check out theexampleincluded in this repo.
Package: django-people
A simple app to show person profiles, for example for the “About us” section
of a website.Comes with a django-cms plugin and is multilingual.InstallationIf you want to install the latest stable release from PyPi:$ pip install django-peopleIf you feel adventurous and want to install the latest commit from GitHub:$ pip install -e git://github.com/bitmazk/django-people.git#egg=peopleAddpeopleto yourINSTALLED_APPS:INSTALLED_APPS = (
    ...,
    'cms',
    'menus',
    'treebeard',
    'filer',
    'easy_thumbnails',
    'people',
)Run the migrations:./manage.py migrate peopleUsageUse the Django admin to create your person objects. If you are using django-cms
you can use thePerson Pluginto display a person in your placeholders.SettingsPERSON_PLUGIN_DISPLAY_TYPE_CHOICESDefault:[
    ('small', _('small')),
    ('big', _('big')),
]When using thePerson Pluginin your django-cms placeholders you will
notice that you only have two choices for theDisplay type. This field
can be helpful when you want to render a person differently in different parts
of your site. If you need even more display types, just set this setting to
a different list of tuples.RoadmapCheck the issue tracker on github for milestones and features to come.
Package: django-peppered-passwords
Django peppered passwordsAdds a secret private key to the hashed passwords created with django.contrib.auth.ConfigurationDefine a secret in your project's settings.PEPPERED_PASSWORDS_SECRET_KEY = 'b04ab0b2d1e69cfa54f49f348c3388c2e6017cae6c5aefa4'Do not use the secret key in example. Create your own.Create a secret key by using python's builtin secret module.>>> import secrets
>>> secrets.token_bytes(32).hex()Add the hasherPASSWORD_HASHERSin your projects settings file.PASSWORD_HASHERScomes from Django.PASSWORD_HASHERS = [
  "django_peppered_passwords.hashers.PepperedPBKDF2PasswordHasher"
]Please take it to the consideration, this is an irreversible action. Switching from peppered hashing to Django's default hasher is not possible.Once you update the secret key, all the passwords will be broken. The users will need to reset their passwords via email.BackgroundCurrently a user's password stored in database in this format:<algorithm>$<iterations>$<salt>$<hash>Hash (Last column) is the password hashed with the salt in previous column. Example, these are two computed passwords, stored on database, for the same password of two users.pbkdf2_sha256$600000$fb9cUsHWK4EMZ7VWGBAcGD$2uwiVefFwanIhxLrv+/t3sKvP4X6tDKEMw/ysHD5dIc=
pbkdf2_sha256$600000$HgWHWrF2qQD9Owj4XeEkjY$rh0qzfo+/ZCzWbL9ZJa8aKhiO5xoEMfT4EtP/+A+LzI=The password is 123456. Imagine I am an attacker, who got the database of different django project, I want to look up the users who have chosen the password 123456. I have the salts of users stored in database.>>> make_password('123456', 'fb9cUsHWK4EMZ7VWGBAcGD')
pbkdf2_sha256$600000$fb9cUsHWK4EMZ7VWGBAcGD$2uwiVefFwanIhxLrv+/t3sKvP4X6tDKEMw/ysHD5dIc=
>>> make_password('123456', 'HgWHWrF2qQD9Owj4XeEkjY')
pbkdf2_sha256$600000$HgWHWrF2qQD9Owj4XeEkjY$rh0qzfo+/ZCzWbL9ZJa8aKhiO5xoEMfT4EtP/+A+LzI=These are correct password combinations. I am able to lookup the users who have their passwords exposed in public. Password 123456 is not a possible case in Django, since the password fields have a complexity validation. However, the salt is available to the attacker when a database is stolen. Salt could be usedTo hash the raw password pair in a rainbow table.To hash the already exposed passwords.There is one more element needed for hashing the password, pepper, should be project specific. When a database is exposed in public, the attacker will not be able to lookup the passwords, since they don't have the secret pepper key.Notes from Django ticket 30561According to NIST Digital Identity Guidelines Authentication and Lifecycle Management document, verifiers should perform an additional iteration of a key derivation function using a salt value that is secret and known only to the verifier.https://code.djangoproject.com/ticket/30561https://pages.nist.gov/800-63-3/sp800-63b.html
Package: django-perf
Perf Django Agentperfis a middleware that will record timing and status codes
of the connections in the Django framework and send the data to Perf. We
then run analytics on that data to generate metrics and alerts.InstallationEasily install Perf via pippipinstalldjango-perfAdd Perf configuration to your settingsPERF_CONFIG={"api_key":"PERF_API_KEY"}Add Perf to your list of installed apps and middleware classesINSTALLED_APPS=('perf',...)MIDDLEWARE_CLASSES=('perf.middleware.PerfMiddleware','django.middleware.common.CommonMiddleware','django.middleware.csrf.CsrfViewMiddleware',...)
Package: django-perfect-breadcrumbs
Perfect BreadcrumbsBreadcrumbs for perfectionists with deadlines.AboutThis package provides an easy way to add breadcrumbs to your Django project.UsageInstall the package with pip or poetry like so:poetryadddjango_perfect_breadcrumbsAdd the middleware to in yoursettings.py:MIDDLEWARE=[..."django_perfect_breadcrumbs.middleware.BreadcrumbsMiddleware",]Add the context processor in yoursettings.py:TEMPLATES=[{..."OPTIONS":{"context_processors":[..."django_perfect_breadcrumbs.context_processors.breadcrumbs",],},},]You will now have access tobreadcrumb_builderandbreadcrumbsin viewrequestobjects.Your templates will also contain thebreadcrumbsvariables.BuilderUse the builder to add your breadcrumbs:defhome(request):returnrender(request,"testapp/index.html")defabout(request):request.breadcrumb_builder.add("Home",reverse_lazy("home"))request.breadcrumb_builder.add("About",active=True)returnrender(request,"testapp/about.html")defabout_josh(request):breadcrumbs=[{"name":"Home","url":reverse_lazy("home")},{"name":"about","url":reverse_lazy("about")},{"name":"About Josh","active":True},]request.breadcrumb_builder.add_bulk(breadcrumbs)returnrender(request,"testapp/josh.html")Then use breadcrumbs in your templates:<navaria-label="breadcrumb"><olclass="breadcrumb">{% for breadcrumb in breadcrumbs %}
    {% if breadcrumb.active %}<liclass="breadcrumb-item active"aria-current="page">{{ breadcrumb.name }}</li>{% else %}<liclass="breadcrumb-item"><ahref="{{ breadcrumb.url }}">{{ breadcrumb.name }}</a></li>{% endif %}
    {% endfor %}</ol></nav>LicenseMIT
Package: django-performance-monitor
Django Performance MonitorDjango Performance monitor is simple django application for tracking the view which takes
more time than a threshold value (By default 1.5 Seconds). Also using a Configuration in
admin we turn on or off this featureInstallation$pipinstalldjango-performance-monitorRequirementsPython3.6+UsageAdddjango_performance_monitorto the installed app in the settings file,INSTALLED_APPS=(# other apps"django_performance_monitor",)Adddjango_performance_monitor.middleware.LogRequestMiddlewareto the MIDDLEWARE in the settings,MIDDLEWARE=[#other middlewares'django_performance_monitor.middleware.LogRequestMiddleware']Set theLOG_THRESHOLDvalue above which we need to log the request in settings.py, By default its values is 1.5 SecondsLOG_THRESHOLD=2.05Runpython manage.py migrate,$pythonmanage.pymigrateAll the requests are logged toRequest logsunder the appDJANGO_PERFORMANCE_MONITORTo disable this logging go toConfigunder the appDJANGO_PERFORMANCE_MONITOR, if there is no config object
create one withIs activeun checked. If exist change to ** Is active ** to un checked.CommunicationIf youfind a bug, open an issue.If youhave a feature request, open an issue.If youwant to contribute, submit a pull request.AuthorAfsal Salim,afsal@parseltongue.co.inLicenseDjango Performance Monitor is available under the MIT license. See the LICENSE file for more info.
Package: django-perftools
Logging Slow RequestsPerftools includes a logger that will monitor requests execution time. Once it hits
the defined threshold, it will log to the namedperftoolslogger, including the
metadata for the request (as defined by Sentry’s logging spec).from perftools.middleware.slowreq import SlowRequestLoggingMiddleware

app = SlowRequestLoggingMiddleware(app, threshold=100) # in msRemote ProfilingProfiles a request and saves the results to disk.from perftools.middleware.remoteprof import RemoteProfilingMiddleware

app = RemoteProfilingMiddleware(app, outpath='/var/data/cprofile-results/', percent=10) # 10% of requestsQuery CountsLogs requests which exceed a maximum number of queries.from perftools.middleware.querycount import QueryCountLoggingMiddleware

app = QueryCountLoggingMiddleware(app, threshold=100) # number of queries
Package: django-periodiq
django_periodiqdjango_periodiqis a Django app that integrates withPeriodiq.Requirementsdjango-dramatiq0.11.0+Periodiq0.12.1+Installationpip install django-periodiqAdddjango_periodiqto installed appsbeforeany of your custom
apps andafterdjango_dramatiq:INSTALLED_APPS=["django_dramatiq","django_periodiq","myprojectapp1","myprojectapp2",# etc...]Addperiodiq.PeriodiqMiddlewaretoDRAMATIQ_BROKERmiddlewares:DRAMATIQ_BROKER={"MIDDLEWARE":[..."periodiq.PeriodiqMiddleware",],}To changePeriodiqMiddleware.skip_delayaddPERIODIQ_SKIP_DELAYsettingsRun dramatiq:pythonmanage.pyrundramatiqRun periodiq:pythonmanage.pyrunperiodiq