Saravanan666/pypi-org huggingface dataset:
Package: django-chalk
SummaryChalk is a basic blogging app forDjangowhich lets you write posts usingreStructuredText. It was written for personal use and I’ll be adding
features as I need them but if you end up finding it useful and would like to
see anything added then I’d like to hear from you. Either email me atkevin@kevindias.comor open an issue in theBitbucket repo.Installing django-chalkThere are several ways to install this application.Using pip or easy_installPip is the recommended package-installation tool for Python. To install
django-chalk with pip, use the command:pip install django-chalkIf you prefer to use easy_install then replacepipwitheasy_installin the above command.To install the latest in-development version (which may not be stable) directly
from the project’s Git repository you can use the command:pip install -e git+https://bitbucket.org/dias.kev/django-chalk.git#egg=chalkUsing setuptoolsDownload the package source code or distribution tarball and then run the
following command in the django-chalk directory:python setup.py installConfiguring django-chalkSettings and modelsAddchalkto theINSTALLED_APPSsetting of your project. Once you’ve done
this you can create chalk’s database tables usingmanage.py syncdb.Setting up URLsAll the URLs which chalk needs are set inchalk.urlsso you can simply
include that file in your project’s root URLconf. For example, to add chalk
to your project under the path/blog/you would add the following to your
root URLconf:(r'^blog', include('chalk.urls')),With this setup chalk all articles are listed at the URL/blog/and
individual articles can be found at/blog/[article_slug]/TemplatesChalk includes bare-bones examples of the templates it needs but these may not
work with your project’s template structure and even if they do you’ll probably
want to override them. The templates to override arechalk/article_list.htmlwhich displays a list of all articles andchalk/article_detail.htmlwhich displays individual articles.Reporting problems or suggesting improvementsPlease use the issue tracker at the project’sBitbucket repo
Package: django-chance
IntroductionChance is an event manager for Django withDjango CMSintegration for
registration forms.InstallationFirst, you must installDjango. For full details, see the installation
instructions on their website.Installdjango-chanceto your environment with a tool such asPIP,setuptools, orbuildout.Addchanceto theINSTALLED_APPSlist in your project’ssettings.pyand run thesyncdbcommand on yourmanage.py.What’s InsideAdmin integration for creating and managing events. Views for displaying
events and managing registration.0.4.1 (2013-07-17)Redirect after registration goes to a users registrations0.4 (2013-06-24)Added slug to events to use smarter urls0.3.5 (2012-09-14)Updated CSV summary of registration to include choices0.3.4 (2012-09-11)Added a CSV summary admin action for registrationAdded event tracks and schedule itemsAdded a schedule view for an event0.3.3 (2012-09-04)Modified Talk owner information display for cases where owner has no name0.3.2 (2012-09-04)Added Talk owner information to list display in Admin0.3.1 (2012-08-31)Added an admin action for even choice summaries0.3 (2012-08-21)TransactionsPayment gateway integration0.2 (2012-07-23)Added Talks0.1 (2012-07-03)First ReleaseModels for events, registration, fees and event choicesViews for listing events and registeringSignal for e-mailing attendees a verificationSignal for e-mailing managers when new registrations are added
Package: django-changelist-toolbar-admin
django-changelist-toolbar-adminProvides custom button management function on changelist page of django admin site.Installpipinstalldjango-changelist-toolbar-adminUsagepro/settings.pyINSTALLED_APPS=[...'django_static_fontawesome','django_changelist_toolbar_admin',...]django_static_fontawesome is required, for already include the fontawesome css in Media's css settings.app/admin.pyfromdjango.contribimportadminfromdjango_changelist_toolbar_admin.adminimportDjangoChangelistToolbarAdminfrom.modelsimportCategoryclassCategoryAdmin(DjangoChangelistToolbarAdmin,admin.ModelAdmin):list_display=["name"]search_fields=["name"]django_changelist_toolbar_buttons=["export_button","say_hi_button",]defexport_button(self,request):return"/export"export_button.title="Export"export_button.icon="fas fa-file-export"export_button.target="_blank"defsay_hi_button(self,request):return{"href":"javascript:alert('hi');","title":"Say Hi","icon":"fas fa-music",}admin.site.register(Category,CategoryAdmin)A button function must returns a Button instance, dict button info, or href.Another way is overridemake_changelist_toolbar_buttonget return the final buttons.Releasesv0.4.3Doc update.Add django-app-requires support.v0.4.0Fix document.Rename configuration itemchangelist_toolbar_buttonstodjango_changelist_toolbar_buttons.v0.3.0The main class rename to DjangoChangelistToolbarAdmin. Mixin is a very simple abstract class that provides helper functions, but DjangoChangelistToolbarAdmin is complex base admin, so we remove the mixin suffix.v0.2.0App rename to django_changelist_toolbar_admin.v0.1.0First release.
Package: django-changelog
Django Changelog is a simple Django app to display a CHANGELOG.md file as a urlQuick startAdd “polls” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'django_changelog',
]Include the polls URLconf in your project urls.py like this::from changelog.views import ChangelogView
…
path(“changelog/”, ChangelogView.as_view()),Create a CHANGELOG.md in your BASE_DIR.Start the development serverVisithttp://127.0.0.1:8000/changelog/to see your changelog.
Package: django-changelogs
ChangelogsChangelogs is, as the name implies, a changelog app to keep track of your application's version.Quick startAdd "changelogs" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
...
'changelogs',
]Runpython manage.py migrateto create necessary models.Start the development server and visithttp://127.0.0.1:8000/admin/changelogs/to create a changelog version (you'll need the Admin app enabled).
Package: django-changes
A utility to store and access information about changes on objects in a Django
project.Installationpip installdjango-changesAdd to your Python path orsetup.py installand add'changes'to yourINSTALLED_APPSsetting.UsageYou can use by importing the helper:from changes import changes
# ...
changes.add_change(someobj, who=request.user)Or by using the object directly:from changes.models import Change
# ...
Change.objects.add_change_for_object(someobj, why='Because')To get a queryset of changes that were added for an objects:changes.get_changes_for(someobj)or:Change.objects.get_changes_for_object(someobj)To get a queryset of changes that were made by a user:changes.get_changes_by(someuser)or:Change.objects.get_changes_by_user(someuser)You can also do things like this:Change.objects.all().by_user(someuser)
changes.get_changes_for(someobj).anonymous()Included is a ‘Mixin’ for your models that you expect to be recording changes
on a lot that will give you the reverse relationchanges:from changes.models import ChangesMixin
# ...
class SomeModel(ChangesMixin, models.Model)This mixin will give you some helpful methods:somemodelinstance.add_change(why='Time for change')
somemodelinstance.get_changes()You can also add a change when saving:somemodelinstance.save(changed=True, who=someuser, why='Changing')The default behaviour is to not save a change:somemodelinstance.save()The mixin also omits a signal,change_addedwhen a change is added for the
object.See the source code for more.Need Help?Email:rvause@gmail.comGithub:https://github.com/rvause/django-changes
Package: django-channels
django-channels is a Django library for sending notifications.
HipChat, Slack, Twitter and Yo are supported for now.Note:This should not be confused with the official Django Channels
project which you can see athttps://channels.readthedocs.io/.At a GlanceAfter installation and configuration, you can send notifications to HipChat,
Slack, Twitter, or Yo with a following simple code:importchannelschannels.send("Sample notification.")SeeQuickstartpage for more details.RequirementsPythonPython 2.7+Python 3.3+PyPyPyPy3DjangoDjango 1.8Django 1.9Django 1.10Installationpipinstalldjango-channelsNote: Please use the latest version of setuptools & pippipinstall-UsetuptoolspipLinksDocumentationGitHub
Package: django-channels-handlers
django-channels-handlersDjango Channels consumers, without the Pain 💊django-channels-handers is an abstraction
for Django Channels that makes it easy to implement elegant protocols
without having to worry about the communication layer.RequirementsDjango>=2.1channels~=2.4pydantic~=1.4UsageInstall django-channels-handlers from
pypi:pipinstalldjango-channels-handlersCreate pydantic models for each message you intend to handle. This
allows the handler to validate the message and parse it into an object.frompydanticimportBaseModel,UUID4fromtypingimportDict,OptionalfromdatetimeimportdatetimeclassChatMessage(BaseModel):type:str="chat.message"id:UUID4thread:UUID4sender:UUID4content:strdata:Optional[Dict]={}created:datetimeCreate a message handler.This will first validate and parse a message that matches
handled_types using the corresponding
entry in models. It will then execute the
method specified in handled_types,
passing the newly parsed message object.fromchannels_handlers.handlersimportMessageHandler# For async, import AsyncMessageHandlerclassChatHandler(MessageHandler):namespace="chat"models={"chat.message":ChatMessage,}defmessage(self,message):# Some logic with message, e.g. save to databasepassImport ConsumerHandlerMixin and add it to
your Django Channels consumer. Then, add your custom handler to the
consumer's handler_classes.fromchannels_handlers.consumersimportConsumerHandlerMixin# For async, import AsyncConsumerHandlerMixinfromchannels.generic.websocketimportJsonWebsocketConsumerclassMyConsumer(ConsumerHandlerMixin,JsonWebsocketConsumer):handler_classes=[ChatHandler]Compatibilitydjango-channels-handlers is compatible
with Python 3.7+, Django 2.2+, and Django Channels 2.2+.Licensedjango-channels-handlers is licensed
under the MIT License.AuthorsSeeAUTHORS.md.Contributingdjango-channels-handlers relies on the contributions of talented coders like you.
SeeCONTRIBUTING.mdfor more information.
Package: django-channels-jwt
Django Channels JWTDjango Channels JWT Middleware is a secure way to handle authentication for Django Channels WebSocket connections without directly exposing JWT tokens. Instead of sending the token itself in the query parameter, this middleware uses UUID-based authentication and cache-based user retrieval for enhanced security.Security BenefitsEnhanced Security: JWT tokens can potentially be intercepted if sent as query parameters. This middleware avoids sending tokens directly, minimizing the risk of token leakage.UUID-based Authentication: This middleware generates UUIDs as tokens for WebSocket connections. These UUIDs are short-lived and act as temporary access keys. When a user connects, they provide the UUID, which is used to retrieve the authenticated user.Cache-based User Retrieval: Upon connection, the middleware validates the UUID, retrieves the corresponding user ID from the cache, and fetches the user asynchronously. This ensures that the WebSocket connection is only established for authenticated users.Risks of Sending Tokens as Query ParametersSending tokens as query parameters can expose security vulnerabilities:Token Exposure: Tokens in query parameters can be captured in logs, browser history, or server logs, increasing the risk of unauthorized access.Caching: Some proxies or servers may cache URLs, which could lead to tokens being stored in shared caches.InstallationInstall the package using pip:pipinstalldjango-channels-jwtConfigurationWrap your URLRouterfromdjango_channels_jwt.middlwareimportJwtAuthMiddlewareStackapplication=ProtocolTypeRouter({"http":get_asgi_application(),"websocket":JwtAuthMiddlewareStack(URLRouter(websocket_urlpatterns,)),})Include the provided URL for ticket generation in your project'surls.py:fromdjango.urlsimportpath,includeurl_patterns=[# ... your other URL patternspath("api/auth/",include('django_channels_jwt.urls')]or if you want to set customized routefromdjango.urlsimportpath,includefromdjango_channels_jwt.viewsimportAsgiValidateTokenViewurl_patterns=[# ... your other URL patternspath("auth_for_ws_connection/",AsgiValidateTokenView.as_view())]UsageEnsure your Django app's models are configured correctly.Use the includedAsgiValidateTokenViewto generate a ticket (UUID) for WebSocket connections.Connect to your WebSocket with the generated UUID to authenticate the connection without exposing the token.ws://localhost:8001/ws/chat/?uuid=1.0.0 (2023-08-11)First release on PyPI.
Package: django-channels-jwt-auth-middleware
django-channels-jwt-auth-middlewareCustom AuthMiddlewareStack to get users from JWT token for Django Channels.InstallationSimply,$pipinstalldjango-channels-jwt-auth-middlewareAnd that it.UsageAll you have to do is wrap your URLRouter.fromdjango_channels_jwt_auth_middleware.authimportJWTAuthMiddlewareStackapplication=ProtocolTypeRouter({"http":get_asgi_application(),"websocket":JWTAuthMiddlewareStack(URLRouter(websocket_urlpatterns,)),})AuthMiddlewareStackis already inJWTAuthMiddlewareStack. If you want to change this, simply do;fromdjango_channels_jwt_auth_middleware.authimportJWTAuthMiddlewarefrom.importYourCustomMiddlewareStackdefCustomJWTAuthMiddlewareStack(app):returnJWTAuthMiddleware(YourCustomMiddlewareStack(app))Simply as that :)TestingTesting is done by two methods.automated testing using django's test system.manual testing by hand.I have tried testing the middleware throughChannelsLiveServerTestCase, but currently this does not run due to pickle error in multiprocessing package from python.For this reason no-token test cases were tested using django's test system using a test project, and test cases with jwt token is tested by hand.Hand testing chrome extension calledBrowser WebSocket Clientwas used. B
low is a simple evidence from the hand testing.If you go totestproject/pages/tests.pyyou will see the consumer that is used for testing.classTestConsumer(WebsocketConsumer):defconnect(self):self.accept()# def disconnect(self, code):#     self.disconnect()defreceive(self,text_data,bytes_data=None):context={'message':'testing consumer',}user=self.scope['user']if(user_id:=user.id):context.update({'user':str(user_id)})else:context.update({'user':None})self.send(text_data=json.dumps(context))simply, is a data is passed in to the websocket it will return a user id of None for AnonymousUser.1.0.0 (2021-01-20)First release on PyPI.
Package: django-channels-panel
A Django Debug Toolbar panel for ChannelsAboutThis is a panel forDjango Debug Toolbarthat displays channels, groups and consumers events.InstallationInstall usingpip:pip install django-channels-panelThen addchannels_panelto yourINSTALLED_APPSso that we can find the
templates in the panel. Also, add'channels_panel.panel.ChannelsDebugPanel'to yourDEBUG_TOOLBAR_PANELS.ConfigurationUseCHANNELS_PANELfor configure django-channels-panel:Defaults:"ONLY_CHANNELS" -  None
"EXCLUDE_CHANNELS" - ['http.*', ]
"ONLY_GROUPS" - None
"EXCLUDE_GROUPS" - ['debug' + '.*']LicenseUses theMITlicense.
Package: django-channels-presence2
**django-channels-presence2**Simple presence boilerplate for django-channels 2 and channel redis backend.**Installation**`pip install django-channels-presence2`**Usage**Create presence for consumer:`self.presence = await ChannelPresence.create_from_consumer(self, groups=(PUBLICATIONS_SCHEDULE_GROUP,))`Example of create:`class Consumer(AsyncJsonWebsocketConsumer):async def connect(self):self.presence = await ChannelPresence.create_from_consumer(self, groups=(CONSUMER_GROUP,))`Groups are needed to send join and leave messages.Learn more about groups: http://channels.readthedocs.io/en/latest/topics/channel_layers.html?highlight=group_send.Join user:`await self.presence.join()`Leave user:`await self.presence.leave()`Get users:`await self.presence.get_users(GROUP)`Return:`{'user': SimpleLazyObject of User,'is_active': True or False'present_at': Datetime}`To set the activity expired time use `EXPIRED_USER_ACTIVITY` in django settings.
Package: django-channels-presence-4.0
django-channels-presence-4.0A reusable Django app for implementing "presence" and "rooms" usingdjango-channels <https://github.com/andrewgodwin/channels>.Docs:https://django-channels-presence-40.readthedocs.io/en/latest/Compatible with Django 4.2 and django-channels 4.0.0Quick install::pip install django-channels-presence-4.0
Package: django-chaos
=============================Django Chaos=============================.. image:: https://gitlab.sigmageosistemas.com.br/dev/django-chaos/badges/master/coverage.svg.. image:: https://gitlab.sigmageosistemas.com.br/dev/django-chaos/badges/master/pipeline.svg.. image:: https://readthedocs.org/projects/django-chaos/badge/?version=latestProject to do project management with a gantt chart.Documentation-------------The full documentation is at https://django-chaos.readthedocs.io.Quickstart----------Install Django Chaos::pip install django-chaosAdd it to your `INSTALLED_APPS`:.. code-block:: pythonINSTALLED_APPS = (...'chaos.apps.ChaosConfig',...)Add Django Chaos's URL patterns:.. code-block:: pythonfrom chaos import urls as chaos_urlsurlpatterns = [...url(r'^', include(chaos_urls)),...]Features--------* TODORunning Tests-------------Does the code actually work?::source <YOURVIRTUALENV>/bin/activate(myenv) $ pip install tox(myenv) $ toxCredits-------Tools used in rendering this package:*  Cookiecutter_*  `cookiecutter-djangopackage`_.. _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackageHistory-------0.1.0 (2017-10-09)++++++++++++++++++* First release on PyPI.
Package: django-chaos-features
FeaturesDocumentationThe full documentation is athttps://django-chaos-features.readthedocs.io.QuickstartInstall Django Chaos Features:pip install django-chaos-featuresAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'chaos_features.apps.ChaosFeaturesConfig',...)Add Django Chaos Features’s URL patterns:fromchaos_featuresimporturlsaschaos_features_urlsurlpatterns=[...url(r'^',include(chaos_features_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 (2018-05-15)First release on PyPI.
Package: django-chaos-tickets
Ticketing system from Django and Django ChaosDocumentationThe full documentation is athttps://django-chaos-tickets.readthedocs.io.QuickstartInstall Django Chaos Tickets:pip install django-chaos-ticketsAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'chaos_tickets.apps.ChaosTicketsConfig',...)Add Django Chaos Tickets’s URL patterns:fromchaos_ticketsimporturlsaschaos_tickets_urlsurlpatterns=[...url(r'^',include(chaos_tickets_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2017-10-27)First release on PyPI.
Package: django_chapa
Django-ChapaDjango wrapper for the chapa payment gatewayInstructionthis package also includes abstract transaction for chapaInstallationrequired python >= 3.6 and django >=3.2 installedpip install django-chapaDjango Configset your config values insettings.pyINSTALLED_APPS = [
    ...
    'django_chapa',
    ...
]

CHAPA_SECRET = "Secret"

CHAPA_API_URL = ''

CHAPA_API_VERSION = 'v1'add webhook url inurls.pyurlpatterns = [
    path('chapa-webhook', include('django_chapa.urls'))
]if you are using default chapa transaction model run./manage.py migrateregister your chapa transaction model insettings.pyCHAPA_TRANSACTION_MODEL = 'yourapp.chapa_modelNote: your chapa transaction model should implementdjango_chapa.models.ChapaTransactionMixinor must contain required fields for the webhook to work properly
Package: django-chard
ChardChard is a simple async/await background task queue for Django. One process,
no threads, no other dependencies.It uses Django's ORM to keep track of tasks.This is a new project under active development.
PRs are welcome!📖Documentation📨Sign up to the newsletter to get news and updates🔗Check the example Django projectRequirementsPython 3.8+Django 4.1+Installationpipinstalldjango-chardQuickstartFirst addchardanywhere in yourINSTALLED_APPSsetting and then run
the migrations:pythonmanage.pymigrateCreate a file calledtasks.pyin one of your apps and define a task:importchardimporthttpxfromasgiref.syncimportsync_to_asyncfrom.modelsimportMyModel@chard.taskasyncdefmy_task(country_code):url=f"https://somewhere.com/some-api.json?country_code={country_code}"asyncwithhttpx.AsyncClient()asclient:resp=awaitclient.get(url)obj=resp.json()foriteminobj["items"]:awaitsync_to_async(MyModel.objects.create)(country_code=country_code,item=item)To fire a task for the worker:# Note that all arguments must be JSON serializable.my_task.send("gb")Run the worker process and it will watch for new pending tasks:pythonmanage.pychardworkerTo see a full example of Chard in action:🔗Check the example Django projectContributingPlease seeCONTRIBUTINGthe contributing guidelines.LicensePlease seeLICENSEfor licensing details.Changelog0.2 (2022-09-16)- Type hinting
- Return a task ID when queueing a task
- Added docs
- Tidying and bug fixes
Package: django-charisma
=====Charisma Django=====Charisma Django is a port from charisma template from Usman.It is free, responsive, multiple skin admin template.Detailed documentation is in the "docs" directory.Live demo <https://grrodre.com/django-charisma/live/>Quick start-----------1. Add "polls" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [...'charisma_django',]2. Include the polls URLconf in your project urls.py like this::url(r'^', include('charisma_django.urls')),3. Run `python manage.py migrate` to create the charisma models.4. Start the development server and visit http://127.0.0.1:8000/5. Create your own boxes and adapt the template for your needs.
Package: django-charsleft-widget
django-charsleft-widget is a custom widget that limits the number of characters that can be entered in a textarea field.Installationpipinstalldjango-charsleft-widgetExternal dependenciesjQuery - this is not included in the package since it is expected
that in most scenarios this would already be available.SetupAddcharsleft_widgettoINSTALLED_APPS:INSTALLED_APPS+=('charsleft_widget',)and just includecharsleft_widgettemplates{%include"charsleft_widget/charsleft_widget_css.html"%}{# Before the closing head tag #}{%include"charsleft_widget/charsleft_widget_js.html"%}{# Before the closing body tag #}When deploying on production server, don’t forget to run:pythonmanage.pycollectstaticUsageAll you need now is to importClearableInputclass and override
field’s widget, for example:fromdjango.forms.fieldsimportCharFieldfromcharsleft_widgetimportCharsLeftAreaclassForm(forms.Form):field=CharField(max_length=128,widget=CharsLeftArea)Please seeexampleapplication. This application is used to
manually test the functionalities of this package. This also serves as
a good example.You need only Django 1.4 or above to run that. It might run on older
versions but that is not tested.Licensedjango-charsleft-widgetis released under the BSD license.Changes1.0.0 (2021-11-30)Added Django 3+ support.Dropped Python 2.7 support.Dropped Django 1.10 / 1.11 support.