Saravanan666/pypi-org huggingface dataset:
Package: k50-tracker-api
K50 tracker ai wrapperInstallationInstall usingpip...pip install k50-tracker-apiUsagefromk50_trackerimportK50Clientk50=K50Client('<your access_token>')# get projects# doc - https://help.k50.ru/tracker-api/api-requests/get-counters-list/k50.get_projects()# return dict# get pool list# doc - https://help.k50.ru/tracker-api/api-requests/get-pool/k50.get_pool_list(counter_id=123)# optional page: int - default 1, items_per_page: int - default 1000# get call stats# doc - https://help.k50.ru/tracker-api/api-requests/get-calls-stat-v2/k50.get_call_stats(counter=123,dimensions=['dimension1','dimension2'],csv=False)# csv True/False by return csv or json# get order stats# doc - https://help.k50.ru/tracker-api/api-requests/get-orders-stat-v2/k50.get_order_stats(counter=123,dimensions=['dimension1','dimension2'],csv=False)# csv True/False by return csv or json# get tags# doc - https://help.k50.ru/tracker-api/api-requests/get-tags/k50.get_tags(counter=123)# get leads# doc - https://help.k50.ru/tracker-api/api-requests/get-leads/k50.get_leads(counter=123,dimensions=['dimension1','dimension2'],csv=False,is_show_inter_action_chain=False)# get reports# doc - https://help.k50.ru/tracker-api/api-requests/get-reports/fromdatetimeimportdatetime,timedeltadate_from=datetime.now()-timedelta(days=1)k50.get_reports(counter=123,dimensions=['dimension1','dimension2'],metrics=['metric1'],date_from=date_from,date_to=date_to,limit=1000,offset=0,csv=False)# add call# doc - https://help.k50.ru/tracker-api/api-requests/add-calls/k50.add_call(counter=123,call_id=123,start_time=datetime.now(),caller_phone='79379992',called_phone='9389992')# update_call# doc - https://help.k50.ru/tracker-api/api-requests/update-calls/k50.update_call(counter=123,call_id=123,start_time=datetime.now(),caller_phone='79379992',called_phone='9389992')# add order# doc - https://help.k50.ru/tracker-api/api-requests/add-orders-stat-v2/k50.add_order(counter=123,order_id=123,date_time=datetime.now())# update order# doc - https://help.k50.ru/tracker-api/api-requests/update-orders-stat-v2/k50.update_order(counter=123,order_id=123,date_time=(datetime.now()-timedelta(days=1)))# add tags to call# dod - https://help.k50.ru/tracker-api/api-requests/add-call-tags/k50.add_tags_to_calls(counter=123,call_id=123,tags=['list of tags'])# add tags to call# dod - https://help.k50.ru/tracker-api/api-requests/add-call-tags/k50.remove_tags_from_call(counter=123,call_id=123,tags=['list of tags'])LICENSEMIT
Package: k5dstatus
The ultimate DIY statusline generator fori3wm.Aboutk5dstatus is in the early phases of development and will need some
adjustments to get right. If you use k5dstatus, send me feedback!k5dstatus is a statusline generator for i3 that you can use to display
system information you may be interested in. i3 comes withi3statuswhich has many limitations. It has no plugin interface. It has no
support for events and relies on polling for all its information, which
makes it surprisingly heavy on resources. It has a weird config file
format that makes it difficult to configure.Other projects have come along to make up for these weaknesses and many
of them do a great job. k5dstatus is for users who want a more flexible
statusline that can be achieved from editing options in a configuration
file but without having to learn a complicated plugin api to create
custom statusline entries.This is accomplished by allowing users to update the statusline through
interprocess communication usingDBUS. k5dstatus
exposes a DBUS service that you can use to update the statusline simply
in pretty much any programming language and from any process (maybe even
in a cron!).No configuration file is requiredUpdate the statusline from multiple processesUpdate the statusline from any language (even from the command line!)No complicated plugin api to learnRelation to i3-dstatusThis project is a source fork and rewrite of i3-dstatus. It does not attempt to
maintain compatibility or upstream pairing.Installingk5dstatus is onPyPI.pip install k5dstatusYou’ll also needpython-gobjectandpython-dbusfrom your package
manager.UsageUse k5dstatus as your status command in your bar block like so:bar {
    status_command k5dstatus clock
}ConfigurationGenerator scripts will look for~/.k5dstatus.conffor configuration
options. Seek5dstatus.confin the repo for an example. The
configuration file should be a single YAML object. (More documentation
to come).ContributingPlease report bugs, request feature, write documentation, and add
generators to thek5dstatus/generatorsdirectory. k5dstatus is a community
project so feedback is welcome!LicenseThis work is available under a FreeBSD License (see LICENSE).Copyright © 2015, James BlissAll rights reserved.
Package: k5test
k5testis a library for setting up self-contained Kerberos 5 environments,
and running Python unit tests inside those environments.  It is based on
the file of the same name found alongside the MIT Kerberos 5 unit tests.Using k5test to set up a Kerberos 5 deploymentk5testcan be used to set up a self-contained MIT krb5 or Heimdal
environment.  This is useful for testing applications without having to
manipulate existing Kerberos realms, or having to set up a full Kerberos
deployment by hand.To set up a realm, use thek5test.K5Realmclass.  The constructor accepts
several useful arguments for controlling which parts get set up; refer to the
inline documentation for more information.Using k5test to run unit testsInstead of having test cases inherit fromunittest.TestCase, inherit fromk5test.KerberosTestCase, which will automatically set up a Kerberos 5
environment, before the test case, and tear it down afterwards.Additionally, several decorators are defined.  thek5test.gssapi_extension_test(extension_name, human_readable_name)decorator
(which requirespython-gssapi) allows you to skip tests with installations
that don’t support a particular GSSAPI extension.  The thek5test.krb_minversion_test(target_version, problem_name)decorator allows
you to skip tests when running a version of krb5 less that the required
version.  Thek5test.krb_plugin_test(plugin_type, plugin_name)decorator
allows you to skip tests for installations that don’t have a particular plugin
installed.
Package: k7
k7CCBY: Cassette by Alvaro Cabrera from the Noun ProjectUsageCheck file formatpython -m k7.k7 --check myfile.k7k7 format{"location": "grenoble", "tx_length": 100, "start_date": "2018-01-11 16:32:22", "stop_date": "2018-01-13 16:21:30", "node_count": 44, "channels": [11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26], "interframe_duration": 100}
datetime,src,dst,channel,mean_rssi,pdr,tx_count
2018-01-11 16:33:07,18,19,11,-53.2,1.0
2018-01-11 16:33:07,17,14,11,-84.03,0.97
2018-01-11 16:33:07,23,27,11,-83.88,1.0
2018-01-11 16:33:30,16,14,11,-67.03,1.0
2018-01-11 16:33:30,22,49,11,-70.0,1.0
...HeaderEach k7 starts with a one-line header. The header is the json dump of a dict. The header contains the dataset meta data.
Ex:{"location": "grenoble", "tx_length": 100, "start_date": "2017-06-20 16:22:15", "stop_date": "2017-06-21 10:29:29", "node_count": 50, "channels": [11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26], "interframe_duration": 10}Datadatetimesrcdstchannelmean_rssipdrtx_countiso8601 stringintintintfloatfloat (0-1)intStandard example:datetimesrcdstchannelmean_rssipdrtx_count2017-12-19 21:35:410111-74.51.0100The source or destination can be empty (i.e when measured on all the neighbors of the src):datetimesrcdstchannelmean_rssipdrtx_count2017-12-19 21:35:4111-74.50.7100Unknown channel:datetimesrcdstchannelmean_rssipdrtx_count2017-12-19 21:35:4112-79.51.0100When the channel value is empty, it means that the channel is unknown for that measurement.
Package: k8062
k8062k8062 is a package for interacting with the Velleman K8062 DMX controller.InstallationThis package is bundled with native drivers. It is only supported on Windows (32/64 bit x86).pipinstallk8062Usageimportk8062k8062.start_device()# Start the k8062's driverk8062.set_channel_count(100)# Set the maximum channel numberk8062.set_data(7,255)# Set channel 7 to 255k8062.stop_device()# Stop the driverWith the context manager:importk8062withk8062.K8062(100)asdmx:dmx.set_data(7,255)Command Line Usagepython-mk80627255The context manager takes care of starting and stopping the driver.LicenseMIT
Package: k8090
K8090A module for interacting with the K8090 and VM8090 relay boards.InstallationTo install the module, run the following command:pipinstallk8090Example# Import relay_card from k8090importtimefromk8090importrelay_card# Connecting to cardcard=relay_card.connect('/dev/tty.usbmodem11301')# Doing factory resetcard.factory_reset()# Reading information about cardprint(f'Firmware version:{card.firmware_version}')print(f'Jumper status:{card.jumper_status}\n')# Copying relay 4 into a variablerelay_4=card.relays[3]# Toggle relay 4relay_4.on()card.relays[3].off()relay_4.toggle()card.relays[3].toggle()# Turn on relay 4 and then turn off after 10 secondsrelay_4.delay=10relay_4.timer()# Getting status of all relaysforrelayincard.relays:print(f'Relay number:{relay.id+1}')print(f'Relay status:{relay.status}')print(f'Relay delay:{relay.delay}')print(f'Timer is active:{relay.timer_is_active}\n')print(f'Relay 4 delay:{relay_4.delay}')# Copying button 4 into a variablebutton_4=card.buttons[3]# Changing mode of button 4 to momentarybutton_4.mode=card.Button.MOMENTARY# Getting status of button 1 every second for 10 secondsbutton_1=card.buttons[0]for_inrange(10):print(f'Button 1 pressed:{button_1.pressed}')print(f'Button 1 mode:{button_1.mode}')print(f'Button 1 last action:{button_1.action}\n')time.sleep(1)# Getting status of all buttonsforbuttonincard.buttons:print(f'Button number:{button.id+1}')print(f'Button 1 pressed:{button.pressed}')print(f'Button 1 mode:{button.mode}')print(f'Button 1 last action:{button.action}\n')
Package: k8env
k8envis a simple way to manage your different Kubernetes contexts.Installation$ pip install k8envIt’s recommended to remove your default Kubernetes context, so you don’t
accidentially invoke it:$ kubectl config unset current-contextYou may also want to export your shell prompt:$ echo ‘export PS1’ >> ~/.bash_profileUsageTo start using a Kubernetes context:$ k8env <context>Now any calls tokubectlwithin your shell will use that context.To list available contexts:$ k8env –listLicenseCopyright (c) 2016 Shotwell Labs, Inc.Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: k8kat
DevelopmentEnvironment SetupDuring development, use symlinks to include this package instead of pipenv:cd /project/using/k8katln -s $k8kat_path/k8katBuildinghttps://packaging.python.org/tutorials/packaging-projects/python3 setup.py sdist bdist_wheelpython3 -m twine upload dist/*ortwine upload dist/*Cluster AuthenticationBy default it works as kubectl - try to find kubeconfig and reads authentication data.Playing Aroundpipenv shellrun examples fromexamples/:python examples/list_pod.pyTest SuiteRun unit-tests (no cluster required):python3 -m unittest discover -v k8kat/testsRun e2e-test (you should be using an empty cluster):python3 -m unittest discover -v k8kat/e2e-testsFormating, typingUse Black to formate codeblack .To run type checkermypy k8kat examples/
Package: k8perf
Benchmark applicationThis is a benchmark application for kubernetes. It is used to test network performance of a kubernetes cluster.Demo of the applicationRun the applicationinstall this python package, a place where you have a kubernetes config file, and run the following command:pip install k8perf
python -m k8perf runYou can get a json output from the command line by adding the--jsonflag.ContributingIf you want to contribute, here is how to get your envirorment setupVirtualenvyou can activate the virtualenv with the following command:sourcebin/activateif you're not using the script, remember to install the module with the following command:pipinstall--editable.ReleasesGithub actions most of the work for you.At every push to main a new version is released to pypi. These are released at "pre-release" status.To make a new release, create a new tag with the following format:X.Y.Z. This will trigger a new release to pypi.You just need to create a new release on github, and the action will take care of the rest.Run iperf 3 benchmark on kubernetes without toolThere are two files in the folderbenchmarks/bandwidth:the serveriperf3-server.yamlthe clientiperf3-client.yamlResultsThe results of our experiments are located in theresultsfolder.Images and visualizations of data and analysis are located in theresults/imagesfolder.TODOadd a way to specify the namespaceRun http benchmark until the server is up to 90% cpu usageloading bar for the benchmarkStream the output of the benchmark (Use streamlit)Move plot to "[plot]" depedencies, and make local imports in main, with error message helping to install plots
Package: k8-perf-888aaen
Benchmark applicationRun the applicationYou can run the application in docker compose or nativeLocal:Virtualenvyou can activate the virtualenv with the following command:sourcebin/activate# in one windowiperf3-s# in another window (make sure to activate the virtualenv)pythonclientlocalhostDocker:docker-composeupRun iperf 3 benchmark on kubernetesThere are two files in the folderbandwidth:the serveriperf3-server.yamlthe clientiperf3-client.yamlRight now i have nodes specified in both deployments. To change the hostname in them:change line 36 inbandwidth/iperf3-server.yamlchange line 16 inbandwidth/iperf3-client.yamlRunning benchmarkFirst open two terminals. In the first deploy the server, and attach is logs.
The server have to de deployed before the client by running the following command:kubectlapply-fbandwidth/iperf3-server.yamlThen attach the logskubectllogs-f-lio.kompose.service=serverIn the second terminal, deploy the client by running the following command:kubectlapply-fbandwidth/iperf3-client.yamlNow you should see something in the first terminal.To rerun the benchmark first delete the job, and then create it again. You do this by running:kubectldelete-fbandwidth/iperf3-client.yaml
kubectlapply-fbandwidth/iperf3-client.yaml
Package: k8s
k8s - Python client library for the Kubernetes APIDocumentationhttps://k8s.readthedocs.ioCodehttps://github.com/fiaas/k8sk8s is a python client library for Kubernetes developed as part of the FiaaS project at FINN.no, Norway’s leading classifieds site. The library tries to provide an intuitive developer experience, rather than modelling the REST API directly. Our approach does not allow us to use Swagger to auto-generate a library that covers the entire API, but the parts we have implemented are (in our opinion) easier to work with than the client you get when using Swagger.Check out thetutorialto find out how to use the library, or thedeveloper guideto learn how to extend the library to cover parts of the API we haven’t gotten around to yet.Changes since last versiond4d1730: Fix sonarlint reports.cbaab8b: Don’t use f-string as printf format argument.8195fd2: Use bookmark events for better watch resumption during idle periods.a98aa84: Reformat my changes with line length 120.1496322: Reduce watch_list complexity and also reduce some line lengths.3cd9d59: Add resourceVersion handling to Watcher.830e758: Treat read timeouts similar to the server hanging up the connection.
Package: k8s-build-maps
Build a directory of Kubernetes ConfigMap/Secret manifests, inserting
data from files.ExampleGiven this directory:example-manifests/configmaps/mymap.yamlmymap.yaml.files/file1file2Wheremymap.yamllooks like:apiVersion: v1
kind: ConfigMap
metadata:
  namespace: mynamespace
  name: something
  labels:
    mylabel: valueRunningk8s-build-mapsexample-manifestsexample-manifests-builtcreates this
directory:example-manifests-built/configmaps/mymap.yamlWheremymap.yamlhas the following content:apiVersion: v1
kind: ConfigMap
metadata:
  namespace: mynamespace
  name: something
  labels:
    mylabel: value
data:
  file2: dGVzdDI=
  file1: dGVzdDE=Installationpip install k8s-build-mapsUsagek8s-build-maps SOURCE [DEST] [--clean] [--no-clean] [-q/--quiet] [--debug]Where:SOURCE: Required. The source manifest directory.DEST: Optional if present in build config (see below). The destination manifest directory.--clean/--no-clean: Pass--cleanto remove existing files inDESTbefore building the manifests. Defaults to--no-clean.-q/--quiet: Hide output.--debug: Enable debug logging.Config fileTheSOURCEdirectory can have an optional.build-maps.yamlconfig
file. This may contain the following values:dest:DESTpath, relative toSOURCE. Can be overridden on
the command line.clean:trueorfalse. Can be overridden on the command
line by--clean/--no-clean
Package: k8scheck
k8scheckThis is a (for the time being) compatible fork ofk8scheckas it now seems to be abandoned, installable using the package name k8scheckk8scheckKubetest is apytestplugin that makes it easier to manage a Kubernetes
cluster within your integration tests. While you can use theKubernetes Python clientdirectly, this plugin provides some cluster and object management on top of that so you can
spend less time setting up and tearing down tests and more time actually writing your tests.
In particular, this plugin is useful for testing your Kubernetes infrastructure (e.g., ensure
it deploys and behaves correctly) and for testing disaster recovery scenarios (e.g. delete a
pod or deployment and inspect the aftermath).Features:Simple API for common cluster interactions.Uses the Kubernetes Python client as the backend, so more complex custom
actions are possible.Load Kubernetes manifest YAMLs into their Kubernetes models.Each test is run in its own namespace and the namespace is created and
deleted automatically.Detailed logging to help debug error cases.Wait functions for object readiness and for object deletion.Get container logs and search for expected logging output.Plugin-managed RBAC permissions at test-case granularity using pytest markers.For more information, see thek8scheck documentation.InstallationThis plugin can be installed withpippip install k8scheckNote that thek8scheckpackage has entrypoint hooks defined in itssetup.pywhich allow it to be automatically made available to pytest. This means that it will run
whenever pytest is run. Sincek8scheckexpects a cluster to be set up and to be given
configuration for that cluster, pytest will fail if those are not present. It is therefore
recommended to only installk8scheckin a virtual environment or other managed environment,
such as a CI pipeline, where you can assure that cluster access and configuration are
available.DocumentationSee thek8scheck documentation pagefor details on command line usage,
available fixtures and markers, and general pytest integration.FeedbackFeedback for k8scheck is greatly appreciated! If you experience any issues, find the
documentation unclear, have feature requests, or just have questions about it, we'd
love to know. Feel free to open an issue for any feedback you may have.Licensek8scheck is released under theGPL-3.0license.
Package: k8s-collector
k8s-collectorcollect k8s objects, parse them with jmespath and send them to sinkHow to runk8s-collectorcollectors package with built-in objects namedCollectors.Collectorencapsulates all the necessary parts of the library for specific collection usage, for exampleK8SCollectorcollects k8s resources.For now thek8s-collectorlibrary used to collect k8s resources, but in theory you can defineListener,Handler,Processor,FiltererandSinkfor everything
and thus creatingCollectorfor everything.K8SCollectorTo useK8SCollectorsimply run its module with-c/--configargument withCollectorConfigfile pathpython-mk8s_collector.collectors.K8SCollector-c/--configconfig.ymlto use namespaced version provide-n/--namespaceargumentpython-mk8s_collector.collectors.K8SCollector-c/--configconfig.yml-nsecond-namespace
Package: k8s-deployment-status
Kubernetes Deployment StatusRetrieves commit details from a GitHub API endpoint, deployment timestamp from Kubernetes API.It encapsulates methods to interact with the APIs, handle retries, and extract relevant data from the API response.Most of the data is memoized as well to avoid unnecessary API calls.Installationpipinstallk8s-deployment-statusPackage dependencies(auto-install):kubernetesrequestsUsageTo use the package follow these steps,Kubernetes Environment VariablesSet necessary environment variables like so in your Kubernetes yaml file.env:-name:GITHUB_OWNERvalue:"organisation/owner-name"-name:GITHUB_REPOvalue:"repo-name"-name:GITHUB_DEPLOYMENT_BRANCHvalue:"main"-name:GITHUB_API_PAGE_SIZEvalue:"5"-name:GITHUB_API_MAXIMUM_RETRIESvalue:"3"All available options are mentioned above. GITHUB_OWNER, GITHUB_REPO are required.Feel free to check config.py for default values per variable.Import and Actual usageImport package and respective class in the respective modulefrom k8s_deployment_status import DeploymentStatus

@app.route('/api/ros/v1/deployment_status', methods=['GET'])
    def deployment_status():
        deployment_status_data = DeploymentStatus().get()
        return jsonify(deployment_status_data)Response DataThe output object should look like so,{
    "branch": "main",
    "commit_merged": "Thu, 15 Jun 2023 14:38:16 UTC",
    "commit_msg": "Add redis as required dependency",
    "commit_sha": "9c2ee47951a8d25c7aa1402998344c5470956eb7",
    "deployed_at": "Thu, 15 Jun 2023 18:59:25 UTC"
}
Package: k8s-diagram
K8s Diagram PreviewerThis project exists to help developers take some of the guesswork
out of deploying Kubernetes definitions by providing a preview of
what will actually be deployed with a set of YAML definitions.InstallationRunpip install k8s-diagramYou may also need to installgraphviz.RunningThis script takes one argument, a path to a folder containing K8s
YAML definitions and outputs a PNG diagram at kubernetes.png
representing those definitions, as well as a python file at
create_diagram.py if you would like to extend the diagram with
other infrastructure surrounding your project. To automatically
open the image upon completion, add the--showflag.k8s-diagram <path_to_folder>To try out the example, runk8s-diagram ./examples/yamlFor Helm Charts, simply run with the --helm flag and your chart will be
templated and placed into/tmp/helm_preview_yaml/chart.yamlbefore the script runs.You can also pass in a context from kubeconfig with the--cluster-contextflag to pull in all supported resources from
the target context prior to diagram generation. The resources found at the context will be copied into the target folder
prior to chart generation.Runk8s-diagram --helpto see other available options.DockerYou can alternatively run this project by running the docker image and mounting the yaml you want to use to /target. The image will be saved into the folder mounted to /target.Ex:docker run -v "$(pwd)/k8s_yaml:/target" jimmymills/k8s-diagram /targetFor Helm:docker run -v "$(pwd):/target" -v "$(pwd)/example_helm:/helm" diagram /helm --helmSupportThis tool currently supports the following Kubernetes resource types:DeploymentServiceIngressPodCronJobJobDaemonSetStatefulSetConfigMapSecretPersistentVolumeClaimThere is partial support for all node types listed athttps://diagrams.mingrammer.com/docs/nodes/k8sbut links will not be formed.