Saravanan666/pypi-org huggingface dataset:
Package: django-messages-drf
Django Messages DRFOfficial Documentation-https://tarsil.github.io/django-messages-drf/Table of ContentsAbout Django Messages DRFOverviewVersionsDocumentationInstallationReference GuideMatrixCHANGELOGDocumentation and SupportLicenseAbout Django Messages DRFDjango Messages DRF is an alternative and based on pinax-messages but using
Django Rest Framework by making it easier to integrate with your existing project.A special thanks to pinax for inspiring me to do this and use some ideas.Overviewdjango-messages-drfis an app for providing private user-to-user threaded
messaging.Supported Django and Python VersionsDjango / Python3.63.73.83.93.102.2YesYesYesYesYes3.0YesYesYesYesYes3.1YesYesYesYesYes3.2YesYesYesYesYes4.0YesYesYesYesYesDocumentationInstallationTo install django-messages:$pipinstalldjango-messages-drfAdddjango_messages_drfto yourINSTALLED_APPS:INSTALLED_APPS=[# other apps"django_messages_drf",]Run Django migrations to createdjango-messages-drfdatabase tables:$pythonmanage.pymigrateAdddjango_messages_drf.urlsto your project urlpatterns:urlpatterns=[# other urlspath(r"^messages-drf/",include("django_messages_drf.urls",namespace="django_messages_drf")),]Reference GuideURL–View–Template MatrixURL NameViewdjango_messages_drf:inboxInboxListApiViewdjango_messages_drf:threadThreadListApiViewdjango_messages_drf:thread-createThreadCRUDApiViewdjango_messages_drf:thread-sendThreadCRUDApiViewdjango_messages_drf:thread-deleteThreadCRUDApiViewdjango_messages_drf:message-editEditMessageApiViewDocumentation and SupportFull documentation for the project is available athttps://tarsil.github.io/django-messages-drf/LicenseCopyright (c) 2020-present Tiago Silva and contributors under theMIT license.
Package: django-messaging-contentstore
A RESTful API for managing collections of messaging content. Comes with a
client and a fake.$ virtualenv ve
$ source ve/bin/activate
(ve)$ pip install -r requirements.txt
(ve)$ pip install -r requirements-dev.txt
(ve)$ py.test --ds=testsettings contentstore/tests.py --cov=contentstoreConfigurationThe following configuration (with dummy values replaced by real ones) needs to
be added tosettings.pyto configure this app:INSTALLED_APPS = [
    # Usual Django stuff plus
    # Third-party apps
    'djcelery',
    'rest_framework',
    'rest_framework.authtoken',
    'django_filters'
]

# REST Framework conf defaults
REST_FRAMEWORK = {
    'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAdminUser',),
    'PAGINATE_BY': None,
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework.authentication.BasicAuthentication',
        'rest_framework.authentication.TokenAuthentication',
    ),
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)
}Release Notes0.1.7 - 2015-07-02 - Add filter for lang, fix broken message content URL in client (bump)
0.1.6 - 2015-07-01 - Publish package with missing init
0.1.5 - 2015-07-01 - Publish package with client and verified fake
0.1.4 - 2015-06-11 - Python 3 compat imports
0.1.3 - 2015-05-21 - Initial release
Package: django-messaging-subscription
A RESTful API for managing messaging content, subscriptions and sending
via Vumi-go$ virtualenv ve
$ source ve/bin/activate
(ve)$ pip install -r requirements.txt
(ve)$ pip install -r requirements-dev.txt
(ve)$ py.test --ds=testsettings subscription/tests.py --cov=subscriptionConfigurationThe following configuration (with dummy values replaced by real ones) needs to
be added tosettings.pyto configure this app:INSTALLED_APPS=[# Usual Django stuff plus# Third-party apps'south','tastypie','djcelery',# Us'subscription']VUMI_GO_ACCOUNT_KEY="replaceme"VUMI_GO_CONVERSATION_KEY="replaceme"VUMI_GO_ACCOUNT_TOKEN="replaceme"CELERY_ACCEPT_CONTENT=['pickle']CELERY_TASK_SERIALIZER='pickle'CELERY_RESULT_SERIALIZER='pickle'CELERY_ALWAYS_EAGER=DEBUGSUBSCRIPTION_SEND_INITIAL_DELAYED=1800# optional delay in secondsSUBSCRIPTION_MULTIPART_BOUNDARY="-------"SUBSCRIPTION_NOOP_KEYWORD="SKIPSEND"Release Notes0.8.0 - 2016-06-22 - Add support for not sending on certain days
0.7.1 - 2016-05-20 - Pin and bump of dependency versions
0.7.0 - 2015-05-06 - Added support for firing metrics on completion of sets
0.6.0 - 2015-01-13 - Added support for default schedules on message sets for auto
transition
Package: django-metadata
Attach metadata to any Django models using redis.InstallationEither check out the package fromGitHubor it pull from a release via PyPI:pip install django-metadataUsageWithdjango-metadatayou can attach metadata to any Django models, you will
be able to link keys and theirs values to any instances.Currently onlyRedisis supported with onlyredis-pyas backend.Let’s say you have this model:# models.pyfromdjango.dbimportmodelsclassUser(models.Model):username=models.CharField(max_length=150)Now you have to attach theMetadataMixinto your model:# models.pyfromdjango.dbimportmodelsfrommetadata.mixinsimportMetadataMixinclassUser(MetadataMixin,models.Model):username=models.CharField(max_length=150)You can customize the waydjango-metadatais storing your values by providing
ametadata_keyproperty to your model:# models.pyfromdjango.dbimportmodelsfrommetadata.mixinsimportMetadataMixinclassUser(MetadataMixin,models.Model):username=models.CharField(max_length=150)defmetadata_key(self):return'metadata:utilisateur:%d'%self.pkBy default, the schema will bemetadata:%(lowerclassname)s:%(primary_key)s.Now we have connected our model to the mixin we can play with the API.The API ofMetadataContainerfollows the same principes asdict.Adding keys>>>frommyapp.modelsimportUser>>>user=User.objects.create(username='thoas')>>>user.metadata['mail_signup_sent']=1>>>user=User.objects.get(username='thoas')>>>user.metadata['mail_signup_sent']1>>>user.metadata={'mail_signup_sent':0}>>>user.metadata['mail_signup_sent']0Removing keysYou can either removing a key by setting its value toNoneor use thedeloperator.>>>deluser.metadata['key']>>>user.metadata['key']Traceback(mostrecentcalllast):...KeyError:'key'>>>user.metadata.get('key',None)None>>>user.metadata['foo']='bar'>>>user.metadata['foo']=None>>>user.metadata['foo']Traceback(mostrecentcalllast):...KeyError:'foo'>>>user.metadata.get('foo',None)None>>>user.metadata['key']='value'>>>user.metadata['foo']='bar'>>>user.metadata={'foo':None}>>>user.metadata['foo']Traceback(mostrecentcalllast):...KeyError:'foo'>>>user.metadata['key']valueIterating keys>>>'value'inuser.metadataTrue>>>user.metadata.values()['value']>>>user.metadata.keys()['key']>>>user.metadata.items()[('key','value')]Incrementing keysAs we are using Redis as storing engine you can use some of its nice features:>>>user.metadata.incr('counter')>>>user.metadata['counter']1>>>user.metadata.incr('counter',2)>>>user.metadata['counter']3Inspirationdjango-metadatacomes from an original idea oftwidi.
Package: django-meta-image-fixed
This pluggable app allows Django developers to quickly add meta tags andOpenGraph, Twitter, and Google Plus properties to their HTML responses.Notedjango-meta is now maintained by Nephila ongithub. Old bitbucket
repository won’t be updated anymore.Warningas of version 1.0 django-meta has included django-meta-mixin 0.2.1;
django-meta 1.0 is a drop in replacement for django-meta-mixin:
as a result django-meta-mixin is no longer actively developedWarningAs of version 1.4, the support for Python 2.6 and Django<1.8 has been droppedContentsInstallationSupported versionsDjangoPythonBasic conceptAuthors and ContributorsApps using django-meta / extensionsReporting bugsInstallationSeehttps://django-meta.readthedocs.io/en/latest/installation.htmlSupported versionsDjango1.11 to 3.0 (newer versions might work but are not tested yet)PythonPython 2.7, 3.5 to 3.8Basic conceptdjango-metaprovides aview-methodandmodel-methodinterface to provide and handle meta informationsFor more details checkdocumentation.Authors and Contributorsdjango-metahas been started byBranko Vukelic.Current maintainer:Iacopo SpallettiSeeAUTHORSfile for the complete list of contributorsApps using django-meta / extensionsSeethird_party_appsReporting bugsPlease report all bugs to our Githubissue tracker.
Package: django-metamask-auth
This is a Django Application which allows you to create one click SignUp and Logins
with Meta Mask extension. This application does need a metamask extension installed
in your browser to work.This app using djangorestframework-simplejwt to manage JWT tokens and you can refer to theirdocumentationQuick startAdd “metaMaskAuth” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'metaMaskAuth',
]Include the metaMaskAuth URLconf in your project urls.py like this:path('metamask/', include('metaMaskAuth.urls')),Runpython manage.py migrateto create the metaMask models.URLSCreate User instance with meta mask wallets public addressTo create a user and wallet instance based on public address of metamask wallet, send aPOSTrequest to the base url for the application. Using the above
example it would bemetamask/By default the url will expect the following data:{
    user: {
        <USER_MODEL_REQUIRED_FIELDS>

    }
    public_address: <public_address>
}Example using the django default user model:{
    user: {
        username: Example,
        email: example@gmail.com
    }
    public_address: examplepublicaddress123
}You dont need to send a password. An unsable password is set for the user model since we wont be needing it for validationAn automatic nonce is generated for the user on creationRetrieve Nonce for Created UserTo retreive the nonce of an instance send aGETrequest to the base url for the application with public_address as a path param. Using the above
example it would bemetamask/<int: public_address>This will fetch the wallet data as per serializerLogin User to get JWT TokenTo login a user send aPOSTrequest to the baseurl +login/<int:public_address>post fix. Using the above
example it would bemetamask/login/<int: public_address>By default the url will expect the following data:{
    signature : <signed by meta mask>
}This will reqturn an JWT token in reponse which can be used for authentication.The rest is same as using djangorestframework-simplejwt to manage JWT tokens and you can refer to their `documentation <https://django-rest-framework-simplejwt.readthedocs.io/en/latest/>`_ for configurationa and customizationsSettingsYou can provideMetaMaskAuthsettings like this:DEFAULTS = {
    "UPDATE_LAST_LOGIN": False,
    "NONCE_LEN": 24,
    "VALIDATION_SERIALIZER": "metaMaskAuth.serializers.WalletTokenObtainSerializer",
    "WALLET_AUTHENTICATION_SERIALIZER": "metaMaskAuth.serializers.WalletAuthSerializer",
    "USE_SLIDING_TOKEN": False,
}UPDATE_LAST_LOGINA boolean value, which is used to update last login of user on loginNONCE_LENAn int value, which controls the length of nonce generated. Default is 24VALIDATION_SERIALIZERThis is a string import, for the serializer which contains the logic for validation.
You can override this serializer to customize the validation method. This would then be inherited by
TokenObtainPairSerializer aswell as TokenObtainSlidingSerializer.USE_SLIDING_TOKENA boolean value, used to set whether to use sliding token or not.
Package: django-metamodel
Add arbitrary data to your django users. This app addsuser.metawhich acts like a dictionary and stores whatever the hell you want. But you could add.metato any of your models.Addmetato your installed_apps if you want to use the includeduser.meta. If you just want to add meta to your models, extendmeta.models.ModelMetaand add a foreign key to something.There’s not much to it. Just read the code.
Package: django-meta-pages
django-meta-pagesDjango Library To Use Meta Tags And Schema Structure In Any URL PathStep 1 Installationfirst need install with pippipinstalldjango-meta-pagesStep 2 settings.pyFirst Add To INSTALLED_APPSNext StepAdd To Templates context_processorsINSTALLED_APPS=[...'meta_pages',...]TEMPLATES=[{..."OPTIONS":{"context_processors":[..."meta_pages.context_processors.schema","meta_pages.context_processors.meta",],},},]Step 3Include Meta Template To Your Base Template<head>{%include'meta_pages/meta.html'withmeta=meta%}</head>Step 4python manage.py migrateDone!
Package: django-metaredirect
A simple pluggable Django application that allows maintaining internal HTTP
referrers for external links by using META-tag or JavaScript based redirects for
interactive user agents (e.g. graphical browers), while falling back to standard
HTTP response classes (301 and 302 status codes) for non-interactive clients.InstallationAddmetaredirectto your project’sINSTALLED_APPSsettings.Instead of usingdjango.views.generic.simple.redirect_toor plainHttpResponseRedirect/HttpResponsePermanentRedirectresponse classes for
view responses, usemetaredirect.views.redirect_to.Testingmake testandmaketest-matrixTesting in Your ApplicationTo ensure a HTTP 200 redirect is the response for a given request, check the
presence and value of theX-Locationheader in the response for a browser
user-agent.
Package: django-meta-tag-view
Installation$[sudo]pipinstalldjango-meta-tag-viewviews.pyfromdjango_meta_tag_view.viewsimportMetaTagMixinclassView(MetaTagMixin,...):meta_tags={'robots':'noindex'}classView(MetaTagMixin,...):defget_meta_tags(self):return{'description':'description ...','keywords':'keywords ...'}Templates<head>{{ meta_tags }}</head>readme42.com
Package: django-method-override
Django Method OverrideDjango middleware that overrides the HTTP method through either a_methodform param (Ruby on Rails style) or the X-HTTP-Method-Override header.InstallationInstall via pip:pipinstalldjango-method-overrideAdd theMethodOverrideMiddlewareafterDjango'sCsrfViewMiddleware:MIDDLEWARE=(# ...'django.middleware.csrf.CsrfViewMiddleware','method_override.middleware.MethodOverrideMiddleware',# ...)Addmethod_overrideto yourINSTALLED_APPS:INSTALLED_APPS=(# ...'method_override',)UsageUse the provided template tag in your form to add the desired form:{%loadmethod_override%}<formaction="{%url'post-detail'%}"method="POST">{%csrf_token%}{%method_override'PUT'%}</form>Now, you may useputin you Class-based views. Django Method Override will even copy over the form data torequest.PUT:classPostView(View):defput(self,request):form=Form(request.PUT)# ...The X-HTTP-Method-Override header is also supported. So for the above view, this will work too:$.ajax({headers:{"X-HTTP-Method-Override":"PUT"},type:"POST",url:"http://localhost:8000/posts/1/"// ...});ConfigurationDjango Method Override can be customized from your Djangosettings.pyfile:METHOD_OVERRIDE_ALLOWED_HTTP_METHODSA list of the allowed methods for overriding. Defaults to:['GET','HEAD','PUT','POST','DELETE','OPTIONS','PATCH']METHOD_OVERRIDE_PARAM_KEYThe form param key used to override the method. Defaults to'_method'.METHOD_OVERRIDE_HTTP_HEADERThe HTTP header to check. Defaults to'HTTP_X_HTTP_METHOD_OVERRIDE'METHOD_OVERRIDE_INPUT_TEMPLATEThe string tempalte used to render the input for the form param. It will based to kwargs,nameandvalue. Defaults to:'<input type="hidden" name="{name}" value="{value}">'CopyrightCopyright (c) 2013LocalMed, Inc.. See LICENSE for details.
Package: django-metro
django-metroMetro models for Django (for 2+, for django 1.x support use 0.4.2
version), plus the parser that fills models with actual data from
various data providers (primary - Wikipedia). This is renamed
django-russian-metro package (!).All russian and cis parsers (like kiev or minsk) respects locale, that’s
why for en locale they returns transliterated version of names. Parsers
for other cities takes only english names.Parser downloads the following data:MetroLine: number, color and titleMetro: line binding, titleAlso you can run django command sometimes to get always actual data, or
use celery task load_metro.InstallingFor install django-metro, run on terminal:$ pip install django-metroThen add this app toINSTALLED_APPS:INSTALLED_APPS = (
    ...
    'metro',
    ...
)Apply migrations:./manage.py migrateChoose and specify data provider insettings.py:METRO_PROVIDER = 'moscow'Finally, fill models with data:./manage.py load_metroOr:from metro.parser import provider
provider.download_all()Or use celery taskload_metro(shared task intasks.py)Current available data providers(list updated)AssignMETRO_PROVIDER(in settings.py) one of the values below
(source indicated in brackets):Russia'moscow'– Moscow (Wiki)'spb'– Saint Petersburg (Wiki)'novgorod'– Nizhny Novgorod (Wiki)'novosib'– Novosibirsk (Wiki)'ekat'– Yekaterinburg (Wiki/self)'kazan'– Kazan (Wiki)'samara'– Samara (Wiki)'omsk'– Omsk (self) :)CIS'kiev'– Kiev (Wiki)'minsk'– Minsk (Wiki)World'tokyo'– Tokyo (Wiki)'london'– London (Wiki), very basic (without zones and branches)Other stuffYou can rename application title withMETRO_APP_TITLEin yoursettings.py:METRO_APP_TITLE = u'Saint Petersrburg Metro'Adopted for django-suit (SortableStackedInline).LicenseMIT probably.
Package: django-mfa
Django-mfa(Multi-factor Authentication) is a simple django package to add extra layer of security to your web application. Django-mfa is providing easiest integration to enable Multi factor authentication to your django applications. Inspired by the user experience of Google’s Authentication, django-mfa allows users to authenticate through text message(SMS) or by using token generator app like google authenticator.We welcome your feedback on this package. If you run into problems, please raise an issue or contribute to the project by forking the repository and sending some pull requests.This Package is compatible with Django versions >=1.10 (including at least Django 2.0.7) Documentation is available at readthedocs(http://django-mfa.readthedocs.io/en/latest/)Quick startInstallationThe Git repository can be cloned with this command:git clone https://github.com/MicroPyramid/django-mfaThedjango_mfapackage, included in the distribution, should be
placed on thePYTHONPATH.Otherwise you can justeasy_install-Zdjango-mfaorpip installdjango-mfa.SettingsAdd app name in settings.py:INSTALLED_APPS = [
   '..................',
   'django_mfa',
   '..................'
]Add ‘django_mfa.middleware.MfaMiddleware’ to your project middlewares:MIDDLEWARE = [
   '....................................',
   'django_mfa.middleware.MfaMiddleware',
   '....................................',
]Optional issuer name.  This name will be shown in the Authenticator App along with the usernameMFA_ISSUER_NAME = “Cool Django App”Optionally enable remember-my-browser.  If enabled, the browser will be trusted for specified number of days after the user enters the code once:MFA_REMEMBER_MY_BROWSER = True
MFA_REMEMBER_DAYS = 90UrlsAdd the following to your root urls.py file.urlpatterns = [
    ...

    url(r'^settings/', include('django_mfa.urls')),
]Done. With these settings you have now, you will get the MFA features.You can try it by hosting on your own or deploy to Heroku with a button click.Visit our Django web development pageHereWe welcome your feedback and support, raisegithub ticketif you want to report a bug. Need new features?Contact us here
Package: django-mflf
Django model field list fieldThis is a Django model field that provides a list of some other model's fields. Fields can be multi-selected and "under the hood" are stored as a comma-separated string. Also package provides simple form field with the same capabilities.RequirementsPython 2.7+ or Python 3.3+Django 1.11+InstallationInstalldjango-mflfusing pip:pipinstalldjango-mflfAddmodel_field_listtoINSTALLED_APPS. Example:INSTALLED_APPS=(...'model_field_list',...)Example usageModel field:frommodel_field_listimportModelFieldListFieldclassProductKind(models.Model):name=models.CharField(max_length=100)comparison=ModelFieldListField('comparison criteria',source_model=Product)If referenced model has many fields it would be useful to useFilteredSelectMultiplein Django admin:fromdjango.contrib.admin.widgetsimportFilteredSelectMultipleclassProductKindAdminForm(forms.ModelForm):classMeta:widgets={# different widget label is intentional'comparison':FilteredSelectMultiple('product properties',False)}Simple form field:fromdjango.contrib.admin.widgetsimportFilteredSelectMultiplefrommodel_field_listimportModelFieldListFormFieldclassProductExportForm(ExportForm):export_fields=ModelFieldListFormField(source_model=Product,label='Export fields',widget=FilteredSelectMultiple('свойства товара',False))LimitationsAll model fields are listed, no option to filter them in any way.Field order can't be customized - they are sorted by the order of their definition in a model.
Package: django-mgsub
This Django module provides aFormViewand aFormthat subscribe the user
to a list onMailgun.UsageInstall:pip install django-mgsub
pip freeze | grep django-mgsub >> requirements.txtAdd to Django:# settings.py
INSTALLED_APPS += 'mgsub',Configure credentials:# settings.py
MGSUB_DEFAULT_MAILINGLIST = 'mylist@example.com'
MAILGUN_API_KEY = '<secret>'or:export MGSUB_DEFAULT_MAILINGLIST='mylist@example.com' MAILGUN_API_KEY=...Add urls:# urls.py
urlpatterns = [
  ...
    url('^mailinglist/', include('mgsub.urls', namespace='mgsub')),
  ...
]Configure:## settings.py

# Setting this to False will disable email sending and the following
# settings
MGSUB_SEND_WELCOME = True

MGSUB_WELCOME_FROM = 'noreply@example.com'    # defaults to settings.SERVER_EMAIL
MGSUB_WELCOME_REPLY_TO = 'me@example.com'     # nothing by default

# Subscription email templates
MGSUB_WELCOME_SUBJECT = 'Welcome to my list!' # Defaults to: Welcome!
MGSUB_WELCOME_TEMPLATE = 'myapp/welcome.html' # HTML template
MGSUB_WELCOME_TEMPLATE_PLAIN = 'myapp/w.txt'  # Plain text template
Package: django-michael-jackson
django-michaeljacksonA middleware library that puts Michael Jackson's information into every response.InstallationUse the package managerpipto install foobar.pipinstalldjango-michaeljacksonIn your settings.pyINSTALLED_APPS.append('michaeljackson')MIDDLEWARE.append('michaeljackson.middleware.MJMiddleware')ResultYou will see the headerX-Michael-Jacksonin your response.X-Michael-Jackson: Parent(s): Joe Jackson Katherine Jackson
Package: django-microapi
django-microapiA tiny library to make writing CBV-based APIs easier in Django.Essentially, this just provides some sugar on top of the plain olddjango.views.generic.base.Viewclass, all with the intent of making handling JSON APIs easier (without the need for a full framework).Usagefromdjango.contrib.auth.decoratorsimportlogin_required# We pull in two useful classes from `microapi`.frommicroapiimportApiView,ModelSerializerfrom.modelsimportBlogPost# Inherit from the `ApiView` class...classBlogPostView(ApiView):# ...then define `get`/`post`/`put`/`delete`/`patch` methods on the# subclass.# For example, we'll provide a list view on `get`.defget(self,request):posts=BlogPost.objects.all().order_by("-created")# The `render` method automatically creates a JSON response from# the provided data.returnself.render({"success":True,"posts":self.serialize_many(posts),})# And handle creating a new blog post on `post`.@login_requireddefpost(self,request):# Read the JSONdata=self.read_json(request)# TODO: Validate the data here.# Use the included `ModelSerializer` to load the user-provided data# into a new `BlogPost`.post=self.serializer.from_dict(BlogPost(),data)# Don't forget to save!post.save()returnself.render({"success":True,"post":self.serialize(post),})Installation$pipinstalldjango-microapiRationaleThere are a lot of API frameworks out there (hell, Ibuilttwoof them). But for many tasks, they're eitheroverkillor just too opinionated.Sodjango-microapiis kind of the antithesis to those. With the exception of a tiny extension toViewfor nicer errors, it doesn't callANYTHINGautomatically. Other than being JSON-based, it doesn't have opinions on serialization, or validation, or URL structures.You write the endpoints you want, andmicroapibrings some conveniences to the table to make writing that endpoint as simple as possiblewithoutassumptions.I've long had a place in my heart for the simplicity of Django's function-based views, as well as the conveniences ofdjango.shortcuts.microapitries to channel that love/simplicity.API Docshttps://django-microapi.rtfd.io/TestingTo run the tests, you'll need bothPipenv, andJustinstalled.$justtestLicenseNew BSD