Saravanan666/pypi-org huggingface dataset:
Package: pypuppetdb_daily_report
pypuppetdb_daily_reportA daily run summary report for PuppetDB, written in Python usingnedap’s pypuppetdbmodule.For an example of the current version’s output, seehttps://rawgithub.com/jantman/pypuppetdb-daily-report/master/example_output.html.The report displays the following for the current point-in-time:the current values of ‘puppetversion’, ‘facterversion’ and ‘lsbdistdescription’ factsAnd the following for each day in the run interval:dashboard metrics (averages where possible) snapshotted at the time the script was runtotal number of runs, number of runs with failuresnumber of nodes with:no successful runs, 50+% failed runs, any failed runsless than 40 successful runs in 24 hourscount of runs with changed resourcescount of nodes with changed resourcestop 10 failing resources, along with count of nodes they’re failing ontop 10 resources changed, how many nodes and how many runs they were changed inany (up to 10) resources changed in at least 45% of runs on a node (flapping)DevelopmentGuidelinespep8 compliant with some exceptions (see pytest.ini)100% test coverage with pytest (with valid tests) (note that untilhttps://github.com/lemurheavy/coveralls-public/issues/31is fixed, you
need to check thecovoutput for branch coverage, coveralls can’t
be relied on).TestingTesting is done viapytest, driven bytox.testing is as simple as:pip install toxtoxIf you want to see code coverage:tox-ecovthis produces two coverage reports - a summary on STDOUT and a full report in thehtmlcov/directoryIf you want to pass additional arguments to pytest, add them to the tox command line after “–”. i.e., for verbose pytext output on py27 tests:tox-epy27---vRelease ChecklistOpen an issue for the release; cut a branch off master for that issue.Confirm that there are CHANGES.rst entries for all major changes.Ensure that Travis tests passing in all environments.Ensure that test coverage is no less than the last release (ideally, 100%).Increment the version number in __init__.py and add version and release date to CHANGES.rst, then push to GitHub.Confirm that README.rst renders correctly on GitHub.Upload package to testpypi, confirm that README.rst renders correctly.Make sure your ~/.pypirc file is correctpython setup.py register-rhttps://testpypi.python.org/pypipython setup.py sdist upload-rhttps://testpypi.python.org/pypiCheck that the README renders athttps://testpypi.python.org/pypi/pypuppetdb-daily-reportCreate a pull request for the release to be merge into master. Upon successful Travis build, merge it.Tag the release in Git, push tag to GitHub:tag the release. for now the message is quite simple:git tag-avX.Y.Z-m'X.Y.Z releasedYYYY-MM-DD'push the tag to GitHub:git push origin vX.Y.ZUpload package to live pypi:python setup.py sdist uploadmake sure any GH issues fixed in the release were closed.
Package: pypuppetdbquery
A port ofErik Dalén’s PuppetDB Query language
to Python. This module is designed to be paired withpypuppetdbbut does not depend on
it directly.This module is a Python implementation of the query language also implemented
inpuppet-puppetdbquery(in
Ruby) andnode-puppetdbquery(in JavaScript/NodeJS).Please see thepypuppetdbquery documentationcourtesy ofRead the
DocsandSphinx.InstallationYou can install this package from source or from PyPi.$pipinstallpypuppetdbquery$gitclonehttps://github.com/bootc/pypuppetdbquery$pythonsetup.pyinstallIf you wish to hack on it clone the repository but after that run:$pipinstall-rrequirements.txt$pipinstall-rrequirements-dev.txtThis will install all the runtime requirements of pypuppetdbquery and
the dependencies for the test suite and generation of documentation.Usage Exampleimportpypuppetdbimportpypuppetdbquerypdb=pypuppetdb.connect()pdb_ast=pypuppetdbquery.parse('(processorcount=4 or processorcount=8) and kernel=Linux')fornodeinpdb.nodes(query=pdb_ast):print(node)For further examples, see theExamples sectionof thepypuppetdbquery documentation.LicenseThis project is licensed under the Apache License Version 2.0.Copyright © 2016Chris Boot.
Package: pypura
pypuraPython package for interacting with Pura smart fragrance diffusersSupport MeI'm not employed by Pura, and provide this library purely for your own enjoyment and home automation needs.If you don't already own a Pura diffuser, please consider usingmy referal code (s3zjukz)to get $6 off your first order of $50+ (as well as a tip to me in appreciation)!If you already own a Pura diffuser and still want to donate, consider buying me a coffee ☕ (or beer 🍺) instead by using the link below orsponsor me on Github:
Package: py-pure-client
Pure Storage Unified Python SDKOverviewThepy-pure-clientPython package provides clients that use the Pure1 1.x REST API,
the FlashArray REST 2.x API, and the FlashBlade REST 2.x API.For the current FlashBlade REST 1.x Python SDK,see here.
For the current FlashArray REST 1.x Python SDK,see here.RequirementsThe library requires Python 3.5 or higher. Third-party libraries are also required.Installationpip Installation$ pip3 install py-pure-clientManual Installation$ git clone https://github.com/PureStorage-OpenConnect/py-pure-client.git
$ cd py-pure-client
$ pip install -r requirements.txt
$ python setup.py installDocumentationFor full documentation, including a quick start guide and examples, seehttps://pure-storage-py-pure-client.readthedocs-hosted.com/en/latest/index.html.
Package: py-purecrypt
py-purecryptA pure Python implementation of the crypt(3) function provided in the GNU C
library (glibc). This implementation supports the MD5, SHA256, and SHA512
variants.This package provides a drop-in replacement for the deprecated (and soon to
be removed)cryptpackage provided in the Python standard library.Because this is written in pure Python and depends only on thecryptographypackage, it should
run on any platform supported by Python.This implementation is not fast. If you're looking for speed, I suggest you
consider alternatives such asbcrypt.InstallationInstallpy-purecryptfromPyPIusingpipor your preferred Python package manager.UsageThis section shows basic usage examples.Using the Compatibility APIYou can use this package as a drop-in replacement for the deprecatedcryptpackage that will soon be removed from the Python standard library. At present
this package supports only the MD5, SHA256, and SHA512 methods.Exampleimportpurecryptascryptplaintext_pw="Hello world!"salt=crypt.mksalt(crypt.METHOD_SHA256,rounds=10000)hashed_pw=crypt.crypt(plaintext_pw,salt)Using the Native APIEncrypt a passwordChoose a method and generate a salt, then encrypt.frompurecryptimportCrypt,Methodplaintext_password="super secret"salt=Crypt.generate_salt(Method.SHA512)ciphertext_password=Crypt.encrypt(plaintext_password,salt)When generating a salt you can specify the number of rounds to perform
while encrypting.frompurecryptimportCrypt,Methodplaintext_password="super secret"salt=Crypt.generate_salt(Method.SHA256,rounds=10000)ciphertext_password=Crypt.encrypt(plaintext_password,salt)Validate a passwordTo validate a given password, you just need the ciphertext that was produced
when the original password was encrypted.frompurecryptimportCrypt# as produced by the previous exampleciphertext_password="$5$rounds=10000$vGuBkkhnTmd9BHeFpw4vxHNHJ1bxFRZX$2xiip3lO0cjGg3tZMdled9LpChHk1nmpF6hU6ZW05W1"plaintext_password="super secret"assertCrypt.is_valid(plaintext_password,ciphertext_password)
Package: pypuregym
pypuregymA Python library to interact with Pure Fitness/Pure Yoga APIs.
This library helps you to get the schedule of a Pure studio and book classes.
Currently, the following Pure locations are supported:Hong KongSingaporeShanghaiInstallation$ pip install pypuregymCLI usage$ pypuregym --help
Interact with Pure Fitness/Yoga service.

Usage:
  pypuregym location <gym-type> <region-id>
  pypuregym schedule <region-id> <location-id> <date>
  pypuregym book <region-id> <class-id> <username> <password> [--wait-until <wait>] [--retry <retry>]

Options:
  <gym-type>                  Can be "fitness" or "yoga".
  <region-id>                 Can be "HK", "CN" or "SG".
  <location-id>               ID of the studio (given with the "location" command).
  <date>                      Date to get the schedule for.
  <class-id>                  Class ID to book.
  <username>                  Your Pure username/email.
  <password>                  Your Pure password.
  --wait-until <wait>         When booking a class, wait until the specified date time before booking.
  --retry <retry>             Number of time to retry when booking the class.Get Pure locations$ pypuregym location fitness hk
╒══════╤═════════════════╤══════════════════════════════╤══════════════╕
│   ID │ Code            │ Name                         │ District     │
╞══════╪═════════════════╪══════════════════════════════╪══════════════╡
│    4 │ LTP             │ Lee Theatre                  │ Causeway Bay │
├──────┼─────────────────┼──────────────────────────────┼──────────────┤
│    6 │ LPF             │ Langham Place                │ Mongkok      │
├──────┼─────────────────┼──────────────────────────────┼──────────────┤
│    8 │ KIN             │ Kinwick Centre               │ Central      │
╘══════╧═════════════════╧══════════════════════════════╧══════════════╛Get Pure schedule$ pypuregym schedule hk 4 2020-01-01
╒═══════╤═════════════════════╤═══════════╤══════════════╤════════════╕
│    ID │ Class Name          │ Teacher   │ Start Time   │ End Time   │
╞═══════╪═════════════════════╪═══════════╪══════════════╪════════════╡
│ 71647 │ BODYATTACK™         │ John D.   │ 10:00:00     │ 11:00:00   │
├───────┼─────────────────────┼───────────┼──────────────┼────────────┤
│ 71648 │ RPM™                │ John D.   │ 11:15:00     │ 12:05:00   │
├───────┼─────────────────────┼───────────┼──────────────┼────────────┤
│ 71649 │ BODYPUMP™           │ Jane F.   │ 11:15:00     │ 12:15:00   │
├───────┼─────────────────────┼───────────┼──────────────┼────────────┤
│ 71650 │ ABS, BUTTS & THIGHS │ Jane F.   │ 12:30:00     │ 13:30:00   │
╘═══════╧═════════════════════╧═══════════╧══════════════╧════════════╛Book a class$ pypuregym book hk 155188 $PURE_USERNAME $PURE_PASSWORDDocumentationYou can read the documentation here.
This project has been tested under Python 3.6+
Package: pypureomapi
This module provides a OMAPI implementation for managing ISC DHCP server by OMAPI protocol purely in Python code. You can query, create or modify ISC DHCP leases with this module. This module grew out of frustration about pyomapi and later pyomapic, which use swig and the static library provided with ISC DHCP without proper error handling. pypureomapi fixes these issues and can be used more or less as a drop-in replacement for pyomapic.
Package: pypushdeer
pypushdeerPushDeerSDK for Python.installpipinstallpypushdeerUsage:1. Use pushdeer default serverfrompypushdeerimportPushDeerpushdeer=PushDeer(pushkey="your_push_key")pushdeer.send_text("hello world",desp="optional description")pushdeer.send_markdown("# hello world",desp="**optional** description in markdown")pushdeer.send_image("https://github.com/easychen/pushdeer/raw/main/doc/image/clipcode.png")pushdeer.send_image("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=")2. Use self-hosted serverfrompypushdeerimportPushDeerpushdeer=PushDeer(server="https://your-server-here",pushkey="your_push_key")3. Use unique configuration for each messagefrompypushdeerimportPushDeerpushdeer=PushDeer()pushdeer.send_text("hello world",server="some_server",pushkey="some_key")TODO:unit testexception handlingarguments validate
Package: pypusher
http://github.com/idlesign/pypusherWhat’s thatpypusher pushes stuff from PythonThis module allows you to send Apple Push Notifications to various Apple devices from your Python code.It relies onlibcapnto featureApple Push Notification Servicesupport.RequirementsPython 3capn library -http://libcapn.org/Quick example# Create a notification.notification=AppleNotification('This notification is brought to you by pypusher.',['DEVICE_01_TOKEN_HEXSTRING','DEVICE_02_TOKEN_HEXSTRING'])# Set connection parameters.withApplePushConnection('/home/idle/my_cert.pem','/home/idle/my_key.pem')asconnection:# Send the notification using the connection data.connection.send_notification(notification)Documentation:http://pypusher.readthedocs.org/
Package: pypushflow
pypushflowA task scheduler for cyclic and acyclic graphsInstallpipinstallpypushflow[mx]Use themxoption for installation at MX beamlines.Run testspipinstallpypushflow[test]pytestGetting startedimportloggingfrompypushflow.WorkflowimportWorkflowfrompypushflow.StopActorimportStopActorfrompypushflow.StartActorimportStartActorfrompypushflow.PythonActorimportPythonActorfrompypushflow.ThreadCounterimportThreadCounterclassMyWorkflow(Workflow):def__init__(self,name):super().__init__(name,level=logging.DEBUG)ctr=ThreadCounter(parent=self)self.startActor=StartActor(parent=self,thread_counter=ctr)self.pythonActor=PythonActor(parent=self,script="pypushflow.tests.tasks.pythonActorTest.py",name="Python Actor Test",thread_counter=ctr,)self.stopActor=StopActor(parent=self,thread_counter=ctr)self.startActor.connect(self.pythonActor)self.pythonActor.connect(self.stopActor)testMyWorkflow=MyWorkflow("Test workflow")inData={"name":"World"}outData=testMyWorkflow.run(inData,timeout=15,pool_type="process")assertoutData["reply"]=="Hello World!"Documentationhttps://pypushflow.readthedocs.io/
Package: py-pushover-client
py-pushover-clientPython package to send notifications to devices using the Pushover Message API.Pre-RequisitesSign up tohttps://pushover.netand generate a User Key and an API Token.UsageInstall the package from PyPi:pipinstallpy-pushover-clientAdd it to your scripts using your own API Token and User Key:The following code snippet is instructional only! You should not hardcode your API Token and User Key as string literals, instead you should consider more secure options such as environment variables.frompy_pushover_clientimportPushoverAPIClientpushover=PushoverAPIClient(api_token="api_token",user_key="user_key",)pushover.send(title="Test",message="This is a test message")Optionally, you can change the notification sound. This must be done before calling thePushoverAPIClient.send()method in order for the sound to be processed.A list of acceptable sound options can be found athttps://pushover.net/api#soundspushover.set_sound(sound="bugle")pushover.send(title="Bugle Baby!",message="Stuff happened.")
Package: py-pushover-simple
py_pushover_simpleThis is a very simple python pushover wrapper for sending quick messages from command line scripts.InstallationObtain the code:Download from PyPi(recommended):python3-mpipinstallpy-pushover-simpleor, clone the repository:gitclonehttps://github.com/prplecake/py_pushover_simpleAdd it to your script:frompy_pushover_simpleimportpushoverdefsend_message(message):p=pushover.Pushover()p.user='user key'p.token='app token'p.sendMessage(message)For a working demo, seeippush.pyfrom theip_pushproject.Usagepy_pushover_simplecan be used on the command line:For a full list of arguments:$python-mpy_pushover_simple.pushover-h
usage:pushover.py[-h][-u<string>][-t<string>]optionalarguments:-h,--helpshowthishelpmessageandexit-u<string>pushoverusertoken-t<string>pushoverapptokenResourcesAdditional documentation may be foundin the wiki.This project is licensed under the terms of the MIT license.
Package: pypushwoosh
Pushwoosh Python LibrarySupported API Version: 1.3Getting StartedTypical usage often looks like this:#!/usr/bin/env python
from pypushwoosh.client import PushwooshClient
from pypushwoosh.command import CreateTargetedMessageCommand
from pypushwoosh.filter import ApplicationFilter


command = CreateTargetedMessageCommand()
command.auth = 'AUTH_TOKEN'
command.devices_filter = ApplicationFilter('APP-CODE')
command.content = "Hello world!"

client = PushwooshClient()
print client.invoke(command)FeaturesAt the moment, pypushwoosh supports:Message commands:CreateMessageForApplicationCommandCreateMessageForApplicationGroupCommandCreateTargetedMessageCommandCompileFilterCommandDeleteMessageCommandDevice commands:RegisterDeviceCommandGetTagsCommandSetTagsCommandSetBadgeCommandPushStatCommandGetNearestZoneCommandFor targeted messages, supports:ApplicationFilter and ApplicationGroupFilter filtersTag filters: IntegerTagFilter, StringTagFilter, ListTagFilter, DateTagFilter, DaysTagFilter, BooleanTagFilterTags filters by applicationOperations filters: UnionFilter, IntersectFilter, SubtractFilterInstallationInstall viapip:$ pip install pypushwooshInstall from source:$ git clone git://github.com/Pushwoosh/pushwoosh-python-lib.git
$ cd pushwoosh-python-lib
$ python setup.py install
Package: pypusu
Client for using the PuSu Engine server from Python. Probably much
better suitable for sending than receiving, but both should work.Threaded exampleIf you want immediate delivery and are ok with your callbacks getting
called from another thread, you can use the threaded client.frompypusu.threadedimportPuSuClientfromtimeimportsleepif__name__=="__main__":c=PuSuClient("ws://127.0.0.1:55000")count=0deflistener(msg):globalcountcount+=1c.authorize("foo")c.subscribe("channel.1",listener)c.publish("channel.1",{"foo":"bar"})sleep(30)print(count)Polling exampleIf your callbacks getting called from another thread is an issue, you
can use the polling client. Internally it still uses threads, but it
will not deliver the messages to your callbacks until you callpoll().frompypusu.pollingimportPuSuClientfromtimeimportsleepif__name__=="__main__":c=PuSuClient("ws://127.0.0.1:55000")count=0deflistener(msg):globalcountcount+=1c.authorize("foo")c.subscribe("channel.1",listener)c.publish("channel.1",{"foo":"bar"})foriinrange(0,30):sleep(1)c.poll()print(count)DependenciesNot quite sure how to deal with dependencies yet, so for now you’ll have
to install them separately.Both threaded and polling client need the following in yourrequirements.txt:ws4py==0.3.5
wsaccel==0.6.2Or you can try:pip install ws4py wsaccelLicenseShort version: MIT + New BSD.Long version: Read the LICENSE.md -file.Uploading to PyPiYou can’t really do that without the appropriate username + password
information, but I’m saving this here because I’ll just forget.python setup.py sdist upload -r pypitest
python setup.py sdist upload -r pypi
Package: pypuyo
pypuyoA pip package to make Puyo-Puyo-ish games.>>>importpypuyoasppy>>>game=ppy.start(width=3,height=3,frames_to_fall=1)>>>game.update()>>>game.update()>>>print(game.get())[[None,"Yellow",None][None,None,None][None,None,None]]>>>game.update()>>>print(game.get())[[None,"Yellow",None][None,"Blue",None][None,None,None]]Installationpip$ python3 -m pip install pupuyoCloning repo$ git clone https://github.com/nnamaco/pypuyo/ExamplesA GUI example ->https://github.com/nnamaco/pypuyo-exampleA shell CLI example ->https://github.com/nnamaco/pypuyo-example-cli(Still making)UsageQuickstartCreate game instance by:game=pypuyo.Game()Go to next frame by:game.update()Get array by:game.get()DocumentationMethodsmethoddesciptionargumentsstartReturns new game instance.width: Width of the game.height: Height of the game.types: Array of possible puyos to fall.frames_to_fall: Frames that take puyos to fall.move_rightMove falling puyos right.-move_leftMove falling puyos right.-spin_rightMove falling puyos right.-spin_leftMove falling puyos right.-is_overReturns booleanis_gameover.-updateUpdate game to next frame.-getGet game as array.-LicenseThis software is released under the MIT License, see LICENSE.
Package: pypv
Documentation: Building...Source Code:https://github.com/patrickpasquini/PyPvInstallationYou can installpypvusing pip:pipinstallpypvWhat is it?pypvis a state-of-the-art Python library designed to empower engineers and developers in the field of solar energy. This library simplifies the use of complex physical models, making it easier to calculate key solar parameters and optimize solar energy systems.Key FeaturesHere's a simple example of how to use thecalculate_pv_systemmethod:frompypvimportPvSystem# Config module and inverterpv_module=PvModule(p_max=545,vmp=41.8,imp=13.09,voc=49.65,isc=13.92,efficiency=21.1,p_max_coefficient=-0.35,voc_coefficient=-0.27,isc_coefficient=0.048,)pv_inverter=PvInverter(start_voltage=90,max_voltage=600,nominal_voltage=360,nominal_power=5,efficiency=98,max_pv_power=6.5,MPPTs=[MPPT(min_voltage=90,max_voltage=560,isc=15,dc_inputs=1),MPPT(min_voltage=90,max_voltage=560,isc=15,dc_inputs=1),],)# Creating an instance of PvSystempv_system=PvSystem(pv_module=pv_module,pv_inverter=pv_inverter,target_power=6,max_temperature=75,min_temperature=0)pv_system.calculate()# Displaying the resultsPvSystem(inverter_quantity=2,ROS=0.8333333333333334,layouts=[Layout(line_quantity=2,modules_per_line=6),Layout(line_quantity=2,modules_per_line=5)])ContributingWe warmly welcome contributions topypvWhether you're fixing a bug, adding a feature, or improving documentation, your help is invaluable.
Package: pypw
Generates a random password. Can be used as a stand-alone CLI program or
imported into projects.Installation:python setup.py installpip install pypwUsage:pypw-l20- Generate a random password that is 20 characters longpypw-s"TurnTh1sIntoMyP4ssW()RD"--no-mixed- Generate a password
from -s without mixed casingpypw-h- Display the help screenAPI:pypw.RandomPassword(sequence=None, mixedCases=True)
    sequence(str): The string you want to create a password from
    mixedCases(bool): Generate mixed casing on letters

    returns: <pypw.RandomPassword instance>

    randomBool()
        returns: True/False

    randCase(sequence)
        - Randomizes the casing on a string or list

        sequence(str/list): The string to randomize casing on

        returns: List of characters

    generateRandomPW(length=None, alpha=True, digits=True, symbols=True)
        - Generate a random password chosen by PyPW

        length(int): Defines how many characters you want in the generated password
        alpha(bool): Choose to use alphabetical characters in randomly generated password or not
        digits(bool): Choose to use digits (0-9) in randomly generated password or not
        symbols(bool): Choose to use symbols in randomly generated password or not

        returns: Dict with result, score, ranking and phonetic

    generatePW()
        - Generate password from the arguments passed to RandomPassword

        returns: Dict with result, score, ranking and phonetic

    phonetic(sequence)
        - Generate a 'phrase' to (hopefully) help the user remember the password. (Not guaranteed to make sense!)

        sequence(str): The string you want to generate a phonetic phrase on

        returns: Str

    strength(sequence)
        - Calculate the strength of the password based on length, digits, symbols and casing

        returns: Tuple
Package: pyPWD
pyPWDA simple password generatorInfoPasswords are generated in this format: (LETTERS) (SYMBOL) (NUMBERS)Usage:importpyPWDPyPWD.generate(letter_length,special_character,number_length)Example:simple code to generate 12 letters, a symbol, and 12 numbersCode:importpyPWDpassword=pyPWD.generate(12,'@',12)print(password)you can also dofrompyPWDimportgenerateto make it easier.Remember that instead ofpyPWD.generate(), you should dogenerate()Output:This code will generate something like this:OhvkpUYMUMaR@553339954271in the format of LETTERS, then a SYMBOL, followed by a string of NUMBERSInbuilt help featureimportpyPWDpyPWD.help()Prints a short help messageCreditsmade by HYKANTUS.🌐Website📺YouTube📷InstaGram💻GitHub