Saravanan666/pypi-org huggingface dataset:
Package: django-magic-fortmatic
Magic Admin Python SDKThe Magic Admin Python SDK provides convenient ways for developers to interact with Magic API endpoints and an array of utilities to handleDID Token.Table of ContentsDocumentationQuick StartDevelopmentChangelogLicenseDocumentationSee theMagic doc!InstallationYou can directly install the SDK with:pip:pip install magic-adminconda:conda install magic-adminPrerequisitesPython 3.6Note: This package has only been tested withPython 3.6.Python 3.7andPython 3.8have not been tested yet. We will get to it very soon. Support forPython 2.7+will not be actively worked on. If you are interested using this package with earlier versions of Python, please create a ticket and let us know :)Quick StartBefore you start, you will need an API secret key. You can get one from theMagic Dashboard. Once you have the API secret key, you can instantiate a Magic object.from magic_admin import Magic

magic = Magic(api_secret_key='<YOUR_API_SECRET_KEY>')

magic.Token.validate('DID_TOKEN')

# Read the docs to learn more! 🚀Optionally if you would like, you can load the API secret key from the environment variable,MAGIC_API_SECRET_KEY.# Set the env variable `MAGIC_API_SECRET_KEY`.

magic = Magic()Note: The argument passed to theMagic(...)object takes precedence over the environment variable.Configure Network StrategyTheMagicobject also takes inretries,timeoutandbackoff_factoras optional arguments at the object instantiation time so you can override those values for your application setup.magic = Magic(retries=5, timeout=10, backoff_factor=0.03)DevelopmentWe would love to have you contributing to this SDK. To get started, you can clone this repository and create a virtualenv.make developmentThis will create a virtualenv for all the local development dependencies that the SDK will needs.Once it is done, you cansourcethe virtualenv. It makes your local development easier!source virtualenv_run/bin/activateTo make sure your new code works with the existing SDK, run the test against the current supported Python versions.make testTo clean up existing virtualenv, tox log and pytest cache, do amake cleanThis repository is installed withpre-commit. All of the pre-commit hooks are run automatically with every new commit. This is to keep the codebase styling and format consistent.You can also run the pre-commit manually. You can find all the pre-commit hookshere.pre-commit runPlease also see ourCONTRIBUTINGguide for other information.ChangelogSeeChangelogLicenseSeeLicense
Package: django-magic-notifier
Django Magic NotifierWhy Django Magic NotifierSending notifications in Django has always been a complex subject. Django Magic Notifier solves this by providing only one functionnotify(). The library [will] support sending notifications via email, sms and push notifications.DocumentationFull documentationFeaturesSend emailsSend sms, TWILIO supportSend push notificationsSupport templatesSimple APISupport filesSupport multiple gatewaysExtensibleSupport MJMLInstallationpip install --upgrade django-magic-notifierUsage1. Configure settingsIf you have already configured SMTP EMAIL SETTINGS in django settings then can ignore this step. Else add a NOTIFIER dict in your settings like thisNOTIFIER={"EMAIL":{"default":{"HOST":"localhost","PORT":587,"USE_TLS":True,"USE_SSL":False,"USER":"root@localhost","FROM":"Root <root@localhost>","PASSWORD":"********","CLIENT":"magic_notifier.email_clients.django_email.DjangoEmailClient",}},"USER_FROM_WS_TOKEN_FUNCTION":'magic_notifier.utils.get_user_from_ws_token'}2. Create templatesCreate a folder namednotifierin one of app's templates dir. In this folder create another folder namedmy_templatethen create your base templates in this folder. Example:app_name/templates/notifier/my_template/email.html{% extends "base_notifier/email.html" %}
{% block content %}
<tr>
    <td><p>Hello {{ user.email }}
    </td>
</tr>
{% endblock %}app_name/templates/notifier/my_template/email.txt{% extends "base_notifier/email.txt" %}
{% block content %}
Hello {{ user.email }}
{% endblock %}As you can see, the user to whom the notification goes is automatically added
in the template's context. To avoid any clash don't send the key'user'in the context of thenotifiy()function presented below.Note that it is DMN (Django Magic Notifier) that has the base_notifier template.3. Send notificationsTo send a notification via email dofrommagic_notifier.notifierimportnotify# send an email from direct stringuser=User(email="testuser@localhost",username="testuser")subject="Test magic notifier"notify(["email"],subject,[user],final_message="Nice if you get this")# send an email from a templateuser=User(email="testuser@localhost",username="testuser")subject="Test magic notifier"notify(["email"],subject,[user],template='hello')# send a sms from a templateuser=User(email="testuser@localhost",username="testuser")subject="Test magic notifier"notify(["sms"],subject,[user],template='hello')# send a notification via email and sms from a templateuser=User(email="testuser@localhost",username="testuser")subject="Test magic notifier"notify(["email","sms"],subject,[user],template='hello')Docs and supporthttps://django-magic-notifier.readthedocs.io/en/latest/index.htmlRoadmapGenerate full documentationTranslate documentationContributingContribution are welcome.LicenseAs per the license, feel free to use the library as you want.
Package: django-magic-tables
=====
Magic TablesMagic Tables is a Django app to turn QuerySets into any kind of table.Detailed documentation is in the "docs" directory.Quick startInstall package::$ pip install django-magic-tablesAdd "magic_tables" to your INSTALLED_APPS setting like this:::INSTALLED_APPS = [
      ...
      'magic_tables',
  ]Load "magic_tables_tags" at the top of the page where you want to use them like this:::{% load magic_tables_tags %}
  [...]Create a magic table:::[...]

  {% table object_list "optional classes separated by spaces" %}

  [...]Use it with DatatableInclude CSS::<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.2.4/css/responsive.bootstrap4.min.css">Include JS::<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.js"></script>
  <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.21/js/dataTables.bootstrap4.min.js"></script>
  <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/responsive/2.2.4/js/dataTables.responsive.min.js"></script>
  <script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/responsive/2.2.4/js/responsive.bootstrap4.min.js"></script>
  <script>
      $(document).ready( function () {
          $('.data-table').DataTable( {
              'language': {
                  'lengthMenu': '_MENU_ Results for page',
                  'zeroRecords': 'No results',
                  'info': 'Page _PAGE_ of _PAGES_',
                  'infoEmpty': 'No results',
                  'infoFiltered': '(Filtered on _MAX_ total results)',
                  'search': 'Search: ',
                  'paginate': {
                      'first': 'First',
                      'last': 'Last',
                      'next': 'Next',
                      'previous': 'Previous'
                  }
              },
              'initComplete': () => { $('.data-table').fadeIn(); $('.graph').fadeIn(); }
          } );
      } );
  </script>Pass "data-table" as second parameter to the table tag like this:::{% table object_list "data-table" %}
Package: django-mailauth
Mailauth is a Django authentication app to replace the default
username-based authentication with an email-based authentication.Note: Mailauth should installed & setup before any migration is created.Quick startInstall thedjango-mailauthauthentication using pip from PyPi:pip install django-mailauthAdd “mailauth” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
  ...
  'mailauth',
]Replace your default “User” model with with Mailauth’s custom user model
In yoursettings.pymodule, add or update the following line:AUTH_USER_MODEL = 'mailauth.User'Runpython manage.py makemigrationsto create your first migrations.Runpython manage.py migrateto apply the changes to your database tables.Start the development server and visithttp://127.0.0.1:8000/admin/to add new users (you’ll need the Admin app enabled).
Package: django-mail-auth
Django Mail Auth is a lightweight authentication backend for Django,
that does not require users to remember passwords.Django Mail Auth features:custom user model supportdrop in Django admin supportdrop in Django User replacementdrop in Wagtail login replacementextendable SMS supportThis project was inspired by:Is it time for password-less login?byBen BrownLOGIN WITHOUT PASSWORD MOST SECURE | WAIT.. WHAT?byJoris Snoekdjango-nopasswordbyRolf Erik LekangInstallationRun this command to installdjango-mail-auth:python3 -m pip install django-mail-auth[wagtail]SetupFirst addmailauthto you installed apps:INSTALLED_APPS=[# Django's builtin apps…'mailauth','mailauth.contrib.admin',# optional'mailauth.contrib.user',# optional# optional, must be included before "wagtail.admin"'mailauth.contrib.wagtail',# other apps…]mailauth.contrib.adminis optional and will replace the admin’s login
with token based authentication too.mailauth.contrib.useris optional and provides a new Django User model.
The new User model needs to be enabled via theAUTH_USER_MODELsetting:# This setting should be either "EmailUser" or# any custom subclass of "AbstractEmailUser"AUTH_USER_MODEL='mailauth_user.EmailUser'# optional, Wagtail onlyWAGTAILUSERS_PASSWORD_ENABLED=FalseNext you will need to add the new authentication backend:AUTHENTICATION_BACKENDS=(# default, but now optional# This should be removed if you use mailauth.contrib.user or any other# custom user model that does not have a username/password'django.contrib.auth.backends.ModelBackend',# The new access token based authentication backend'mailauth.backends.MailAuthBackend',)Django’sModelBackendis only needed, if you still want to support
password based authentication. If you don’t, simply remove it from the list.Last but not least, go to your URL root configurationurls.pyand add the following:fromdjango.urlsimportpathurlpatterns=[path('accounts/',include('mailauth.urls')),# optional, must be before "wagtail.admin.urls"path('',include('mailauth.contrib.wagtail.urls')),]That’s it!NoteDon’t forget to setup you Email backend!
Package: django-mailcenter
django-mailcenterDjango mailcenter application.Installpip install django-mailcenterUsagepro/settings.pyINSTALLED_APPS = [
    ...
    'django_static_ace_builds',
    'django_db_lock',
    'django_fastadmin',
    'django_mailcenter',
    ...
]AceWidget used for options editor, so we needsdjango_static_ace_buildsto provide ace-builds static files, anddjango_fastadmin.widgets.AceWidget.models.MailForDelivery as based ondjango_fastadmin.models.SimpleTaskand it usedjango_db_lockto do distribute lock.Releasesv0.1.5 2020/11/27Fix MailForDeliveryAdmin search filed problem.v0.1.4 2020/11/23Fix model import problem.v0.1.3 2020/09/08Add django_mailcenter.client module.Upgrade SimpleTask base class.Use abstract models classes.v0.1.2 2020/09/01Rename zh_hans to zh_Hans.Update depends packages' version.v0.1.1 2020/09/01Add many required packages in requirements.txt.v0.1.0 2020/08/31First release.
Package: django-mailcss
[![Build Status](https://travis-ci.org/wejhink/django-mailcss.png?branch=master)](https://travis-ci.org/wejhink/django-mailcss)## AboutSending a mail with CSS for is currently a surprisingly large hassle.This library aims to make it a breeze in the Django template language.## Usage#### Step 1: Dependencies- BeautifulSoup- cssutils- Python 2.7+,3.4+- Django 1.11+#### Step 2: Install django_mailcssAdd ```django_mailcss``` to your ```settings.py```:```pythonINSTALLED_APPS = ('django.contrib.auth','django.contrib.webdesign','django.contrib.contenttypes','...','...','...','django_mailcss')```#### Step 3: Use the templatetag1. Place your CSS file somewhere staticfiles can find it2. Create your template:```html{% load mailcss %}{% mailcss "css/extra-padding.css" %}<html><body><div class='lots-o-padding'>Something in need of styling.</div></body></html>{% endmailcss %}```#### Step 4: Prepare to be Wowed```html<html><body><div style="padding-left: 10px; padding-right: 10px; padding-top: 10px;" class="lots-o-padding">Something in need of styling.</div></body></html>```## AcknowledgementsThanks to Jeremy Nauta, Philip Kimmey and Keith for [django-inlinecss](https://github.com/roverdotcom/django-inlinecss)Thanks to Tanner Netterville for his efforts on [Pynliner](https://github.com/rennat/pynliner).Thanks to Thomas Yip for his unit tests on the `soupselect` module. These testshelped on getting the core CSS2 selectors to work.## LicenseMIT license. See LICENSE.md for more detail.
Package: django-mail-dbtpl
The application allows you to store email templates in the database. The application also allows you to edit templates
in the database data usingckeditor. More details about the settings availableckeditor.InstallingInstall the application using pip.> pip install django-mail-dbtplAdd application settings Django projectINSTALLED_APPS = (
...
'django_mail_dbtpl',
...
)Apply migrationpython ./manage.py migrate django_mail_dbtplUsageAfter installation, you must create a letter template in the database via the administration panel by urlhttp://127.0.0.1:8000/admin/django_mail_dbtpl/emailtemplate/, it is necessary for the template specifyslug.slugwill be used for both identifier template. The templates can be determined context variables{{var}}.
For example, you create a template withslug = 'welcome.tpl',subject = 'Welcome,{{username}}',body = 'Welcome to the{{site}}.'. The following is the code that shows how to use the template stored in the databasefrom django_mail_dbtpl.utils import EmailWrapper
context = {
    'username': 'Example User',
    'site': 'example.com'
}
msg = EmailWrapper('welcome.tpl', context)
msg.from_email = 'from_email@example.com'
msg.to = ['to_email@example.com']
msg.send()
Package: django-mailer
django-maileris a reusable Django app for queuing the sending of email.
It works by storing email in the database for later sending.
The main reason for doing this is that for many apps, the database will be
much more reliable and faster than other email sending backends which require
3rd party services e.g. SMTP or an HTTP API. By storing and sending later, we can
return succeed immediately, and then attempt actual email sending in the background,
with retries if needed.
Package: django-mailer-2
django-mailer-2 is asynchronous so in addition to putting mail on the queue you
need to periodically tell it to clear the queue and actually send the mail.The latter is done via a command extension.Putting Mail On The Queue (Django 1.2 or higher)In settings.py, configure Django’s EMAIL_BACKEND setting like so:EMAIL_BACKEND = ‘django_mailer.smtp_queue.EmailBackend’If you don’t need message priority support you can call send_mail like
you normally would in Django:send_mail(subject, message_body, settings.DEFAULT_FROM_EMAIL, recipients)If you need prioritized messages, create an instance of EmailMessage
and specify {‘X-Mail-Queue-Priority’: ‘<value>’} in theheadersparameter,
where <value> is one of:‘now’ - do not queue, send immediately
‘high’ - high priority
‘normal’ - standard priority - this is the default.
‘low’ - low priorityIf you don’t specify a priority, the message is sent at ‘normal’ priority.Putting Mail On The Queue (Django 1.1 or earlier)Because django-mailer currently uses the same function signature as Django’s
core mail support you can do the following in your code:# favour django-mailer-2 but fall back to django.core.mail
from django.conf import settings

if "django_mailer" in settings.INSTALLED_APPS:
    from django_mailer import send_mail
else:
    from django.core.mail import send_mailand then just call send_mail like you normally would in Django:send_mail(subject, message_body, settings.DEFAULT_FROM_EMAIL, recipients)Additionally you can send all the admins as specified in theADMINsetting by calling:mail_admins(subject, message_body)or all managers as defined in theMANAGERSsetting by calling:mail_managers(subject, message_body)Command ExtensionsWith mailer in your INSTALLED_APPS, there will be four new manage.py commands
you can run:send_mailwill clear the current message queue. If there are any
failures, they will be marked deferred and will not be attempted again bysend_mail.retry_deferredwill move any deferred mail back into the normal queue
(so it will be attempted again on the nextsend_mail).cleanup_mailwill delete mails created before an X number of days
(defaults to 90).status_mailthe intent of this commant is to allow systems as nagios tobe able to ask the queue about its status. It returns as string with than
can be parses as(?P<queued>\d+)/(?P<deferred>\d+)/(?P<seconds>\d+)You may want to set these up via cron to run regularly:* * * * * (cd $PROJECT; python manage.py send_mail >> $PROJECT/cron_mail.log 2>&1)
0,20,40 * * * * (cd $PROJECT; python manage.py retry_deferred >> $PROJECT/cron_mail_deferred.log 2>&1)
0 1 * * * (cd $PROJECT; python manage.py cleanup_mail --days=30 >> $PROJECT/cron_mail_cleanup.log 2>&1)This attempts to send mail every minute with a retry on failure every 20 minutes
and will run a cleanup task every day cleaning all the messaged created before
30 days.manage.py send_mailuses a lock file in case clearing the queue takes
longer than the interval between callingmanage.py send_mail.Note that if your project lives inside a virtualenv, you also have to execute
this command from the virtualenv. The same, naturally, applies also if you’re
executing it with cron.
Package: django-mailer-server-backend
A django mail backend for mailer server (https://github.com/spapas/mailer_server)Install it from pip:pip installdjango-mailer-server-backendor the latest version from git:pip installgit+https://github.com/spapas/django-mailer-server-backendThen use the following conf in your django app:MAILER_SERVER_TOKEN='YOUR_MAILER_SERVER_TOKEN'MAILER_SERVER_URL='http://MAILER_SERVER_URL/mail/api/send_mail/'EMAIL_BACKEND='mailer_email_backend.MailerServerBackend'### Changelog0.3.0: Add support for file attachments (works only with python 3.x)
Package: django-mailer-throttled
Django Mailer ThrottledAddon fordjango-mailerallows to
send throttled emails.Install this as an addon alongsidedjango-mailer.InstallationTo get the latest stable release from PyPipipinstalldjango-mailer-throttledTo get the latest commit from GitHubpipinstall-egit+git://github.com/bitmazk/django-mailer-throttled.git#egg=mailer_throttledAddmailer_throttledto yourINSTALLED_APPSINSTALLED_APPS=(...,'mailer''mailer_throttled',)UsageSet theMAILER_THROTTLE_AMOUNTto the number of emails you would like to
send per run.Don’t use the originalsend_mailmanagement command any more but the newsend_mail_throttled.ContributeIf you want to contribute to this project, please perform the following steps# Fork this repository
# Clone your forkmkvirtualenv-ppython2.7django-mailer-throttledmakedevelopgitco-bfeature_branchmaster# Implement your feature and testsgitadd.&&gitcommitgitpush-uoriginfeature_branch# Send us a pull request for your feature branch
Package: django-mail-factory
Django Mail Factory lets you manage your email in a multilingual project.Authors: Rémy Hubscher andcontributorsLicence: BSDCompatibility: Django 1.11, 2.0, 2.1 and 2.2, python2.7, 3.5, 3.6 and 3.7Project URL:https://github.com/peopledoc/django-mail-factoryDocumentation:http://django-mail-factory.rtfd.org/HackingSetup your environment:git clone https://github.com/peopledoc/django-mail-factory.git
cd django-mail-factoryHack and run the tests usingToxto test
on all the supported python and Django versions:make testIf you want to give a look at the demo (also used for the tests):bin/python demo/manage.py syncdb  # create an administrator
bin/python demo/manage.py runserverYou then need to login onhttp://localhost:8000/admin, and the email
administration (preview or render) is available athttp://localhost:8000/mail_factory/.ReleaseTo prepare a new version:Create a branch namedrelease/<version>In a commit, change theCHANGELOGandVERSIONfile to remove the.dev0and set the date of the releaseIn a second commit, change theVERSIONto the next version number +.dev0Create a PR for your branchWhen the PR is merged, tag the first commit with the version number, and create a github release using theCHANGELOGTo release a new version (including the wheel):pip install twine
python setup.py sdist bdist_wheel
twine upload --repository-url https://test.pypi.org/legacy/ dist/*And after testing everything works fine on the testing repository:twine upload dist/*
Package: django-mailfactory-extras
Extra features fordjango-mail-factory.New features:SMS factory to handle SMS like mails, Twilio integration implemented.Async email class to send email via celery.SMS Factory:Defining SMS templates:Define your templates inside a foldertemplates/sms/<template_name>/body.html.Registering a SMS message using Twilio backend (Twilio python client needed):frommailfactory_extrasimportsmsfactoryfrommailfactory_extras.sms.twilio.smsimportTwilioSMSclassInvitationSMS(TwilioSMS):template_name="invitation"params=['user']smsfactory.register(InvitationSMS)template_namedefines the name of the template to use.paramsis the dict with the context variables the template will receive.Sending SMS, just callsend()from the smsfactory:frommailfactory_extrasimportsmsfactorysmsfactory.send('invitation',{'user':'Foo'})Async email class:Define your email class usingCeleryMail.frommail_factoryimportfactoryfrommailfactory_extras.backends.celeryimportCeleryMailclassInvitationAsyncEmail(CeleryMail):template_name="invitation"params=['user']factory.register(InvitationAsyncEmail)
Package: django-mailformer
=================Django Mailformer=================Application setup=================Assuming you have added this application in your projects requirements.txt, youcan start using it by following these steps:First start with installing:.. code:: consolepip install git+ssh://git@github.com/developersociety/django-mailformer.git@master#egg=django-mailformer1) Add `mailformer` to your applications in the settings file.2) In your urls.py add to your url patterns:.. code:: consoleurlpatterns = [# all the other valuesurl(r'^email/', include('mailformer.urls')),]The actual url these are added to is up to you. Do not define a namespace inthe include as this will prevent the internals of finding the URLs used forthe form and submission success page. It is however possible to manipulatethis if so required, however you will need to directly add the form andsubmission page and override the constants.URL_NAME values.3) In your template add `{% load mailformer %}`4) Wherever you would display the email replace it with:.. code:: console<a href="{% get_url_by_email email_address %}">contact form</a>Where `email_address` is the email_address you want to mail to.You can also add other keys so that the form get prefilled values.These keys are: [name, phone_number, subject, message]The field `identifier` is hidden but required.5) You should define your own forms by creating a submit form named`mailformer/mailformer-form.html` and a success form named`mailformer/mailformer-success.html`.Development setup=================It's recommended you use `virtualenvwrapper <https://virtualenvwrapper.readthedocs.io/en/latest/>`_and `The Developer Society Dev Tools <https://github.com/developersociety/tools>`_.Presuming you are using those tools, getting started on this project is pretty straightforward:.. code:: console$ dev-clone example_instance$ make resetYou can now run the development server:.. code:: console$ python manage.py runserver=======History=======0.0.0 (2017-06-14)------------------* Initial commit0.0.0b (2017-06-22)-------------------* Refactor to new layout