Saravanan666/pypi-org huggingface dataset:
Package: govee-api-laggat
govee-api-laggat PackagePython implementation of the govee API 1.0 to control the cheap and colorful LED strips.Why / MotivationI want to use this package in an Home Assistant Component to control my new light strips.Remember: this is NOT the integration, but the library the integration uses.The custom integration project lives here:github.com/LaggAt/hacs-goveeUsage in your projectLook at the /example folder in this repo.Govee trademarkGovee and the Govee logo are trademarks or registered trademarks of Shenzhen Intellirock Company Limited, and used by Govee with permission. Neither your use of the Govee Logo grant you any right, title, or interest in, or any license to reproduce or otherwise use, the Govee logo. You shall not at any time, nor shall you assist others to, challenge Govee's right, title, or interest in, or the validity of, the Govee Marks.LinksPyPi project and python package:pypi.org/project/govee-api-laggatHome Assistant custom integration Git:github.com/LaggAt/hacs-goveeGovee API documentation:Govee API ReferenceAPI KeyTo get an api key you need to install the 'Govee Home' app on your mobile and browse the user tab - About - Request API key. Usually you get your key within seconds by mail.Issues / ImprovementsThere are two projects, this one is the API implementation for python.
The second project is the custom integration into Home Assistant which currently livesgithub.com/LaggAt/hacs-goveeFeel free to fork and start a pull request in your feature/bug branch.
If you cannot fix or extend it yourself, you may want to add an issue in the correct project, but it may take a bit longer.developmentpip install setuptools wheel toxFork and clone the repositoryMake a 'feature/NAME' or 'bug/NAME' branchRun tests: toxcommit and start a pull request
Package: govee-ble
Govee BLEManage Govee BLE devicesInstallationInstall this via pip (or your favourite package manager):pip install govee-bleContributors ✨Thanks goes to these wonderful people (emoji key):This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package was created withCookiecutterand thebrowniebroke/cookiecutter-pypackageproject template.
Package: govee-H613-BTcontroller
Control govee lights with pythonSimple python package to control govee H613B (and technically more) led strip with pythonInstallationpip3 install govee_H613_BTcontrollerExampleimportasynciofromgovee_H613_BTcontrollerimportGoveeControllerasyncdefmain():device=GoveeController('A4:C1:38:35:97:24')device=awaitdevice.connect()awaitdevice.turn_on()awaitdevice.set_color('red')awaitdevice.set_brightness(255)awaitasyncio.sleep(3)awaitdevice.set_color('green')awaitdevice.turn_off(smooth=True)awaitdevice.disconnect()if__name__=='__main__':asyncio.run(main())ContributingContributions are welcome! Feel free to open a PR.LicenseThis project is licensed under the MIT License.☆ If you like the project, please leave a star, is free!
Package: govee-lan-api
Govee LAN API ClientA simple API client forGovee's LAN UDP APIThis was done in a weekend to help support a home assistant plugin for
controlling govee devices over their new(ish) LAN APIUsagepip install govee_lan_apiHere's some sample code that I'm using to test this -- formal API docs and tests coming soon.fromgovee_lan_apiimportGoveeClientimportasyncioimportloggingLIVING_ROOM_LIGHT='18:66:C4:32:38:30:1E:32'RED=(255,0,0)GREEN=(0,255,0)BLUE=(0,0,255)PURPLE=(248,207,255)asyncdefmain():logging.basicConfig(level=logging.DEBUG)client=GoveeClient()awaitclient.turn_on(LIVING_ROOM_LIGHT)awaitclient.set_brightness(LIVING_ROOM_LIGHT,100)awaitclient.set_color_by_rgb(LIVING_ROOM_LIGHT,GREEN)awaitclient.set_brightness(LIVING_ROOM_LIGHT,50)awaitclient.set_brightness(LIVING_ROOM_LIGHT,1)awaitclient.set_brightness(LIVING_ROOM_LIGHT,100)awaitclient.turn_on(LIVING_ROOM_LIGHT)awaitclient.set_color_by_rgb(LIVING_ROOM_LIGHT,RED)awaitclient.set_color_by_rgb(LIVING_ROOM_LIGHT,GREEN)awaitclient.set_color_by_rgb(LIVING_ROOM_LIGHT,BLUE)awaitclient.set_color_by_rgb(LIVING_ROOM_LIGHT,PURPLE)if__name__=="__main__":asyncio.run(main())
Package: govee-led-wez
Control Govee LED Lights from PythonThis library provides control over Govee-manufactured lights.  @wez built this
for use with Home Assistant. You canfind the corresponding hacs-govee-lan
repo here.It has an emphasis on making use of theirLAN
APIbut also makes use of
theirHTTP
APIin order to retrieve the user-assigned names of the devices, and to control the
devices that don't yet support the LAN API.Getting Startedfromgovee_led_wezimportGoveeController,GoveeDevicecontroller=GoveeController()defdevice_changed(device:GoveeDevice):print(f"{device.device_id}state ->{device.state}")controller.set_device_change_callback(device_changed)ifYOUR_API_KEY:controller.set_http_api_key(YOUR_API_KEY)controller.start_http_poller()controller.start_lan_poller()ifYOU_WANT_BLE:# Optional, if you want bluetooth device control.# This will disconnect from devices after they are idle# for a while. If you omit this, devices will be disconnected# in case of error. You probably want this.controller.start_ble_idler()# This will look for new devices in the background,# by default every 10 minutescontroller.start_ble_poller()# Alternatively: This will look for devices right now,# but note that it needs # to perform discovery and can# take several seconds# await controller.query_ble_devices()# Devices will now be discovered asynchronouslyNotesDevices are discovered asynchronously. While the full set of devices
associated with your account can be returned via the HTTP API, the
initial request for them is made asynchronously by the background
http poller task.  If you need the list immediately, you can callcontroller.query_http_devices()to obtain that list.The HTTP API has some tight rate limits. This library prefers to avoid
read-after-write operations to verify the state in order to reserve the calls
for issuing commands to your devices.  This means that, for devices that don't
support the LAN API, the assumed state may be a bit wonky until the device
is controlled. You can callcontroller.update_device_state()to
explicitly retrieve the state.BLE is preferred over HTTP. When we know a device is accessible via BLE,
then we will attempt to control it via BLE before trying to use HTTP.
LAN is always attempted first, as it has the lowest latency.BLE is currently only usable in conjunction with HTTP and/or LAN discovery.
There isn't a BLE-only usage at the moment.ContributingAMakefileprovides shortcuts for doing stuff:make setup- do one-time setup for developingmake check- performs type checking and lintingmake test- runs testsmake fmt- runs code formatting, potentially appeasingmake checkmake build- builds distributable bitsGitHub Actions will run thecheck,testandbuildactions on PRs.
Package: govee-py2
Govee API 2.0 Python Library (2023)This is a super simple interface for interacting with Govee smart lights via Python.There are three primary functions to control the lights:Toggle powerSet brightnessSet colorInitializing a ClientTo interact with Govee devices on your network, you'll need a Govee API key. You can request one from in-app or browser on the Govee platform.from govee import GoveeClient



client = GoveeClient("API KEY")A client is initialized with 3 key values:from govee import GoveeClient



client = GoveeClient("API KEY")



# Access the client device list:

client.devices



# Access the client network SSID

client.ssid



# Access the client API key

client.keyAll device interaction revolves around actual device objects. All available devices at the time of client initialization are stored inGoveeClient.devicesToggle Power@param mode = "on", "off", or Nonefrom govee import GoveeClient



client = GoveeClient("API KEY")



# Get the first device object

wall_lights = client.devices[0]



# Toggle Power (if on -> off | if off -> on)

wall_lights.toggle()



# Turn on 

wall_lights.toggle(mode="on")



# Turn off

wall_lights.toggle(mode="off")Set Brightness@param int brightness = 0-100Note that setting the brightness to 0 will power off the device.from govee import GoveeClient



client = GoveeClient("API KEY")



# Get the first device object

wall_lights = client.devices[0]



# Set the brightness to 50%

wall_lights.set_brightness(50)Set Color@param tuple colors = ((0-255), (0-255), (0-255))@colors is in the format: (R, G, B)from govee import GoveeClient



client = GoveeClient("API KEY")



# Get the first device object

wall_lights = client.devices[0]



# Set the lights red

wall_lights.set_color(255, 0, 0)



# Set the lights green

wall_lights.set_color(0, 255, 0)



# Set the lights blue

wall_lights.set_color(0, 0, 255)This functionality is dependent upon Govee's API which is not my creation. All rights and credit reserved to Govee 2023 ©.
Package: govenv
Very simple, effective go virtual environments that work directly with
python’s virtualenv and virtualenvwrapper.How does it work?It’s just a virtualenvwrapper extension!If you are already using that, just$ pip install govenvAnd next time you make a virtualenv by usingmkvirtualenvit will create
agopathdirectory in your venv folder to hold all your golang source.
Now, whenever you activate that it will set yourGOPATHandPATH,
and return it to its previous setting when you deactive.We also add an alias, if you don’t have it:$ gohereWhich will add your current working dir to the end of theGOPATH(useful
for testing local code during development.It’s extremely simple, you should just look at the source:gopath.py
Package: goverge
Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.Description: goverge========[![codecov](https://codecov.io/gh/Workiva/goverge/branch/master/graph/badge.svg)](https://codecov.io/gh/Workiva/goverge)goverge is a golang multi package coverage reporting tool.Install-------pip install govergeTesting-------pip install -r requirements_dev.txtnosetestsContributing-------Code:Must be flake8 compliant -- pip install -r requirements_dev.txt to install flake8Must be unit testedMust have clear doc stringsPlatform: UNKNOWN
Package: govern
Govern PackageSummaryModel governance AI for quant financeCopyrightEach individual contributor holds copyright over their contributions to the
project. The project versioning is the sole means of recording all such
contributions and copyright details. Specifying corporate affiliation or
work email along with the commit shall have no bearing on copyright ownership
and does not constitute copyright assignment to the employer. Submitting a
contribution to this project constitutes your acceptance of these terms.Because individual contributions are often changes to the existing code,
copyright notices in project files must specify The Project Contributors and
never an individual copyright holder.
Package: governance
Governancegovernanceis a Python package for connecting a python notebook environment to the Mission Control MLOps platform. Mission Control enables teams to accelerate quality, velocity, and trust in their data science lifecycle by tightly embedding governance and compliance requirements directly into notebooks, and submitting testing and evaluation results to Mission Control for trust analysis.More information about Mission Control can be found atwww.takecontrol.ai. Interested teams can request Sandbox access to the Enterprise Server Edition.InstallationYou can installgovernanceusing pip:pip install governanceUsageSubmitting testing and evaluation results to Mission Control# test.pyimportgovernancegovernance.set_api_key("<YOUR MISSION CONTROL API KEY>")governance.set_server_url("<THE BASE URL FOR YOUR MISSION CONTROL DEPLOYMENT>")governance.set_agent_id("<YOUR MISSION CONTROL AGENT ID>")governance.set_project_id("<YOUR MISSION CONTROL PROJECT ID>")governance.set_stage_id("<YOUR MISSION CONTROL STAGE ID>")governance.set_agent_token("<YOUR MISSION CONTROL TOKEN>")# Submit the results of a calculation to be stored as a result associated with this stage of the data science lifecyclegovernance.submit({"key1":"value1","key2":"value2"})Licensegovernance is released under the MIT license. See LICENSE for more details.
Package: govsic
A lightweight library to parse and interface Standard Industrial Classification instances using the current UK SIC 2007 methodology.govsicsupports the UK SIC 2007 framework by unifying the classification of business establishments and other statistical units by their type of economic activity/engagement into a common structure.DataData used has been transformed using theOffice for National Statistics' published opensource SIC structure and volume datasets.InstallationThegovsicpackage is available on PyPI.pipinstallgovsicUsagegovsicprovides theSICclass to represent Standard Industrial Classifications. Get started by initialising a newSICobject to interface, compare, and evaluate UK SIC 2007 codes.See example usage in theexamples/repo directoryfromgovsicimportSICsic=SIC(8110)print(f"{sic= }")# sic = [B] 08.11/0forlabel,propin(("Code value",sic.code),("Is valid?",sic.is_valid),("Section",sic.section),("Component",sic.component),):print(f"{label}:\t{prop}")# Code value:     08110# Is valid?:      True# Section:        B# Component:      CLASS
Package: govtrack
# govtrack-pythonA Python library for the GovTrack.us API v2.Based on https://github.com/markgx/govtrack-node/For full API docs visit [https://www.govtrack.us/developers/api](https://www.govtrack.us/developers/api)## Installation```pip install govtrack```## Usage### Instantiate the GovTrackClient like so:```from govtrack.api import GovTrackClientclient = GovTrackClient()```### Calling the API:##### 1. Choose an endpoint```client.bill()client.cosponsorship()client.person()client.role()client.vote()client.vote_voter()```##### 2a. Filter the results```client.person({'lastname': 'Kennedy'})```##### 2b. Filter with a 'id' to get a single result (or get none if the 'id' doesn't exist)```client.person({'id': 123})```##### 2c. Provide an integer to get the same affect as 2b```client.person(123)```##### 3. Receive a responseSingle response if you used an 'id':```{'id': 65,'bill_type': 'resolution','congress': 113}```Multiple response if you used filters:```{'meta': {'some_meta_key_1': 123,'some_meta_key_2': 'abc'},'objects': [{'id': 65,'bill_type: 'resolution','congress': 113},{'id': 66,'bill_type': 'resolution','congress': 114}]}```
Package: govuk-country-register
govuk-country-registerJijna2 filter that uses GOV.UK Registers to look up country codes.The register data is included in the package so no external requests are required.
This package will be updated when new register data is released.Usageimport jinja2

from govuk_country_register import to_country

to_country("UK")  # "United Kingdom"

jinja_env = jinja2.Environment()
jinja_env.filters["to_country"] = to_countryVersion History2019-08-16 version 0.5.0Update country data2019-06-06 version 0.4.0Refactor code to load CSVs from a Python package2019-06-06 version 0.3.1Fix bug where unicode characters would cause issues on systems with the default locale2019-03-14 version 0.3.0Update country data2019-02-12 version 0.2.2Fix PyPI readme2019-02-12 version 0.2.1Initial release
Package: govuk-frontend-django
GOV.UK Frontend DjangoDocumentation Site|GitHub|PyPIThegovuk_frontend_djangopackage contains Django functionality to help when building a GOV.UK website.The main part of this package is thetemplate tagsthat it offers for use in your templates. These template tags will reduce the amount of markup that you need to maintain in your project.This package also contains some helpfultemplatesfor your project, such as thegovuk_frontend_django/base.htmltemplate which contains the basic structure of a GOV.UK website.Getting startedFirst install the package:pipinstallgovuk-frontend-djangoIn your settings file, add the app to yourINSTALLED_APPS:INSTALLED_APPS=[..."govuk_frontend_django",]Start using the template tags in your templates!{%loadgovuk_frontend_django%}{%gds_component"back-link"href="/"%}More template tagsCompatibility tableBelow is a list of the versions of this package and the versions of the GOV.UK Frontend that they are compatible with.Package VersionGOV.UK Frontend Version0.2.0-0.2.3v4.5.00.3.0-0.3.9v4.6.00.4.0-0.4.0v4.7.0
Package: govyn
govynA tiny framework for writing async HTTP APIs in typed Python.govyn(verb) - ask, inquire, query, question, request (Cornish Dictionary)FeaturesAsync everywhere!Method params as query string argumentsDataclasses as request bodiesAuthentication with principals and privilegesOpenAPI support with built-in routes:/openapi/schema: OpenAPI v3 schema as JSON/openapi/swagger: embeddedSwagger UIpage for testing/openapi/redoc: embeddedRedocdocumentation pagePrometheus metrics supportExamplefromdataclassesimportdataclassfromtypingimportListfromgovynimportrun@dataclassclassAddRequest:numbers:List[int]@dataclassclassResponse:result:intclassCalculatorAPI:# run initialisation tasks, e.g. connecting to a databaseasyncdefstartup(self)->None:pass# be a good citizen and dispose of things appropriatelyasyncdefshutdown(self)->None:pass# get_ methods take a query string# callers will receive a 400 Bad Request if they supply invalid valuesasyncdefget_add(self,a:int,b:int)->Response:returnResponse(a+b)# post_ methods take a JSON request body# also type-checked according to the dataclass definitionasyncdefpost_add(self,req:AddRequest)->Response:returnResponse(sum(req.numbers))run(CalculatorAPI())Try out the built-in Swagger UI on thisexample Heroku deployment, built from source available in thegovyn-demorepository!Or, run the server locally and hit it with curl:>curl"http://localhost/add?a=10&b=32"{"result":42}>curl"http://localhost/add"-d'{ "numbers": [ 1000, 300, 30, 7 ] }'{"result":1337}Installation# from PyPIpipinstallgovyn# or directly from Gitpipinstallgit+ssh://git@github.com/returnString/govyn.git
Package: gowbso
# GOWBSOMake CSV files for uploading to the WBSO tool.## InstallationAssuming you have pip installed, you can run`bash pip install gowbso--user`Omit–userif you are running in a Python virtual environment, but otherwise keep it: don’t use sudo, it’s a dangerous route because it modifies the Python environment that your operating system may rely on.## UsageSee the examples directory.
Package: gower
IntroductionGower's distance calculation in Python. Gower Distance is a distance measure that can be used to calculate distance between two entity whose attribute has a mixed of categorical and numerical values.Gower (1971) A general coefficient of similarity and some of its properties. Biometrics 27 857–874.More details and examples can be found on my personal website here:(https://www.thinkdatascience.com/post/2019-12-16-introducing-python-package-gower/)Core functions are wrote byMarcelo Beckmann.ExamplesInstallationpip install gowerGenerate some dataimportnumpyasnpimportpandasaspdimportgowerXd=pd.DataFrame({'age':[21,21,19,30,21,21,19,30,None],'gender':['M','M','N','M','F','F','F','F',None],'civil_status':['MARRIED','SINGLE','SINGLE','SINGLE','MARRIED','SINGLE','WIDOW','DIVORCED',None],'salary':[3000.0,1200.0,32000.0,1800.0,2900.0,1100.0,10000.0,1500.0,None],'has_children':[1,0,1,1,1,0,0,1,None],'available_credit':[2200,100,22000,1100,2000,100,6000,2200,None]})Yd=Xd.iloc[1:3,:]X=np.asarray(Xd)Y=np.asarray(Yd)Find the distance matrixgower.gower_matrix(X)array([[0.        , 0.3590238 , 0.6707398 , 0.31787416, 0.16872811,
        0.52622986, 0.59697855, 0.47778758,        nan],
       [0.3590238 , 0.        , 0.6964303 , 0.3138769 , 0.523629  ,
        0.16720603, 0.45600235, 0.6539635 ,        nan],
       [0.6707398 , 0.6964303 , 0.        , 0.6552807 , 0.6728013 ,
        0.6969697 , 0.740428  , 0.8151941 ,        nan],
       [0.31787416, 0.3138769 , 0.6552807 , 0.        , 0.4824794 ,
        0.48108295, 0.74818605, 0.34332284,        nan],
       [0.16872811, 0.523629  , 0.6728013 , 0.4824794 , 0.        ,
        0.35750175, 0.43237334, 0.3121036 ,        nan],
       [0.52622986, 0.16720603, 0.6969697 , 0.48108295, 0.35750175,
        0.        , 0.2898751 , 0.4878362 ,        nan],
       [0.59697855, 0.45600235, 0.740428  , 0.74818605, 0.43237334,
        0.2898751 , 0.        , 0.57476616,        nan],
       [0.47778758, 0.6539635 , 0.8151941 , 0.34332284, 0.3121036 ,
        0.4878362 , 0.57476616, 0.        ,        nan],
       [       nan,        nan,        nan,        nan,        nan,
               nan,        nan,        nan,        nan]], dtype=float32)Find Top n resultsgower.gower_topn(Xd.iloc[0:2,:],Xd.iloc[:,],n=5){'index': array([4, 3, 1, 7, 5]),
 'values': array([0.16872811, 0.31787416, 0.3590238 , 0.47778758, 0.52622986],
       dtype=float32)}
Package: goxlr
GoXLR Utility API Python WrapperA python wrapper for the API of the open-source GoXLR software alternative, GoXLR Utility, that uses asyncio. Disclaimer: This project is not affiliated with the GoXLR brand or TC-Helicon in any way, shape, or form. This is a third-party package made for fun and educational purposes.FeaturesAsynchronous connection to the GoXLR utility daemonAll methods have been translated to PythonHandy enumerators for everythingVery simple and easy to get startedInstallationpipinstallgoxlrGetting StartedHere's some sample code to get started with this package that pings the utility's daemon.importasynciofromgoxlrimportGoXLRfromgoxlr.typesimportFader,Channelasyncdefmain():asyncwithGoXLR()asxlr:awaitxlr.set_fader(Fader.A,Channel.Headphones)awaitxlr.set_volume(Channel.Headphones,127)if__name__=="__main__":asyncio.run(main())You may have noticed that we usewithto manage the connection to the GoXLR. You may also wish to use the more traditional open and close methods which is acceptable too.asyncdefmain():xlr=GoXLR()awaitxlr.open()ping=awaitxlr.ping()print(ping)# Okawaitxlr.close()ContributingComing soon. As there isn't a CONTRIBUTING.md yet, please try to emulate the style of the rest of the code. Using snake_case and descriptive method argument names with type hints wherever possible.DocumentationPlease visit thedocumentationfor more information on how to use this package.