Saravanan666/pypi-org huggingface dataset:
Package: sender-policy-flattener
sender policy flattenerWe had a problem in our organisation that caused our SPF records to become invalid:When customers computers were querying our SPF records, there were more than 10 lookups required after following all of theinclude:remarks.Solution? Query them ourselves, and create a much more condense list of SPF records.But wait... What if the downstream records change?Part of what the script does is that it creates a JSON file that keeps track of the last list of IP Addresses that your combination of SPF records had.When the hashsum of your IP Addresses changes, it will send out an email (or just dump HTML if it can't find an email server) with a handy diff & BIND format for viewing what has changed, and promptly updating it.You could theoretically extract the flat IP records from the resulting JSON file and automatically update your DNS configuration with it.Installationvia git cloneClone this repo and runpipinstallpoetry
poetryinstallvia pippipinstallsender_policy_flattenerUsageusage: spflat [-h] [-c CONFIG] [-r RESOLVERS] [-e MAILSERVER] [-t TOADDR]
              [-f FROMADDR] [-s SUBJECT] [-D SENDING_DOMAIN] [-d DOMAINS]
              [-o OUTPUT]

A script that crawls and compacts SPF records into IP networks. This helps to
avoid exceeding the DNS lookup limit of the Sender Policy Framework (SPF)
https://tools.ietf.org/html/rfc7208#section-4.6.4

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Name/path of JSON configuration file
  -r RESOLVERS, --resolvers RESOLVERS
                        Comma separated DNS servers to be used
  -e MAILSERVER, -mailserver MAILSERVER
                        Server to use for mailing alerts
  -t TOADDR, -to TOADDR
                        Recipient address for email alert
  -f FROMADDR, -from FROMADDR
                        Sending address for email alert
  -s SUBJECT, -subject SUBJECT
                        Subject string, must contain {zone}
  -D SENDING_DOMAIN, --sending-domain SENDING_DOMAIN
                        The domain which emails are being sent from
  -d DOMAINS, --domains DOMAINS
                        Comma separated domain:rrtype to flatten to IP
                        addresses. Imagine these are your SPF include
                        statements.
  -o OUTPUT, --output OUTPUT
                        Name/path of output fileExamplespflat--resolvers8.8.8.8,8.8.4.4\--tome@mydomain.com\--fromadmin@mydomain.com\--subject'SPF for {zone} has changed!'\--domainsgmail.com:txt,sendgrid.com:txt,yahoo.com:a\--sending-domainmydomain.comorspflat--configspf.jsonYou can specify a config file, or you can specify all of the optional arguments from the command line.I've provided asettings.jsonfile with an example configuration file.Supported Python versionsSee the latest result of the build:https://github.com/cetanu/sender_policy_flattener/actions3rd party dependenciesnetaddrdnspythonExample email format
Package: senderscore
SenderscoreCommand line tool for Sender Score lookups.What the heck is Sender Score ?Sender Score is a number between 0 and 100 that identifies your sender reputation and shows you how mailbox providers view your IP address.The project is maintained by Return Path. For more information about the Sender Score project, visit the official FAQ page athttps://www.senderscore.org/faq/.UsageInstallationpipinstallsenderscoreCLIsenderscore<IP>Incorporate CLIfromsenderscoreimportsenderscoreip='177.136.19.206'# e.g.score=senderscore.cli(ip)Module Usagefromsenderscoreimportsenderscoreip='177.136.19.206'# e.g.score=senderscore.get_score(ip)APIValidate the syntax of a given IP:senderscore.is_valid_ip(ip:str)->boolRetrieve the Sender Score value for the given IP:senderscore.get_score(ip:str)->strRun the cli resolution for the given IP:senderscore.cli(ip:str)->NoneHow to ContributeJust fork the project and send your pull requests (with tests please).
Package: sendevent-touch
Send touch/longtouch events to BlueStacks/Android$pipinstallsendevent-touchfromsendevent_touchimportSendEventTouchsendtouch=SendEventTouch(adb_path="C:\\Users\\Gamer\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe",deviceserial="localhost:5735",sdcard="/storage/emulated/0/",# it is probably better to pass the path, not the symlinktmp_folder_on_sd_card="AUTOMAT",# if the folder doesn't exist, it will be createdbluestacks_divider=32767,use_bluestacks_coordinates=True,# Recalculates the BlueStacks coordinates https://stackoverflow.com/a/73733261/15096247)sendtouch.connect_to_adb()# Useful if you want to repeat the clickdf_click1=sendtouch.get_dataframe_for_clicks(50,50)sendtouch.touch_df(df_click1,struct_folder="struct real")# "struct real" will use the recalculated coordinates for BlueStacks# Touching without returning a DataFramesendtouch.touch(520,40,struct_folder="struct real")# Same thing for longtouch, duration is in secondssendtouch.longtouch_df(df_click1,duration=2.5,struct_folder="struct real")sendtouch.longtouch(520,40,duration=3.1,struct_folder="struct real")# Using struct_folder="struct" should work for any rooted Android device, but I haven't checked it!# I would be grateful for any feedback!df_click1=sendtouch.get_dataframe_for_clicks(50,50)sendtouch.touch_df(df_click1,struct_folder="struct")sendtouch.touch(520,40,struct_folder="struct")sendtouch.longtouch_df(df_click1,duration=2,struct_folder="struct")sendtouch.longtouch(520,40,duration=3,struct_folder="struct")#%timeit sendtouch.touch_df(df_click1 ,struct_folder="struct real")# 109 ms ± 4.62 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)#%timeit subprocess.run('adb shell input tap 50 50')# 197 ms ± 1.54 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)Tested against Windows 10 / Python 3.9.13 / BlueStacks 5It should also work with any rooted Android device, the only problem might be the "bluestacks_divider".https://stackoverflow.com/a/73733261/15096247But changing the code (if necessary) shouldn't be a big thing.Since my cell phone is not rooted, and I have no intention of rooting it, I cannot test the module against a physical Android device. (I would be grateful for any feedback)
Package: sendf
sendf is a program used to send one or more files to another person.` sendf file [files...]`It will run a HTTP server in the background, and give you a link for the file.
If a folder is given and/or multiple files are given, a tarred and compressed archive of the files will sent.
Files are NOT be saved in the cloud. The file is tranferred directly from your computer to the other person’s computer.For a full list of options, type` sendf-h`This program can automatically forward ports using UPnP if your router supports UPnP.This program is released under the BSD license.
It does depend on a UPnP component from the Tribler project, which itself is
released under the LGPL license.
Package: send-gmail
send_gmailPython : Sending an email via smtp Server
Default smpt Server : gmailusage:fromsend_gmailimportSendGMailhtml='<html><body>Hello world </body></html>'txt='Hello world as text'subject='First message'pdffile=r'c:\tmp\test.pdf'smtpsrv=SendGMail(id='xxxx@gmail.com',pwd='977823490123')"""sendArgs:from_addr (str | None): sender email, if None the id field is usedto_addr (list | str): receiver(s) email, string for one - list for manysubject (str | None ): subject as utf-8 text, if None current date is sendhtml (str, optional):html part of message. Defaults to None.text (str, optional): text part of message. Defaults to None.attachments (list | str, optional): files to attach. Defaults to None.Returns:dict: dictionary of errors, key == to_addr, value == Error"""errs=smtpsrv.send(from_addr='xxxx@gmail.com',to_addr='yyyy@gmail.com',subject=subject,html=html,text=txt,attachments=pdffile)# or send just the current date as subject to yyyy@gmail.comSendGMail(id='xxxx@gmail.com',pwd='977823490123').send(None,'yyyy@gmail.com')
Package: sendgrid-async
PythonPackageMetaAsync-SendgridSendgrid simple asynchronous client based on the httpx libarary.InstallationIt is possible to install sendgrid-async with pip:pipinstallsendgrid-asyncUsageThis is a small script showing how to send an email with async-sendgrid:First, you need to import theSendgridAPIfrom theasync_sendgridpackage. Then, you need to create aSendgridAPIobject with your API key.fromasync_sendgridimportSendgridAPIimportosAPI_KEY=os.environ.get['API_KEY']sendgrid=SendgridAPI(API_KEY)Thereafter, you can create an email with the originalsendgridpackage such:fromsendgrid.helpers.mailimportContent,Email,Mail,Tofrom_email=Email("test@example.com")to_email=To("test@example.com")subject="Lorem ipsum dolor sit amet, consectetur adipiscing elit"content=Content("text/plain","Sed varius ligula ac urna vehicula ultrices. Nunc ut dolor sem.")mail=Mail(from_email=from_email,to_email=to_email,subject=subject,content=content)Finally you can send the email with thesendmethod of theSendgridAPIinstance:asyncwithsendgridasclient:response=awaitclient.send(data)
Package: sendgrid-cli
sendgrid-cliA very simple SendGrid CLI written in Python with only basic functionalities (at this moment).The officialsendgrid-clihasn't been updated in years and I couldn't get it to work,so I wrote this with only the features I need.If you need more features, feel free to contribute by submitting pull requests.sendgrid-cliInstallationpipxpipUsageOn the command lineOn GitHub ActionsDevelopInstallationpipxThis is the recommended installation method.$ pipx install sendgrid-clipip$ pip install sendgrid-cliUsageOn the command lineusage: sendgrid [-h] [-V] [-t str [str ...]] [-f str] [-n str] [-s str]

sendgrid CLI

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -t str [str ...], --to-emails str [str ...]
                        To emails (default: None)
  -f str, --from-email str
                        From email EMAIL (default: None)
  -n str, --from-name str
                        From name NAME (default: None)
  -s str, --subject str
                        Subject (default: None)
  -H, --html            send as html instead of plain text (default: False)

Email body (HTML) is read from stdin, supply your API key with SENDGRID_API_KEY environment variableOn GitHub ActionsBelow is a working job configurationsend-mail:runs-on:ubuntu-lateststeps:-name:setup python 3.10uses:actions/setup-python@v4with:python-version:'3.10'-name:install CLI toolsrun:pipx install sendgrid-cli-name:Send emailenv:SENDGRID_API_KEY:${{ secrets.SENDGRID_API_KEY }}run:|cat email-body.html | sendgrid -f 'from@example.com' -n 'from-name' -t 'to@example.com' -s 'sendgrid-cli test' --htmlDevelop$ git clone https://github.com/tddschn/sendgrid-cli.git
$ cd 
$ poetry install
Package: sendgrid-django
Simple django backend to send email using SendGrid’s Web API.InstallationInstall the backend from PyPI:pipinstallsendgrid-djangoAdd the following to your project’ssettings.py:EMAIL_BACKEND="sgbackend.SendGridBackend"SENDGRID_API_KEY="Your SendGrid API Key"Done!Examplefromdjango.core.mailimportsend_mailfromdjango.core.mailimportEmailMultiAlternativessend_mail("Your Subject","This is a simple text email body.","Yamil Asusta <hello@yamilasusta.com>",["yamil@sendgrid.com"])# ormail=EmailMultiAlternatives(subject="Your Subject",body="This is a simple text email body.",from_email="Yamil Asusta <hello@yamilasusta.com>",to=["yamil@sendgrid.com"],headers={"Reply-To":"support@sendgrid.com"})# Add templatemail.template_id='YOUR TEMPLATE ID FROM SENDGRID ADMIN'# Replace substitutions in sendgrid templatemail.substitutions={'%username%':'elbuo8'}# Attach filewithopen('somefilename.pdf','rb')asfile:mail.attachments=[('somefilename.pdf',file.read(),'application/pdf')]# Add categoriesmail.categories=['work','urgent',]mail.attach_alternative("<p>This is a simple HTML email body</p>","text/html")mail.send()To create an instance of a SendGridBackend with an API key other than that provided in settings, passapi_keyto the constructorLicenseMITEnjoy :)DevelopmentInstall dependencies::pip install -r requirements-dev.txtRun the tests with coverage::pytest –cov=sgbackendIf you see the error “No module named sgbackend”, run::pip install -e .
Package: sendgrid_eventhooks
[![Build Status](https://api.travis-ci.org/agiliq/sendgrid-eventhooks.svg?branch=master)](https://travis-ci.org/agiliq/sendgrid-eventhooks)Django app to receive incoming email notification events from sendgridSendgrid has an incoming event api which will parse incoming emails
and send them to a webhook.https://sendgrid.com/docs/API_Reference/Webhooks/parse.htmlThis app provides the webhook to receive this in your Django projects.Installationpip install -r sendgrid_eventhooksUsageAdd sendgrid_events to yourinstalled_appsAdd to urls.pyurl(“sendgrid”, include(“sendgrid_events.urls”))Associate the Domain/Hostname and the URL in the Parse API settings page. Parse API settings page is athttps://sendgrid.com/developer/replyNow whenever sendgrid receives the email, it will post to this webhook.This webwook will consume the data and send a signal calledsendgrid_email_received. This will have a data attribute with the data received from sendgrid.
Package: sendgrid_parse
SendGrid Inbound Parse EmailsParses SendGrid’s Inbound Parse Emails into a dictionary of fields from POST parameters.The Parse API willPOSTthe parsed email to aURLspecified in the
Sendgrid settings. IfPOSTis unsuccesful,
SendGrid automatically queues and
retries any POSTs that respond with a4XXor5XXstatus.
To prevent redelivery or queueing of the mail, respond with2XX.
Messages that cannot be delivered after3 dayswill be dropped.SeeSendGrid documentationfor more details.POST ParametersThe POST parameters are available from the returned dictionary with the following keys:headers:rawheaders of the emailtext: text body of the email.
If not set, the email did not have a text body.html: HTML body of the email.
If not set, the email did not have a HTML body.from: email sender taken from message headers.to: email recipient field taken from message headers.cc: email cc field taken from message headers.subject: email subject.dkim: aJSONstring containing the verification results of any
dkim and domain keys signatures in the message.SPF: results of Sender Policy Framework verification of the
message sender and receiving IP address.envelope:JSONstring containing theSMTPenvelope.
Has two variables:to: a single-element array containing the receiving address;from: return path of the message.charsets:JSONstring for character set of fields extracted.spam_score: Spam Assassin’s rating for whether this isspam.spam_report: Spam Assassin’s spam report.attachments: List containing file objects ordered by attachment number in email.
If available, file object/stream will be appended to the list.
If no file objects/streams are available, the attachment dictionary keys will be appended.
These keys can be then used to access the attachments.
Keys are the stringattachmentsuffixed by n
where n is in 1…N with N being the total number of attachmentsattachment-info:JSONstring containingattachmentXkeys
with anotherJSONstring as the value.
Contains the keysfilename,type(media type)errors: All errors are silently ignored and are returned as strings in a dictionary
whose keys are the other keys. So, for e.g. an error about parsingsubjectis available asmail['errors']['subject']Helper utilitiesThesendgrid_parse.helperscontains utilities forflaskanddjangothat use the correct request variables to access the POST data and attachments.
These are wrappers around theparsemethod
and do not contain any framework specific except for naming and access conventions.UsageThe package is available undersendgrid_parse.# installpipinstallsendgrid_parse# plain python (args: POST dictionary, files dictionary)fromsendgrid_parseimportparsemail=parse(post_dict,file_dict)# for flaskfromsendgrid_parse.helpers.flaskimportparse# for djangofromsendgrid_parse.helpers.djangoimportparsemail=parse(request)Github Repositorysendgrid_parse
Package: sendgrify
sendgrifySendGrid for Humans.Sendgrifyis a Python package serving as a wrapper over the email delivery serviceSendGrid.This is an attempt to simplify the use ofsendgrid-python: the Official Twilio SendGrid Led, Community Driven Python API Library.Sending emails, the easy way!Installation$pipinstallsendgrifyUsageGrab yourSendGrid API Key.Code!>>>fromsendgridimportSendGrid>>>handler=SendGrid('YOUR_SENDGRID_API_KEY','from_addr@example.com','From Name')>>>handler.send(to='hello@example.com',subject='Hi there',msg='This is just a test')Advanced usageFunctionsend()also admits some more parameters:cc: as a list of emails for carbon copy.bcc: as a list of emails for blind carbon copy.attachments: as a list of paths for file attachments.as_markdown: as a boolean (if True msg will be rendered from Markdown).Tests$pipinstall-rrequirements-dev.txt$pytestLicenseMIT
Package: send_html_email
Django app to send html emails. Email can be template uses django templates
and can be populated from an instance of an object, a dictionary or both.UsageIn this example we populate the object using the User model with and
additional dictionary for the time.::from send_html_email.send_email import HtmlEmail
from django.contrib.auth.models import User
from datetime import datetime#get instance and value for additional dict
now = datetime.now()
user = User.objects.get(id=1)#create headers (subject. recipient list, sender)
headers = (‘subject’, [‘recipient@test.com’,’optional_recipeint@test.com’],‘sender@test.com’)#create HtmlEmail instance accepts arguements header, html email template and optionally text email template
email = HtmlEmail(headers, ‘user_notification’)
#Send email using instance to populate values and optionally sending an additional dictionary.
email.send_instance_email(user,{‘today’:now,})
#send email populated by dictionary.
email= HtmlEmail(headers, ‘what_day_is_it’)
email.send_dict_email({‘today’: now})::from send_html_email.send_email import HtmlEmail
from django.contrib.auth.models import Useruser = User.objects.get(id=1)#do not need to create headers, done automatically
#create HtmlEmail instance accepts arguements header, html email template and optionally text email template
email = HtmlEmail(False, ‘user_notification’)
#Send email using instance to populate values and optionally sending an additional dictionary.
email.send_instance_email(user)
Package: sendinblue-logger
DescriptionThis is a logging handler for Python'sloggingmodule to send log messages oversendinblue's transactional email service.Installation$pipinstallsendinblue-loggerUsageimportsblueimportloggingimportoshandler=sblue.LoggingHandler(level=logging.ERROR,api_key=os.getenv('SENDINBLUE_API_KEY'),from_email='sender-email@domain.com',to_email='recipient-email@domain.com',)logging.basicConfig(filename='/home/user/project/project.log',encoding='utf-8',level=logging.DEBUG,format='%(asctime)s-%(levelname)s:%(message)s',handlers=(handler,))
Package: sendinblue-templates
Sendinblue Template Downloader/UploaderDownload and upload Sendinblue template's html content for ease of editing and versioning.
Env varSENDINBLUE_API_KEYrequired (v3).Files named following the format:<numeric-template-id>. <template name (escaped)>.htmlex:001. Sample template title.htmlInstallationAvailable onpypi as sendinblue-templatespip install sendinblue-templates:sparkles:Usagesendinblue-templates download [directory]Downloads the first 1000 templates from the Sendinblue account. Overriding existing files.sendinblue-templates upload [directory]Updates all matching templates html content in Sendinblue.
Package: send-ip
Send IPPython software to configure machines for sending their IP through ssh.InstallationRun the following to install:pip3installsend_ipUsageEdit theconfig.yamlfile to match your destination. These fields will be used toscpinto the target machine (user@ip:portusing passwordpassto login).user:target-userip:ip-addresspass:target-passwordport:target-port#default port is usually 22remote-path:target-folder# this folder will be created under /home/user might create errors for not linux usersrefresh-freq:15# minutes for cron-jobUse the pacakge functions, for example:from send_ip.send_ip import *

info_file = create_info()
send_info(info_file)You can save this into asend_ip_script.pyand schedule this task to run automatically (see below)Schedule taskCronYou can setupsend_ip_script.pyto run on a schedule (e.g., every 15 minutes). For example, this is the configuration for a raspberry pi (pi) sending its IP to another machine (matias) usingconfig.yaml.from send_ip.setup_cron import setup_cron
setup_cron("/home/pi/send_ip/send_ip_script.py",15)
Current cron tab (same as $ crontab -l)
--------------------------------------

*/15 * * * * cd python3 /home/pi/send_ip/ && /home/pi/send_ip/send_ip_script.py # send ip to matiasWindows machinesPlease refer tothis exampleand file issues if having trouble.For developers ofsend_ipTo installsend_ipand tools needed for tests, you can install into a virtualenvironment like so:pipinstall-e.[dev]Known issuesFor a Raspberry pi installation, you might face this issue:=============================DEBUG ASSISTANCE=============================
          If you are seeing a compilation error please try the following steps to
          successfully install bcrypt:
          1) Upgrade to the latest pip and try again. This will fix errors for most
             users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
          2) Ensure you have a recent Rust toolchain installed. bcrypt requires
             rustc >= 1.56.0.
      
          Python: 3.9.2
          platform: Linux-5.15.56-v7l+-armv7l-with-glibc2.31
          pip: n/a
          setuptools: 65.5.0
          setuptools_rust: 1.5.2
          rustc: n/a
          =============================DEBUG ASSISTANCE=============================You might need:sudo apt-get install build-essential cargoYou can also refer to this info inbcrypt.You might also need to install or upgraderustccurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Package: sendlib
``sendlib``===========``sendlib`` is a lightweight library for serializing messages, usually to besent over a socket, pipe, or other stream. Sendlib is specialized forsending messages which are read serially, unlike other serialization formatsoften used (like JSON_, YAML_, or XML_)... _JSON: http://json.org/.. _YAML: http://yaml.org/.. _XML: http://www.w3.org/standards/xml/Why not JSON, YAML, or XML? ``sendlib`` natively supports reading messagesone piece at a time, to keep memory footprint small, and has native supportfor sending and receiving file-like objects with the ``data`` type.If your application needs to send and receive large data blobs, especiallyif your application can process that data without random access, ``sendlib``may be a good fit to reduce memory usage. On the other hand, if you needrandom access to fields within your message, have small messages, or havemessages with, or complex nesting structures, then ``sendlib`` may not befor you.Contents--------.. toctree:::maxdepth: 2designobjectivestutorialapi
Package: sendlive
sendliveFeaturesTODORequirementsTODOInstallationYou can installsendliveviapipfromPyPI:$pipinstallsendliveUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theGPL 3.0 license,sendliveis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.