Saravanan666/pypi-org huggingface dataset:
Package: django-tsp
django_tspdjango_tsp is a wrapper build on top of the tsp_wrapperProvide apis for calling the tsp_wrapperProvide django commands for tsp_wrapperProvide websocket template for tsp sloutionsInstallationpipinstalldjango-tspGetting startedAdd django_tsp to your install appsINSTALLED_APPS=['daphne','django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django_tsp',# <--- here we added our package]fill up the require variables in settings.pyTSP_HOOK_URL="http://django:8000/api/tsp/hook/"# your webhook linkTSP_BROKER_URL="amqp://guest:guest@rabbitmq:5672/"install django_channels and use following view in your routingfromdjango_tsp.routingimportws_urlpatternsapplication=ProtocolTypeRouter({"http":django_asgi_app,"websocket":AuthMiddlewareStack(URLRouter(ws_urlpatterns))})use add following apis to your urls.py (needs drf and drf_docs)fromdjango_tsp.apisimportWebhookApi,SolverApiurlpatterns=[path('tsp/',include(([path('solver/',SolverApi.as_view(),name="solver"),path('hook/',WebhookApi.as_view(),name="hook"),],"tsp")),),]for the template websocket add following views inside of your urls.pyfromdjango_tsp.viewsimportindexfromdrf_spectacular.viewsimport(SpectacularAPIView,SpectacularRedocView,SpectacularSwaggerView,)urlpatterns=[path('',index,name="index"),# the improtant template onepath("schema/",SpectacularAPIView.as_view(api_version="v1"),name="schema"),path("doc/",SpectacularSwaggerView.as_view(url_name="schema"),name="swagger-ui"),path("redoc/",SpectacularRedocView.as_view(url_name="schema"),name="redoc"),]Usagefor running the bridgepython manage.py bridgefor running the reciverpython manage.py reciver
Package: django-tsugi
This is the emerging Tsugi library for Django -https://www.tsugi.orghttps://pypi.org/project/django-tsugi/Quick startInstallpip install django-tsugi    # or pip3Add “django_tsugi” to your INSTALLED_APPS and add the keyset url for your
controlling server insettings.pylike this:INSTALLED_APPS = [
    ...
    'django_tsugi',
]

# To set up Tsugi
TSUGI_KEYSET = "https://dev1.tsugicloud.org/tsugi/lti/keyset-ext";Add a line to your application’surls.pyfile to handle launches and
tell Tsugi which view to redirect to after the launch is successful:from . import views
from django_tsugi.views import LaunchView

urlpatterns = [
    path('', views.GradeView.as_view(), name='grade' ),
    path('launch', LaunchView.as_view(), {'success_url' : 'grade'} ),
]Add the TsugiMixin to your class based view and it will define
therequest.tsugivariable with the user, context, and link
information:from django.views import View
from django_tsugi.mixins import TsugiMixin

class GradeView(TsugiMixin, View):

 def get(self, request) :
     context = {'tsugi': request.tsugi}
     return render(request, 'grade/main.html', context)

def post(self, request) :
     grade = float(request.POST.get('grade'))
     comment = request.POST.get('comment')

     retval = request.tsugi.result.gradeSend(grade, comment)
     context = {'tsugi': request.tsugi, 'retval' : retval}
     return render(request, 'grade/done.html', context)Revising and testing locallyIf you are running your Django tool locally and Tsugi locally, you
can use the following insettings.py:TSUGI_KEYSET = "http://localhost:8888/tsugi/lti/keyset-ext";If you are working on a new version of this library with a django
tsugi app, you can release a new version locally with:python3 setup.py sdist ;  pip3 install dist/*.tar.gzReleasing to pypi.orgThis library is released tohttps://pypi.org/project/django-tsugi/You needtwineto push changes to pypi:pip3 install twine           # If needed
pip install --upgrade twine  # If needed
pip3 install twine==1.12.1   # If needed since later twines mess upTo release a whole new version, update the version insetup.pyand then:rm dist/* ; python3 setup.py sdist ; twine check dist/*

twine upload dist/*You cannot upload the same version number twice.References[1] How to write reusable apps -https://docs.djangoproject.com/en/2.2/intro/reusable-apps/[2] Tutorial on Packaging and Distributing Projects -https://packaging.python.org/tutorials/packaging-projects/[3]https://pypi.org/-https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
Package: django-ttag
TTag is a template tag constructor library for Django created for the purpose
of making writing template tags easier.The tag syntax is modelled on Django’s friendly syntaxes for models and forms.
Here is a full example tag:class Welcome(ttag.Tag)
    user = ttag.Arg()
    fallback = ttag.Arg(named=True, default='Hi!')

    def output(self, data)
        name = data['user'].get_full_name()
        if name:
            return 'Hi, %s!' % name
        return data['fallback']This would produce a tag namedwelcomewhich can be used like this:{% welcome current_user fallback "Hello, anonymous." %}More comprehensive usage and reference documentation can be found in thedocsdirectory, or athttp://packages.python.org/django-ttag/.
Package: django-ttdb
Django template test database is a testing tool for django that provides an alternative
to fixtures when tools like FactoryBoy aren’t suitable. The use case is simple: for
integration tests that require the test database to be populated with a specific (large)
set of test data before they will even run. Loading this test data using fixtures would
be very slow. This problem is solved by loading the test data during database creation
at the database level and allows us to avoid all of the overhead by loading data through
django.How it worksIt uses postgresql database templates to create the test database. Because of this it
only works with postgresql, however if you are interested in extending this to support
other database backends feel free to do so.To make this work we need three parts:A custom test runner to customize test db creationCustom test cases to prevent the test database being flushed after each runDecorator that allows existing test cases to run against a template test database.DocumentationDocumentationcan be found onreadthedocs.org.
Package: django-tts
=====Django Text to Speach generator=====Django Text to Speach is a simple Django app to create .wav files from your textMust be installed RHVoice-test utilite on Unix MachineDetailed documentation is in the "docs" directory.Quick start-----------1. On your machine which you launch django applicaton must be installed RHVoice-test utilite, which create wav files from text.Instalation instructions and documentation see there: https://github.com/Olga-Yakovleva/RHVoice.Also see there Docker all installed in. https://github.com/g10k/sw_tts2. Add some apps  to your INSTALLED_APPS setting like this::INSTALLED_APPS = ['rest_framework','tts',]3. Include the polls URLconf in your project urls.py like this::url(r'^tts/', include('tts.urls')),4. Run `python manage.py migrate` to create the polls models.5. Start the development server and visit http://127.0.0.1:8000/tts/to see docs and available api
Package: django-tts-reports
{rtf1ansiansicpg1252cocoartf1504cocoasubrtf830
{fonttblf0fswissfcharset0 Helvetica;f1fnilfcharset0 Menlo-Bold;f2fnilfcharset0 Menlo-Regular;
}
{colortbl;red255green255blue255;red0green0blue0;red255green255blue255;red255green0blue0;
}
{*expandedcolortbl;;csgenericrgbc0c0c0;csgenericrgbc100000c100000c100000;csgenericrgbc100000c0c0;
}
paperw11900paperh16840margl1440margr1440vieww16160viewh8400viewkind0
pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0f0fs24 cf0 Application name:-
b Django-tts-reports
b0 Description:-
b This is an application developed for TruTrade Limited . The app enables TruTrade Back office to generate buyer reports that the can share with  buyersb0 NB
b : This application is still under constant improvement and more reports are still being added to the application.
b0b How to install the reports applicationb0 Dependances pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0f1b cf2 cb3     - easy_pdfuc0u8232     - reportlabu8232     - django.contrib.humanize    - requests
f0b0 cf0 cb1 a. Then install the django-tts-reports application cmd:
b cf2 cb3 pip install django-tts-reportspardtx560tx1120tx1680tx2240tx2800tx3360tx3920tx4480tx5040tx5600tx6160tx6720pardirnaturalpartightenfactor0f2b0 cf2 b.Include the application in your settings file under installed appsf0 cf0 cb1 pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0f2 cf2 cb3 INSTALLED_APPS = [… .   pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0f1b cf2 ‘reports’,pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0f2b0 cf2 uc0u8232 ]pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0f0 cf0 cb1 c. Add the API domain some where in you the settings file.pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0f1b cf2 cb3 API_DOMAIN = ‘http://tss.dgitalnatives.com’
f0b0 cf0 cb1 d. Add this to  the settings URL file pardtx560tx1120tx1680tx2240tx2800tx3360tx3920tx4480tx5040tx5600tx6160tx6720pardirnaturalpartightenfactor0f1b cf2 cb3 url(r’^reports/’, include(‘reports.url’, namespace=’report’)),pardtx560tx1120tx1680tx2240tx2800tx3360tx3920tx4480tx5040tx5600tx6160tx6720pardirnaturalpartightenfactor0f2b0 cf2 e.Create a link and pass it
f1b deal_UUID
f2b0 and
f1b  full site_domain
f2b0  to generated the report. See format below pardtx560tx1120tx1680tx2240tx2800tx3360tx3920tx4480tx5040tx5600tx6160tx6720pardirnaturalpartightenfactor0f1b cf2 ['91cf4 site_domaincf2 '92]/reports/deal-buyer-report/['91cf4 deal_uuidcf2 '92]/
f2b0 example:-
f1b cf4http://127.0.0.1:8000cf2/reports/deal-buyer-report/cf4 b57b696d-029e-4b41-b879-58546c304bfbcf2 /pardtx560tx1120tx1680tx2240tx2800tx3360tx3920tx4480tx5040tx5600tx6160tx6720pardirnaturalpartightenfactor0f2b0 cf2f0 cf0 cb1 pardtx566tx1133tx1700tx2267tx2834tx3401tx3968tx4535tx5102tx5669tx6236tx6803pardirnaturalpartightenfactor0
cf0  }
Package: django-tuauth
Dajgno TU Authentication========================Requirements============- python (2.7, 3.5)- django (1.11, 2.0)- social-app-django (2.1.0)Installation============```pip install git+https://github.com/LeOntalEs/django-tuauth.git```Usage=====### PrerequisiteRegister application in api.tu.ac.th/applications> note: Callback URL must be same with decarelation in urls.py> in this example use http://127.0.0.1/oauth/complete/tu/### in setting.py```pythonINSTALLED_APPS = [...'social_django','tuauth',...]```add authentication backend in setting.py```pythonAUTHENTICATION_BACKENDS = (...'tuauth.backend.TUOAuth2',...)```set client id and client secret in setting.py```pythonSOCIAL_AUTH_TU_KEY = '<client_id>'SOCIAL_AUTH_TU_SECRET = '<client_secret>'```Sample SOCIAL_AUTH_PIPELINE```pythonSOCIAL_AUTH_PIPELINE = ['social_core.pipeline.social_auth.social_details','social_core.pipeline.social_auth.social_uid','social_core.pipeline.social_auth.social_user','social_core.pipeline.user.get_username','social_core.pipeline.user.create_user','social_core.pipeline.social_auth.associate_user','social_core.pipeline.social_auth.load_extra_data','social_core.pipeline.user.user_details','social_core.pipeline.social_auth.associate_by_email',]```> See more detail in about **social-app-django** in (https://github.com/python-social-auth/social-app-django)### in urls.py```urlpatterns = [...path('oauth/', include('social_django.urls', namespace='social')), # in django2...]```### in template```...<a href="{% url 'social:begin' 'tu' %}">Login with TU</a><br>...```
Package: django-tui
django-tuiInspect and run Django Commands in a text-based user interface (TUI), built withTextual&Trogon.Table of ContentsDemoInstallationRunningLicense🎬 DemosRunning Django Commandshttps://github.com/anze3db/django-tui/assets/513444/fc84247a-9f4b-4017-9ae4-3f10fe9d9557Running ORM Queries in Interactive Django Shellhttps://github.com/anze3db/django-tui/assets/513444/8a056da8-85a8-4086-9fa8-433b7346e787Installationpip install django-tuiAdd"django_tui"to yourINSTALLED_APPSsetting insettings.pylike this:INSTALLED_APPS=[...,"django_tui",]Now you can run the TUI with:python manage.py tuiLicensedjango-tuiis distributed under the terms of theMITlicense.
Package: django-tuieditor
Django-TUI.EditorDjango WYSIWYG markdown editor that supports GFMThis is a django app that adds a markdown widget utilizing theTOAST UI Editor. Among other things it also adds aMarkdownFieldtype that is an extension of theTextFieldbut will use a WYSIWYG Markdown editor in the admin interface. The editor allows editing the markdown source code with a preview on the side.How it worksThe module adds 3 widgets based on django's own widget API:MarkdownEditorWidget:A WYSIWYG editor that also supports Markdown source code editing with syntax highlighting and a preview of the rendered implemented using the TOAST UI EditorMarkdownViewerWidget:A markdown viewer also implemented using the TOAST UI Editor which falls back to statically rendered markdownStaticMarkdownViewerWidget:A statically rendered markdown viewer that should work on all browsers without any javascriptOn NoScript supportThe rendering supports both a fancy viewer and editor in script-enabled environments but allows falling back to statically rendered elements if scripts are not supported or disabled. For static rendering of the viewer the python bindings for Github's GFM Markdown implementationcmark-gmfare used while the editor falls back to a simple text area input.
Package: django-tumblr-auth
Django-Tumblr-Auth==============================Django-Tumblr-Auth is an extension to `Django-Social-Auth <https://github.com/omab/django-social-auth>`_which adds a backend for Tumblr.com.Requirements-------------------------------- Django-Social-Auth >= 0.3.3- Django >= 1.2.5- Python-OAuth >= 1.0.1API Keys-------------------------------In order to use this application you must sign up for OAuth consumer key onhttp://www.tumblr.com/oauth/apps. These should be put into your settings fileusing the settings::TUMBLR_CONSUMER_KEY = '' # Your consumer keyTUMBLR_CONSUMER_SECRET = '' # Your consumer secretInstallation-------------------------------To install django-tumblr-auth via pip::pip install django-tumblr-authOr you can from the latest version from Github manually::git clone git://github.com/alageek/django-tumblr-auth.gitcd django-tumblr-authpython setup.py installor via pip::pip install -e git+https://github.com/alageek/django-tumblr-auth.gitOnce you have the app installed you must include in your settings::INSTALLED_APPS = (...'social_auth','tumblr_auth',...)AUTHENTICATION_BACKENDS = (...'tumblr_auth.backend.TumblrBackend',...)SOCIAL_AUTH_IMPORT_BACKENDS = (...'tumblr_auth',...)Please refer to the `Django-Social-Auth <http://django-social-auth.readthedocs.org/>`_documentation for additional information.Questions or Issues?-------------------------------If you have questions, issues or requests for improvements please let me know on`Github <https://github.com/mlavin/django-tumblr-auth/issues>`_.
Package: django-turbo-allauth
Hotwired/Turbo django-allauth integrationThis package provides subclasses modifying the django-allauth viewshttps://github.com/pennersr/django-allauthto provide valid return codes.This package is required in order to provide allauth compatability with Turbo. Turbo form validation either setting the attributedata-turbo="false"in the form, or returning a 4** response. This provides subclasses for the latter.Disclaimer: the Hotwired/Turbo client libraries are, at time of writing, still in Beta. We expect there will be breaking changes until the first stable release. This package, and the Turbo client, should therefore be used with caution in a production environment. The version used in testing is@hotwired/turbo==7.0.0-beta.5.RequirementsThis library is tested for Python 3.8+ and Django 3.0+.Installationpip install django-turbo-allauthTo install from Git:git clonehttps://github.com/hotwire-django/django-turbo-allauthcd django-turbo-allauthpython setup.py installNote: This library does not include any client libraries (Turbo or Stimulus). You may wish to add these yourself using your preferred Javascript build tool, or use a CDN. Please refer to the Hotwire documentation on installing these libraries.Full documentation on ReadTheDocs:https://django-turbo-allauth.readthedocs.io/en/latest/LicenseThis project is covered by the MIT license.ChangelogLatestAdd support for Django 3.2[0.0.7] - 2021-4-4Removing support for Python 3.7[0.0.6] - 2021-4-2Dependency updates[0.0.5] - 2021-2-4Leverage turbo-response adapter mixin[0.0.4] - 2021-2-2Support for Python 3.7 and Django 3.0[0.0.3] - 2021-7-1Ensure redirects return a 303 in line with Turbo docs[0.0.2] - 2021-5-1Update to latestdjango-turbo-response, remove template partials
Package: django-turbo-helper
Hotwire/Turbo helpers for Django, inspired by Rails.Documentationdjango-turbo-responsehas been renamed todjango-turbo-helpersince version 2.x.xFor legacydjango-turbo-responseuser, please checkhttps://django-turbo-helper.readthedocs.io/en/1.0.3/Fordjango-turbo-helperuser, please checkhttps://django-turbo-helper.readthedocs.io/Free Hotwire Django eBookIf you are new to Hotwire, you may be interested in this free eBookHotwire Django Tutorial.
Package: django-turbolinks
Drop-in turbolinks implementation for DjangoInstallation$ pip installdjango-turbolinksConfigurationAddturbolinks.middleware.TurbolinksMiddlewareafterdjango.contrib.sessions.middleware.SessionMiddlewareto yourMIDDLEWARE_CLASSESsetting.Addturbolinksto yourINSTALLED_APPSsetting.Run./manage.py collectstaticInclude/static/turbolinks/turbolinks.jsscript in your base
template.
Package: django-turbo-response
This package provides helpers for server-side rendering ofTurbo FrameandTurbo Stream, which aim to work with theHotwireproject.Documentationhttps://django-turbo-response.readthedocs.io/en/latest/Free Hotwire Django eBookIf you are new to Hotwire, you may be interested in this free eBookHotwire Django Tutorial.
Package: django-turnstile
Add Cloudflare Turnstile validator widget to the forms of your django project.This project refers to github project django-hcaptcha (author: AndrejZbin)ConfigurationAdd “turnstile” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'turnstile',
]For development purposes no further configuration is required. By default, django-Turnstile will use dummy keys.For production, you’ll need to obtain your Turnstile site key and secret key and add them to you settings:TURNSTILE_SITEKEY = '<your sitekey>'
TURNSTILE_SECRET = '<your secret key>'You can also configure your Turnstile widget globally (see all options):TURNSTILE_DEFAULT_CONFIG = {
    'onload': 'name_of_js_function',
    'render': 'explicit',
    'theme': 'dark',  # do not use data- prefix
    'size': 'compact',  # do not use data- prefix
    ...
}If you need to, you can also override default turnstile endpoints:TURNSTILE_JS_API_URL = 'https://challenges.cloudflare.com/turnstile/v0/api.js'
TURNSTILE_VERIFY_URL = 'https://challenges.cloudflare.com/turnstile/v0/siteverify'Use proxies:TURNSTILE_PROXIES = {
   'http': 'http://127.0.0.1:8000',
}Change default verification timeout:TURNSTILE_TIMEOUT = 5UsageSimply add TurnstileField to your forms:from turnstile.fields import TurnstileField

class Forms(forms.Form):
    ....
    turnstile = TurnstileField()
    ....In your template, if you need to, you can then use{{ form.turnstile }}to access the field.You can override default config by passing additional arguments:class Forms(forms.Form):
    ....
    turnstile = TurnstileField(theme='dark', size='compact')
    ....How it WorksWhen a form is submitted by a user, Turnstile’s JavaScript will send one POST parameter to your backend:cf-turnstile-response. It will be received by your app and will be used to complete theturnstileform field in your backend code.When your app receives these two values, the following will happen:Your backend will send these values to the Cloudflare Turnstile serversTheir servers will indicate whether the values in the fields are correctIf so, yourturnstileform field will validate correctlyUnit TestsYou will need to disable the Turnstile field in your unit tests, since your tests obviously cannot complete the Turnstile successfully. One way to do so might be something like:fromunittest.mockimportMagicMock,patchfromdjango.testimportTestCase@patch("turnstile.fields.TurnstileField.validate",return_value=True)classContactTest(TestCase):test_msg={"name":"pandora","message":"xyz","turnstile":"xxx",# Any truthy value is fine}deftest_something(self,mock:MagicMock)->None:response=self.client.post("/contact/",self.test_msg)self.assertEqual(response.status_code,HTTP_302_FOUND)
Package: django-tus
Django app implementing server side of tus protocol to powering resumable file uploads for django projects.Supported Django/Python VersionsDjango 2.2.x LTS and
Django 3.0.x, 3.1.xPython > 3.5DocumentationThe full documentation is athttps://django-tus.readthedocs.org.Example projectThis example django project includes a javascript TUS demo client and implements django-tus as tus server::https://github.com/alican/django-tus-example/QuickstartInstall django-tus:pip install django-tusAdd ‘django_tus’ to your INSTALLED_APPS setting.:INSTALLED_APPS = (
...
'django_tus',
)Add following urls to your urls.py.:path('upload/', TusUpload.as_view(), name='tus_upload'),
path('upload/<uuid:resource_id>', TusUpload.as_view(), name='tus_upload_chunks'),Configure and add this settings in your settings.py:TUS_UPLOAD_DIR = os.path.join(BASE_DIR, 'tus_upload')
TUS_DESTINATION_DIR = os.path.join(BASE_DIR, 'media', 'uploads')
TUS_FILE_NAME_FORMAT = 'increment'  # Other options are: 'random-suffix', 'random', 'keep'
TUS_EXISTING_FILE = 'error'  #  Other options are: 'overwrite',  'error', 'rename'Django has a setting for maximal memory size for uploaded files. This setting needs to be higher than the chunksize of
the tus client:DATA_UPLOAD_MAX_MEMORY_SIZE = 5242880TodoMore Tus-ExtensionsRunning TestsActivate your virtual env, then install the testing requirements withpip install -r requirements_test.txt.Run the tests withpytest.You can even generate a coverage report withpytest –cov=django_tus –cov-report=html.You can runtoxto test against multiple Python and Django versions.Creditshttp://tus.io/protocols/resumable-upload.htmlhttps://github.com/matthoskins1980/Flask-TusMIT LicenseCopyright (c) 2020, Alican ToprakPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.