Saravanan666/pypi-org huggingface dataset:
Package: python-dict-display-filter
Python Dictionary Display FilterA Wireshark-like display filter for Python dictionaries and various other data
sources, including objects, lists, and SQL databases.Table of ContentsQuick StartFeaturesExamplesAcknowledgementsQuick StartTo quickly get started with the python-dictionary-display-filter, follow the steps below:InstallationFirst, install the package using pip:pip3 install python-dict-display-filterInitializationNext, import the necessary module and initialize theDictDisplayFilterwith a list of dictionaries:frompydictdisplayfilterimportDictDisplayFilteractors=[{"name":["Laurence","Fishburne"],"age":{"born":"1961"},"gender":"male"},{"name":["Keanu","Reeves"],"age":{"born":"1964"},"gender":"male","power":["flight","bullet-time"]},{"name":["Joe","Pantoliano"],"age":{"born":"1951"},"gender":"male"},{"name":["Carrie-Anne","Moss"],"age":{"born":"1967"},"gender":"female"}]ddf=DictDisplayFilter(actors)Filtering DataOnce theDictDisplayFilteris initialized, you can start filtering the data using thedisplay filter query language.
For example, let's filter the actors whose birth year is after 1960:filter_query="age.born > 1960"filtered_data=ddf.filter(filter_query)print(list(filtered_data))[{"name":["Laurence","Fishburne"],"age":{"born":"1961"},"gender":"male"},{"name":["Keanu","Reeves"],"age":{"born":"1964"},"gender":"male","power":["flight","bullet-time"]},{"name":["Carrie-Anne","Moss"],"age":{"born":"1967"},"gender":"female"}]You can also use more complex queries to filter the data.
For example, let's filter male actors born between 1960 and 1964 whose names end with "e":filter_query="gender == male and (age.born > 1960 and age.born < 1965) and name matches .*e$"filtered_data=ddf.filter(filter_query)print(list(filtered_data))This will output the filtered data:[{'name':['Laurence','Fishburne'],'age':{'born':'1961'},'gender':'male'}]For more details and advanced usage, please refer to theUser Guide.FeaturesPython Dictionary Display Filter supports a wide range of features, including:Comparison Operators:==,!=,<=,<,>=,>,~=,~,&Combining Operators:and,or,xor,notMembership Operators:inTypes:Text,Number,Date & Time,Ethernet-,IPv4-,IPv6-AddressSlicing:Text,Ethernet-,IPv4-,IPv6-AddressFunctions:upper,lower,lenData Sources:CSV,Dictionaries,JSON,Objects,SQLiteFor a detailed description of the individual features check out theUser Guide.ExamplesFor detailed examples of how the display filter can be utilized, please refer to the following sections of theUser Guide:CSV Display FilterJSON Display FilterSQLite Display FilterNmap Display FilterAcknowledgementsThis project wouldn't be possible without these awesome projects:wireshark display filter: Display filter for filtering network packagesparameterized: Parameterized testing with any Python test frameworkpyparsing: Creating PEG-parsers made easyipranger: Parsing and matching IPv4-addressespython-dateutil: Parsing and comparing dates
Package: python-didl-lite
DIDL-Lite tools for Python to read and write DIDL-Lite-xml.UsageSeetests/for examples on how to use this.Note that this package doesNOTdo any type checking. Coercion of data types from and to strings must be done by the user of this library.Resources / documentsDIDL-Lite resources and documents:UPnP-av-ContentDirectory-v1-ServiceUPnP-av-ContentDirectory-v2-Servicedidl-lite-v2.xsdmpeg21-didl
Package: pythondiff
pyff: Python DiffPython Diff compares two versions of Python code (modules, packages,
directories containing Python modules and/or packages) and detects syntactical
and semantical differences between them.InstallationYou can install pyff fromPython Package Indexaspythodiff(unfortunately, a namepyffwas taken already):pip install pythondiffUsageYou can runpyffto compare two Python modules:pyff old.py new.pyFor comparing Python packages, there is thepyff-packageexecutable:pyff-package old_package new_packageYou can also compare directories using thepyff-direxecutable. In this case,pyfffinds all Python content in both directories (recurively) and compares
everything it finds:pyff-dir old_directory new_directoryFinally,pyff-gitcan compare Python content between two revisions in a given
Git repository. As with thepyff-dircase, this finds all Python content in
the repository.pyff-git https://github.com/petr-muller/pyff.git master^ masterDevelopmentThe development ofpyffis far from complete: most of the basic features (code
elements being removed, changed or added) are there but not all of them. Some
Python code can also confusepyffor even make it crash. PRs or issue reports
are happily accepted.pyffis written using a modern (3.6+) Python version and has both unit and
integration tests. The unit test coverage goal is 100% but it is OK to not cover
some elementary (or really hard to unit-test) code, provided the code is marked
with a# pragma: no covercomment.pytestis used as a
unit test driver. All code is statically checked withPylintand also annotated with Python type hints. Themypychecker is used to check them. You can install all
necessary test requirements using pip:pip install -r requirements-tests.txtThere are shell helpers inhelpers/helpers.shthat make
executing all checks easier:$ . helpers/helpers.sh
$ ft # Fast Test: run just unit tests, without pylint and mypy checks
$ st # Slow Test: run all (unit and integration) tests, pylint and mypyThe integration tests are executed using an excellentclitesttool.Futurepyffis a pre-1.0.0 version: basically a toy project of mine. A brief list of
TODOs for me to consider doing a 1.0.0 version is in#19. My idea is to
bringpyffto a small GitHub PR-commenting bot that would comment PRs to
Python repositories with a nice, human-readable summary of changes.
Package: python-digital-certificate
Read digital certificate (pfx and p12 files) in PythonInstallFrom source:$pythonsetup.pyinstallFrom PyPi:$pipinstallpython-digital-certificateDevelopmentCreate virtual environment$virtualenv.venv
$source.venv/bin/activateInstall Dependencies$pipinstall.TestsRun$python-munittestUsingThe package can be used with the pfx or p12 file, being the pfx file path or the binary file contentfromdigital_certificate.certimportCertificate# Instantiate the class with the file path or the binary file content_cert=Certificate(pfx_file="./pfx-files/test_file.pfx",password=b"123456")# Read PFX file_cert.read_pfx_file()# Get Serial Numberprint(_cert.serial_number())# Get not valid before dateprint(_cert.not_valid_before())# Get not valid after dateprint(_cert.not_valid_after())# Get subject nameprint(_cert.subject())# Get owner nameprint(_cert.common_name())# Get Issuer nameprint(_cert.issuer())Using the binary contentIf one already have the file in memory, the package can be used instantiating the class as following_cert=Certificate(pfx_file=binary_file_content,password=b"123456")
Package: python-digitalocean-backup
## Synopsis:This module works with [python-digitalocean](https://github.com/koalalorenzo/python-digitalocean) to allow you to rsync and snapshot your droplets with ease. **Great for hourly cron jobs!**###### Works with posix (*nix, osx, cygwin)Tested with Python 2.7.8(CYGWIN), 2.7.9(OS X/Linux), 3.4.3(OS X/Linux)## How to install:via pippip install -U python-digitalocean-backupvia sourcepython setup.py install##### PyPI package[https://pypi.python.org/pypi/python-digitalocean-backup](https://pypi.python.org/pypi/python-digitalocean-backup)##### Example backup script (backup.py):```pythonfrom digitaloceanbackup import *for droplet in DigitalOcean().droplets:Backup(droplet=droplet,ssh_user="root",ssh_key="do_rsa",remote_dirs=['/home', '/var/log', '/var/www'],rsync_excludes=['cache', '.DS_Store', 'man3'],snapshot_hour=2,keep_snapshots=7,debug=False)```##### Example hourly cron job:```sh0 * * * * /usr/bin/python /Users/username/bin/backup.py```###### Requires:[python-digitalocean>=1.5](https://github.com/koalalorenzo/python-digitalocean)
Package: python-dikbm-adapter
[Русская документация](python-dikbm-adapter/blob/master/README-ru.md)Installationinstallation is simpleeasy_install python-dikbm-adapterorpip install python-dikbm-adapterorpip install git+https://github.com/suvit/python-dikbm-adapterSettingsPlease, createsettings.inifile in the same dir as dikbm_main script installedSample of ini file[DiKBM]
username = my_secret_username
password = my_secret_passwordother settings and their default values[DiKBM]incomingDir = incoming
outgoingDir = outgoing
errorDir = error
logDir = log
#statusDir = status
#tempStatus = tempStatuskbmToServiceUrl =http://172.19.3.9/dkbm-ws-1.0/services/kbmToServiceNoMtom?wsdlPolicyLossServiceUrl =http://172.19.3.9/dkbm-ws-1.0/services/policyLossService?wsdlhistoryServiceUrl =http://172.19.3.9/dkbm-ws-1.0/services/historyService?wsdlin the same ini file may be placed logging settingsExample of logging settings[loggers]
keys=root, suds[handlers]
keys=console, default[formatters]
keys=simple, advanced, verbose[logger_root]
level=DEBUG
#handlers=console
handlers=default[logger_suds]
level=INFO
#handlers=console
handlers=default
qualname=suds
propagate=0[handler_console]
class=StreamHandler
level=DEBUG
formatter=advanced
args=(sys.stdout,)[handler_default]
class=FileHandler
level=INFO
formatter=advanced
filename=main.log
args=(‘log/main.log’, ‘a’)[formatter_simple]
format = %(levelname)s - %(message)s[formatter_advanced]
format = %(asctime)s - %(levelname)s - %(name)s - %(message)s[formatter_verbose]
format = %(asctime)s - %(levelname)s - %(name)s - %(module)s - %(process)d - %(thread)d - %(message)sto run usevirtualenv/bin/dikbm_mainorvirtualenv/Scripts/dikbm_main.exeyou may adddikbm_mainscript to cron job or windows task
Package: python-diminuendo
This is a generic HTML minifierNOTusing regular expressions. This minifier is fully HTML5 compatible.The name is coming from the Harry Potter books and isan incantation that
forces objects to shrinkThis project was started because of the lack of amaintainedHTML minifier
not using complex regexp. This project usesbeautifulsoupto navigate the HTML flow.Install$pipinstallpython-diminuendoUsageTODOHTML minification>>>fromdiminuendoimporthtmlmin>>>html="""<html>
    <head>
        <title>Hello World!</title>
    </head>
    <body>
        <p>Good morning</p>
    </body>
</html>""">>>minified=htmlmin(html)>>>printminified'<html><head><title>Hello World!</title></head><body><p>Good morning</p></body></html>'DevelopmentAdd a minification testTo add a minification test, simply add the html code astest_name.htmland its minified version astest_name-minified.htmlintest/html.TestTest the package:$python-munittestdiscoverAutomatic testing in various environments:$toxReleaseUsebumprto release the package:$bumpr-b-m[...]$pythonsetup.pysdistbdist_wheeluploadProjectSource code on githubDocumentation on readthedocsPackage on pypiOther projectsdjango-htmlminhtmlminLicensepython-diminuendo is published under a BSD 3-clause license, see the LICENSE
file distributed with the project.
Package: python-dingz
Python API for interacting withDingzdevices.This module is not official, developed, supported or endorsed by iolo AG or
myStrom AG. For questions and other inquiries, use the issue tracker in this
repository please.Without the support of iolo AG and myStrom AG it would have taken much longer
to create this module which is the base for the integration intoHome Assistant. Both companies have provided
and are still providing hardware, valuable feedback and advice. Their
continuous support make further development of this module possible.Seeapi.dingz.chfor the API details.LimitationsThis module is at the moment limited to consuming sensor data, device details,
device configurations and states.
The front LED can be controlled but buttons requires you to programm them by
yourself.No support for setting timers and schedules.RequirementsYou need to havePython 3installed.dingzdeviceNetwork connectionDevices connected to your networkYou need to know the IP address of the devices. Please consult your router
documentation to get this information or use thedingzCLI tool.InstallationThe package is available in thePython Package Index.$pipinstalldingzOn a Fedora-based system or on a CentOS/RHEL machine which has EPEL enabled.$sudodnf-yinstallpython3-dingzModule usageEvery unit has its own web interface:http://IP_ADDRESS.Seeexample.pyfor detail about module.How to operate shades / dimmersd=Dingz("ip_address_or_host")# Fetch config, this has to be done once to fetch all details about the shades/dimmersawaitd.get_devices_config()# Fetch the current state of the lights/versawaitd.get_state()# Get details about shadeshade_0=d.shades.get(0)print("Blinds:%sLamella:%s"%(shade_0.current_blind_level(),shade_0.current_lamella_level()))# Operate shadeshade_0.shade_down()# Turn on lightd.dimmers.get(2).turn_on(brightness_pct=70)CLI usageThe package contains a command-line tool which support some basic tasks.$dingzdiscoverLicensepython-dingzis licensed under ASL 2.0, for more details check LICENSE.
Package: python-dirtt
python-dirtt - Directory Tree Templater(c) 2015 Robert Moggach
Licensed under the MIT license:http://www.opensource.org/licenses/mit-license.phpDirtt is a standalone tool and library used to generate
directory and file structures from xml templates that describe
repeatedly used filesystem layouts such as project structures
or elements therein.It provides a subclassed implementation of xml.sax.handler ContentHandler
with internal methods that read,parse,render,and execute builds of
user defined XML directory tree templates.
Package: python-discord
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.100% coverage of the supported Discord API.Optimised in both speed and memory.InstallingPython 3.5.3 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Udiscord.py# Windowspy-3-mpipinstall-Udiscord.pyOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"discord.py[voice]"# Windowspy-3-mpipinstall-Udiscord.py[voice]To install the development version, do the following:$gitclonehttps://github.com/Rapptz/discord.py$cddiscord.py$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl (for voice support)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportdiscordfromdiscord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.LinksDocumentationOfficial Discord ServerDiscord API
Package: python-discovery-client
# discovery-client[![CircleCI](https://circleci.com/gh/tomwei7/discovery-client.svg?style=svg)](https://circleci.com/gh/tomwei7/discovery-client)[![PyPI version](https://badge.fury.io/py/python-discovery-client.svg)](https://badge.fury.io/py/python-discovery-client)python client for discovery https://github.com/bilibili/discovery only support python3.### Install```bashpip install python-discovery-client```### Usage```pythonfrom discovery import config_from_env, Client# register instanceclient = Client(config_from_env('127.0.0.1:7771')) # use you discovery domainclient.register('your app name', ['http://127.0.0.1:8000'])# watch instancedef watch_callback(instances):print('instance change: %s', instances)client.watch('your app name', watch_callback)client.stop()```
Package: python-dispatch
python-dispatchLightweight event handling for PythonDescriptionThis is an implementation of the "Observer Pattern" with inspiration from theKivyframework. Many of the features though are intentionally
stripped down and more generalized. The goal is to have a simple drop-in
library with no dependencies that stays out of the programmer's way.Installation"python-dispatch" is available onPyPIand can be installed using pip:pipinstallpython-dispatchPython RequirementsAfter version0.1of this project, only Python 3.6 and above will be supported.
If using an older Python version, the older releases should still be available
on PyPI and the correct package should be chosen automatically bypip.
If not, either upgradepipandsetuptools:pipinstall-UpipsetuptoolsOr specify the version manually:pipinstallpython-dispatch<0.2LinksProject Homehttps://github.com/nocarryr/python-dispatchPyPIhttps://pypi.python.org/pypi/python-dispatchDocumentationhttps://python-dispatch.readthedocs.ioUsageEvents>>>frompydispatchimportDispatcher>>>classMyEmitter(Dispatcher):...# Events are defined in classes and subclasses with the '_events_' attribute..._events_=['on_state','new_data']...defdo_some_stuff(self):...# do stuff that makes new data...data={'foo':'bar'}...# Then emit the change with optional positional and keyword arguments...self.emit('new_data',data=data)>>># An observer - could inherit from Dispatcher or any other class>>>classMyListener(object):...defon_new_data(self,*args,**kwargs):...data=kwargs.get('data')...print('I got data:{}'.format(data))...defon_emitter_state(self,*args,**kwargs):...print('emitter state changed')>>>emitter=MyEmitter()>>>listener=MyListener()>>># Bind to the "on_state" and "new_data" events of emitter>>>emitter.bind(on_state=listener.on_emitter_state)>>>emitter.bind(new_data=listener.on_new_data)>>>emitter.do_some_stuff()Igotdata:{'foo':'bar'}>>>emitter.emit('on_state')emitterstatechangedProperties>>>frompydispatchimportDispatcher,Property>>>classMyEmitter(Dispatcher):...# Property objects are defined and named at the class level....# They will become instance attributes that will emit events when their values change...name=Property()...value=Property()>>>classMyListener(object):...defon_name(self,instance,value,**kwargs):...print('emitter name is{}'.format(value))...defon_value(self,instance,value,**kwargs):...print('emitter value is{}'.format(value))>>>emitter=MyEmitter()>>>listener=MyListener()>>># Bind to the "name" and "value" properties of emitter>>>emitter.bind(name=listener.on_name,value=listener.on_value)>>># Set emitter.name property (triggering the on_name callback)>>>emitter.name='foo'emitternameisfoo>>># Set emitter.value (triggering the on_value callback)>>>emitter.value=42emittervalueis42ContributingContributions are welcome!If you want to contribute through code or documentation, please see theContributing Guidefor information.LicenseThis project is released under the MIT License. See theLICENSEfile
for more information.
Package: python-dispatch-sphinx
An extension forSphinxto documentpython-dispatchobjects.LinksProject Homehttps://github.com/nocarryr/python-dispatch/sphinx-pluginDocumentationhttps://python-dispatch.readthedocs.io/en/latest/sphinx-pluginPyPIhttps://pypi.org/project/python-dispatch-sphinxLicenseCopyright (c) 2022 Matthew Reid <matt@nomadic-recording.com>python-dispatch-sphinx is licensed under the MIT license,
please see LICENSE file for details.
Package: python-distilclient
Client Library for OpenStack Rating Service (Distil)How to release code/tarballs/pypi1. Add release tag, for example, “0.2.0” with the following description:
“Release disitilclient version 0.2.0”; it should be signed by your personal
gpg key:gittag-s0.2.02. Check that tag is in the repo: “git tag -v 0.2.0”, you should see something
like:object1466c71d0e9a8fd2cc6e0610587ca0bb2d451ad3typecommittag0.2.0taggerFeiLongWang<flwang@catalyst.net.nz>1488405992+1300Releasedistilclient0.2.0Sincethisrelease,DistilV2APIissupported.3. Push tag to the gerrit, you should be in the core team to do it, here is
the command to do it:gitpushgerrit0.2.04. Check the build status onhttp://status.openstack.org/zuul/by search
distilclient.5. Release wil be available when openstack/python-distilclient disappear,
check the following links for the right versions:https://pypi.python.org/pypi/python-distilclient/http://tarballs.openstack.org/python-distilclient/Check pypi release onhttps://pypi.python.org/pypi/python-distilclient
Package: python-divvy
Divvy Rideshare DataOverviewAccess and work with Chicago rideshare data from Python.All the information is derived from the official divvy bikes website:https://divvybikes.com/Where the data sources were linked to:https://ride.divvybikes.com/system-datawhich point to:Historical:https://divvy-tripdata.s3.amazonaws.com/index.htmlLive and stations:https://gbfs.divvybikes.com/gbfs/gbfs.jsonInstallationInstall frompip$pipinstallpython-divvyUsageReading DataReading from the various data sources can be done with the following functions.importdivvy# Historical trips between a given date rangedf_trips=divvy.read_historical_trips(start_date="2021-01-01",end_date="2021-02-01")# The trips from July 15th 2022 until latestdf_trips=divvy.read_historical_trips(start_date="2022-07-15")# Available ebikes and scootersdf_available=divvy.read_available()# Station information and bikes and scooters available theredf_stations=divvy.read_stations()With the install ofgeopandas, the pre-May 2022 pricing boundary for ebikes can be accessed with theread_fee_boundaryfunction.# Single row geopandas.GeoDataFramegdf_fees=divvy.read_fee_boundary()Trip PricingThis package allows provides access to the latest pricing for the different bikes as definedhere. These prices can be apply topandas.Seriesobjects as follows:df_trips=pd.DataFrame({"duration_in_mins":[10,10,10,10],"member":[True,True,False,False],"electric_bike":[True,False,True,False],})df_trips["price"]=divvy.apply_pricing(duration=df_trips["duration_in_mins"],member=df_trips["member"],electric_bike=df_trips["electric_bike"],)Classic bike prices for casual users are ambiguous due to the daily rate or single trip rate. However, they can be accessed in thedivvy.pricingmodule as so.casual_non_electric_duration=[10,20,30]divvy.pricing.single_ride_rate(casual_non_electric_duration)divvy.pricing.visitor_pass_rate(casual_non_electric_duration)New pricing can easily be defined from thedivvy.pricingmodule as well. For instance, a reduced ebike rate can be created for casual users.reduced_ebike_rate=(divvy.pricing.UnlockRate(amount=100)+divvy.pricing.MinuteRate(amount=25,start=0))casual_electric_duration=[10,20,30]reduced_ebike_rate(casual_electric_duration)
Package: python-dlt645
An incomplete implementation of the DL/T645 protocol designed to communicate
with energy meters through an infrared interface.Getting startedTo isntall the DL/T645 package only:$pipinstallpython-dlt645To install the package with the utility CLI commands:$pipinstallpython-dlt645[cli]DevelopmentWhen cloning the repository for the first time:$poetryinstall$pre-commitinstallTests pre commit$black--diffdlt645/$flake8dlt645/DocumentationBuild the documentation:$makedocs
Package: python-dns-failover
“Python script to automatically update DNS records for a bunch of servers participating in a Round-Robin DNS setup”Free software: BSD licenseDocumentation:http://python-dns-failover.rtfd.org.This project is mainly based on@dotcloud’s work on his projectautodnsfailover.The main difference is thatpython-dns-failoverscript is aimed torun in an external
machinewhileautodnsfailoveris to run in the participating servers themselves.TODODocumentationTestingHistory0.1.0 (2013-12-29)Core functionality.CloudFlare DNS backend.First release on PyPI.