Saravanan666/pypi-org huggingface dataset:
Package: pyhoma-localpatch
Somfy TaHoma / OverKizAn updated and async version of the originaltahoma-apiby@philklei. The aim of this wrapper is to offer an easy to consume Python wrapper for the internal API's used by tahomalink.com, or other vendors which use the OverKiz platform.Somfy TaHoma has an official API, which can be consumed via theSomfy-open-api. Unfortunately only a few device classes are supported via the official API, thus the need for this wrapper.This package is written for the Home Assistantha-tahomaintegration, but could be used by any Python project interacting with Somfy TaHoma devices.InstallationpipinstallpyhomaGetting startedimportasyncioimporttimefrompyhoma.clientimportTahomaClientSUPPORTED_ENDPOINTS={"Cozytouch":"https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/","eedomus":"https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/","Hi Kumo":"https://ha117-1.overkiz.com/enduser-mobile-web/enduserAPI/","Rexel Energeasy Connect":"https://ha112-1.overkiz.com/enduser-mobile-web/enduserAPI/","Somfy Connexoon IO":"https://tahomalink.com/enduser-mobile-web/enduserAPI/","Somfy Connexoon RTS":"https://ha201-1.overkiz.com/enduser-mobile-web/enduserAPI/","Somfy TaHoma":"https://tahomalink.com/enduser-mobile-web/enduserAPI/","Somfy (Australia)":"https://ha201-1.overkiz.com/enduser-mobile-web/enduserAPI/","Somfy (Europe)":"https://tahomalink.com/enduser-mobile-web/enduserAPI/","Somfy (North America)":"https://ha401-1.overkiz.com/enduser-mobile-web/enduserAPI/",}USERNAME=""PASSWORD=""asyncdefmain()->None:asyncwithTahomaClient(USERNAME,PASSWORD,api_url=SUPPORTED_ENDPOINTS["Somfy (Europe)"])asclient:try:awaitclient.login()exceptExceptionasexception:# pylint: disable=broad-exceptprint(exception)returndevices=awaitclient.get_devices()fordeviceindevices:print(f"{device.label}({device.id}) -{device.controllable_name}")print(f"{device.widget}-{device.ui_class}")whileTrue:events=awaitclient.fetch_events()print(events)time.sleep(2)asyncio.run(main())DevelopmentInstallationFor Linux, installpyenvusingpyenv-installerFor MacOS, runbrew install pyenvDon't forget to update your.bashrcfile (or similar):export PATH="~/.pyenv/bin:$PATH"
eval "$(pyenv init -)"Install the requireddependenciesInstallpoetry:curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | pythonClone this repositorycd python-tahoma-apiInstall the required Python version:pyenv installInit the project:poetry installRunpoetry run pre-commit installPyCharmAs IDE you can usePyCharm.Using snap, runsnap install pycharm --classicto install it.For MacOS, runbrew cask install pycharm-ceOnce launched, don't create a new project, but open an existing one and select thepython-tahoma-apifolder.Go toFile | Settings | Project: nre-tag | Project Interpreter. Your interpreter must look like<whatever>/python-tahoma-api/.venv/bin/python
Package: pyhome
A dotfile management and synchronisation tool.This is a simple python utility with similar functionality to the functionality
of thehomesickruby utility, providing a simple interface for managing
dotfiles via git repositories.This tool was born out of frustration at attempting to use ruby gems on HPC
systems, where I did not have administrative rights. On such systems, which are
often not the bleeding edge of ruby version, getting gems to work has proved
extremely difficult. Installation of a new ruby version with associated rubygem
was possible sometimes, but not often enough.AimsThis tool replicates the most basic functionalities ofhomesick, namelyCloning git repositories to the appropriate locationPulling repositoriesAutomatic creation of symbolic links to dotfiles in reposDevelopmentCode is written to be compatible with both Python 2.6+ and 3.x, and
deliberately avoids using any modules outside the standard library, so that it
works out-of-the-box on any system with a reasonably modern Python interpreter
installed.
Package: pyhomebridge
pyhomebridgepython library to control a Homebridge serverSetupInstallhomebridge-config-ui-xon your HomeBridge.Make sure you run HomeBridge in Insecure Mode. (This can be changed in the Web Settings at top right corner)
API control is only allowed in this mode.
Thats starting HomeBridge with the -I flag.InstallationPypi package forpyhomebridgepip3installpyhomebridgeUsagePython usage:fromhomebridgeimportHomeBridgeControllercontroller=HomeBridgeController(host="homebridge.local",port=80,auth="123-45-678")print(controller.accessories)controller.print_accessories()controller.accessory_exists("light_hallway")controller.get_value("light_hallway")controller.set_value("light_hallway",True)In the repo you can find a python script to use for CLI execution.control-homebridge.pypython3control-homebridge.py--list
python3control-homebridge.py--namelight_hallway--off# you will need to set url, port and code in the script# or use the --server, --port, --auth optionsDevelopmentCurrently supported devices:LightsSwitchesOutletsTODOadd timeoutssupport more device typeswrite documentationwrite testsmuch much moreInspirationHomeScript by menahishayanLicenseMITFree Software, Hell Yeah!
Package: pyhomekit
Author:Henri DwyerPyHomeKit is a set of python libraries that let you control HomeKit compatible accessories, both BLE and HTTP.For more information about HomeKit, see theApple Developper HomeKitpage.Bluetooth Low Energy device compatibility is provided bybluepy, which uses bluez.ImportantPyHomeKit is currently in pre-alpha. Many features are not yet implemented or broken.Getting StartedUsageConnect to a HAP accessory view its HAP characteristics:importpyhomekitdevice_mac="aa:aa:aa:aa:aa"device=pyhomekit.ble.HapAccessory(mac=device_mac)characteristics=device.discover_characteristics()print(characteristics)Interact with HAP characteristics:# View the value of a characteristicdevice.lock_target_state()>>>0# Set the value of a characteristicdevice.lock_target_state(value=1)InstallationpyHomeKitis on Pypi, so you canpipinstall it:pipinstallpyhomekitIf you want to install from source, clone the repository:gitclonegit://github.com/henridwyer/pyhomekit.gitcdpyhomekitpipinstall-rrequirements.txtpipinstall-e.Then you can build the documentation:makedocAnd run the tests:maketestsRequirementspyHomeKit is only compatible with python 3.6 for the moment.
Package: pyhomelink
python_homelinkPython library for accessing AICO HomeLINK services.Note:-This library requires Python 3.11.IntroductionThis library enables access to the AICO HomeLINK API for retrieving the following items:PropertyDevicesAlertsInsightsLookupsReadingsBuy Me ACoffeeBeer 🍻I work on this library because I like things to work well for myself and others, and for it to deliver as much as is achievable with the API. Please don't feel you are obligated to donate, but of course it is appreciated.DocumentationThe full documentation is available here -python_homelink Documentation
Package: pyhomepilot
pyhomepilotPython package for communicating with the Rademacher HomePilot API.DisclaimerHomePilot is a trademark of the Rademacher company. Rademacher is not affiliated with the author or this project in any way.InstallationUse the package managerpipto install pyhomepilot.pipinstallpyhomepilotUsageimportasyncioimportaiohttpfrompyhomepilotimportHomePilotAPIfrompyhomepilot.authimportAuthasyncdefmain():asyncwithaiohttp.ClientSession()assession:auth=Auth(session,"http://192.168.1.10","password-if-configured")# only if a password is configuredawaitauth.async_login()api=HomePilotAPI(auth)devices=awaitapi.async_get_all_devices()print([device.namefordeviceindevices])asyncio.run(main())ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
Package: pyhomeworks
RFK101 PackagePackage to connect to Lutron Homeworks Series-4 and Series-8 systems.
The controller is connected by an RS232 port to an Ethernet adaptor (NPort).Example:from time import sleep
from pyhomeworks import Homeworks

def callback(msg,data):
    print(msg,data)

hw = Homeworks( 'host.test.com', 4008, callback )

# Sleep for 10 seconds waiting for a callback
sleep(10.)

# Close the interface
hw.close()
Package: pyhomotopy
pyHAMPython module to apply Homotopy Analysis Method to nonlinear equations.Current version supports the solution of nonlinear algebraic equations and boundary value problems of Ordinary Differential Equations (ODEs).
Main Classes of APIHamSolver HamBcs HamResultSee the examples in file hamExtTests.py. There are two examples.To solve nonlinear algebraic equation exp(-x**2)cos(4x)
To solve the ODE BVP : y' - 1/x2 + y/x + y2 = 0, y(1) = -1
Package: pyhOn
This python package is unofficial and is not related in any way to Haier. It was developed by reversed engineered requests and can stop working at anytime!pyhOnControl your Haier, Candy and Hoover appliances with python!
The idea behind this library is, to make the use of all available commands as simple as possible.InstallationpipinstallpyhOnQuick overviewTo get an idea of what is possible, use the commandline-toolpyhOn. This command requests all available options of connected appliances from the hOn api of your Haier Account.$ pyhOn --user example@mail.com --password pass123
========== WM - Waschmaschine ==========
data:
  attributes:
    parameters:
      ...
      texture: 1
      totalElectricityUsed: 28.71
      totalWashCycle: 35
      totalWaterUsed: 2494
      transMode: 0
      ...
settings:
  startProgram:
    rinseIterations:
      max: 5
      min: 3
      step: 1
    spinSpeed:
      - 0
      - 400
      - 600
      - 800
      ...Python-APIList devicesimportasynciofrompyhonimportHonasyncdefdevices_example():asyncwithHon(USER,PASSWORD)ashon:forapplianceinhon.appliances:print(appliance.nick_name)asyncio.run(devices_example())Execute a commandasyncwithHon(USER,PASSWORD)ashon:washing_machine=hon.appliances[0]pause_command=washing_machine.commands["pauseProgram"]awaitpause_command.send()Set command parameterasyncwithHon(USER,PASSWORD)ashon:washing_machine=hon.appliances[0]start_command=washing_machine.commands["startProgram"]forname,settinginstart_command.settings:print("Setting",name)print("Current value",setting.value)ifsetting.typology=="enum":print("Available values",setting.values)setting.value=setting.values[0]elifsetting.typology=="range":print("Min value",setting.min)print("Max value",setting.max)print("Step value",setting.step)setting.value=setting.min+setting.stepTranslationTo get the translation of some keys like programs, you can use the translation command to see all of hOn's available translations$ pyhOn translate es
AC:
  APPLIANCE_RENAME:
    CONTENT_CHOOSE_NAME: Antes de continuar, debes elegir un nombre...
    DEFAULT_NAME: Aire acondicionado
    TITLE_CHOOSE_NAME: ¡Elije un nombre para tu aire acondicionado!
    TITLE_SAVE_NAME: Para cambiar el nombre de tu aparato:
...This generates a huge output. It is recommended to pipe this into a file$ pyhOn translate fr > hon_fr.yaml
$ pyhOn translate en --json > hon_en.jsonUsage exampleThis library is used for the customHomeAssistant Integration "Haier hOn".ContributionAny kind of contribution is welcome!Please add your appliances data to ourhon-test-data collection.This helps us to develop new features and not to break compatibility in newer versions.
Package: pyhon-inverse-spectrogram
# pyhon-inverse-spectrogramInverse spectogram for scipy.signal.spectrogram done for the human ears.>>> from scipy.io import wavfile
>>> import scipy.signal as signal
>>> import numpy as np>>> fs, data = wavfile.read('./test_sound.wav')
>>> left, right = list(zip(*data))>>> left = np.array(left)>>> f, t, Sxx = signal.spectrogram(left, fs, mode='magnitude')
>>> lInverse = inverse_spectrogram(f, t, Sxx, fs)## inverse_spectrogram(f, t, Sxx, fs)
inverse_spectrogram calculates the inverse spectrogram
from frequencies f, intervals t, magnitude matrix Sxx using the sample rate fs.
Returns signal as a np.array
Package: pyhoo
PyhooYet another unofficial Yahoo Finance API library but with concurrent requests.IndexInstallationUsageTroubleshootingContributingInstallationPyhoo requires Python >= 3.8pipinstallpyhooUsagePyhoo issimple:importpyhootickers=['FB','AAPL','AMZN','GOOGL']start='2020-02-01'end='2020-11-02'stock_prices=pyhoo.get('chart',tickers,start=start,end=end,granularity="1d")financial_reports=pyhoo.get('fundamentals',tickers,start=start,end=end)options=pyhoo.get('options',tickers,strikeMax=400.0)The result ofpyhoo.getis a formattedpandas.DataFrame(here for stock prices):timestamphighlowvolumeopencloseadjclosecurrencysymbolexchangeNameinstrumentTyperegularMarketPrice...01580481000208.69201.0631359900208.43201.91201.91USDFBNMSEQUITY286.95...11580740200205.14202.515510500203.44204.19204.19USDFBNMSEQUITY286.95...21580826600210.6205.219628900206.62209.83209.83USDFBNMSEQUITY286.95...31580913000212.73208.7112538200212.51210.11210.11USDFBNMSEQUITY286.95...41580999400211.19209.3410567500210.47210.85210.85USDFBNMSEQUITY286.95...5.......................................Pyhoo isfast, it uses concurrency to fire multiple requests at the same time. You can request all the tickers of the S&P500 in one shot.Pyhoo isstill in development, feel free to add more endpoints thanks to theConfigobject !Currently, it supports three endpoints:chart, forOHLCdata, basically stock pricesfundamentals, for financial data about the firm, see thelist of available reportsoptions, for detailed information on each call and put at each strike on specific tickersTroubleshootingIf running from a Jupyter Notebook, you may encounter the following error:RuntimeError:asyncio.run()cannotbecalledfromarunningeventloopThis is because Jupyter Notebooks are running themselves in an event loop, and it is a known issue withasyncio.run.There is a workaround, a bit hacky but gets the job done, usingnest_asyncio.pipinstallnest_asyncioThen in the Notebook, before callingpyhoo.get:importnest_asyncionest_asyncio.apply()And you should be ok !ContributingContributions are welcome !Pyhoo usespoetryas package manager. You can find the installation instructionshere.It is recommended to install the virtual environment in the project folder if you use VSCode, to help the linter resolve imports:poetryconfigvirtualenvs.path--unset
poetryconfigvirtualenvs.in-projecttrueOnce Poetry is configured, you can install required dependencies with:poetryinstallThe CI enforces strict typing, linting and coverage.
Package: pyHooke
HookeWritten in python, and based on quite a few requirementsIt is yet to work properlyInstallationpip install pyHooke # Stable PyPi
pip install git+https://github.com/oekshido/Hooke # LatestDue to the inital installation, it may be required to install nltk datasets manuallyUsageTo run a simple textual check:importHookeHooke.Textual(input="test/test.txt")#Runs the fast, textual comparisonHooke.Shingled(input="test/test.txt")#Runs the nltk and shingle comparisonContributingJust pull request, with a brief explanation of the changes.
Package: pyhooker
# pyhookerLightweight and easy-to-use python dependency injection libraryPyhooker is ready to use for Python >=2.7 and >=3.2[![Build Status](https://travis-ci.org/sighalt/pyhooker.svg?branch=master)](https://travis-ci.org/sighalt/pyhooker)## Installation```pip install git+https://github.com/sighalt/pyhooker.git```## Usage```pythonimport pyhooker# wheel.pyclass IWheel(object):passclass MichelinWheel(IWheel):pass# engine.pyclass IEngine(object):passclass OttoEngine(IEngine):pass# car.pyclass ICar(object):passclass Car(ICar):@pyhooker.inject_params(engine=IEngine, wheel_type=IWheel)def __init__(self, engine, wheel_type):self.engine = engineself.wheel_type = wheel_type# driver.pyclass Driver(object):@pyhooker.inject_params(car=ICar)def __init__(self, car):self.car = car# __init__.pypyhooker.register(ICar, Car)pyhooker.register(IEngine, OttoEngine)pyhooker.register(IWheel, MichelinWheel)driver = Driver()print("The driver is %s\n... with its car %s\n... and engine %s\n... and wheel type %s" % (driver,driver.car,driver.car.engine,driver.car.wheel_type))```
Package: pyhooks
PyHooks is meant to expose method hook for classesStatusThis project is maintained, feel free to open issues or pull requests.PurposeHave you ever wanted to execute code before or after a method ? PyHooks solve
this exact problem taking inspiration from marshmallow’s hook system.InstallationLike any other published python package, you can install it viapip:pipinstallpyhooksHow to use ?To use it, you first need to implement a hooked method. You do this by
decorating the method with@Hook.For example, suppose you have a class that at some moment save your data (such
as a database). If you want to be able to plug new behavior, your code
will look like this:frompyhooksimportHookclassDatabaseEntry(object):@Hookdefsave(self):pass# save implementation hereThanks to the@Hookline, you will now be able to add functions that execute
before and after thesavemethod using the decorators@precall_registerand@postcall_register.For instance, if you want to increment a version variable before
saving, you could do:frompyhooksimportprecall_registerclassVersionnedEntry(DatabaseEntry):@precall_register("save")defincrement_version(self):self.version+=1The decorator directive indicates to your class thatincrement_versionshould
be run before thesavemethod that is passed to the decorator as argument.ExamplesYou can find some more examples in theexamples/directory of this
repository.Advanced usageYou can specialize a register decorator by calling it outside of a decorator
context. The last example would yield:frompyhooksimportprecall_registerpre_save=precall_register("save")classVersionnedEntry(DatabaseEntry):@pre_savedefincrement_version(self):self.version+=1
Package: pyhop
pyhop is a Python package that simplifies the process of performing traceroutes by utilizing the built-in trace tools, tracert for Windows and traceroute for Linux. This package provides a consistent interface and reliable results across different platforms, allowing network administrators, developers, and users to diagnose network issues and optimize performance with ease.With pyhop, you can effortlessly trace the path of packets from your device to a destination host, gaining valuable insights into network connectivity.Usage Example:from pyhop import tracerouteprint(traceroute('google.com'))
Package: py-hopscotch-dict
py-hopscotch-dictpy-hopscotch-dict is a package that contains a replacement for the standard Pythondictwhich implements the concepts ofhopscotch hashing, as explained in thefoundational paper.Hopscotch hashing provides a number of benefits over the methods used in the standarddictimplementation, most notably that insertions, deletions and lookups have an expected O(1) runtime.py-hopscotch-dict has not been tested in a concurrent environment and thusly cannot be guaranteed to function correctly in conjunction with multi-threading, across multiple processes or in an asynchronous environment.Usage>>> from py_hopscotch_dict import HopscotchDict
>>> d = HopscotchDict()
>>> d["test"] = True
>>> d
HopscotchDict({'test': True})
Package: py-horned-owl
py-horned-owlAn experimental bridge from horned-owl to python using PyO3.InstallationPublished versionTo install the published library:pip install py_horned_owlFrom sourcesTo build locally from sources, you will needRust,PyO3andMaturin.Check out this repository:git clone https://github.com/jannahastings/py-horned-owl/In the directory py-horned-owl, create and activate a virtual Python environment:virtualenv py-horned-owlsource bin/activateThen you can get maturin to build the library and install it into the virtual Python environment with:maturin developUsageThe library supports loading ontologies from.owl(RDF-XML) and.owx(OWL-XML) files via horned-owl's parsing functionality.ROBOTcan transform ontologies that are in other OWL flavours into one of these formats usingrobot convert.Example of simple usage:import pyhornedowl

ontoname = "family.owx"

onto = pyhornedowl.open_ontology(ontoname)

print (f"Loaded ontology has {len(onto.get_classes())} classes.")
print (f"Loaded ontology has {len(onto.get_axioms())} axioms.")

for c in onto.get_classes():
    print(onto.get_axioms_for_iri(c))For more information please visit thedocumentation.
Package: pyhorn-flow
PyHornAn unofficial Python client to interact with Bullhorn's REST API.
We developed this client to facilitate the integration of FLOW's systems with Bullhorn, and decided to disclose the source for any other developers that may find it useful.Installationpip install pyhorn-flowAuthenticationAuthentication requires a simple JSON file containing the following auth-related data (provided by Bullhorn themselves):usernamepasswordclient_idclient_secretOther fields are filled automatically and stored infile_namefor better use of the authenticated session.{"file_name":"auth.json","client_id":"GUIDprovidedbybullhorn","client_secret":"secretprovidedbybullhorn","username":"apiuser","password":"yourpasswordshouldgohere"}Supported FunctionsPingSearchQueryEntityCreateUpdateDeleteTo-manyCreate associationDelete associationEventSubscriptionRequestRetryGet last request IDChangelogv1.1.0Added functions to subscribe to Bullhorn events and read themv1.0.0Added safe request to re-authorize requests when 401 is returned from APIAdded Entity creation, update and deletionAdded To-many association and dissociationAdded Search and Query functionalitiesAdded Ping functionality and automatic session renewalAdded authentication flow
Package: pyhost
pyhostDNS LookupVersioningpyhost followsSemVer(MAJOR.MINOR.PATCH) to track what is in each release.Major version number will be bumped when there is an incompatible API changeMinor version number will be bumped when there is functionality added in a backwards-compatible manner.Patch version number will be bumped when there is backwards-compatible bug fixes.Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.InstallationInstallation the package from pypi with your tool of choicepip,poetryorpipenv.pipinstallpyhost
Package: py-host
####1、 变更记录
v0.0.8增加consumer_tag 功能, 以便在rabit web 页面显示消费者增加发送日志至日志中心功能fromys_serviceimport*@ys_host.register("YS.机票.国内.退票.wiken.DEBUG",prefetch=1,consumer_tag="wiken")defrefund(context):print("bigin:",context.text)re=context.send_log_to_center(context=context,project="wikenTest",module="test1",user="7921",level="error",return_msg="log_center_test",field1="111111",field2="自愿",field3="国内",)print("result:",re)context.ack()withys_host:ys_host.start()