Saravanan666/pypi-org huggingface dataset:
Package: python-yakh
yakhyakh (Yet Another Keypress Handler) tries to handle keypresses from the stdin in the terminal in high-level platform indepdendent manner.InstallationYakh can be installed fromPyPIusing,pipinstallpython-yakhor GitHub itself using poetry,poetryaddgit+https://github.com/petereon/yakh.gitUsagefromyakhimportget_keyfromyakh.keyimportKeyskey=''whilekeynotin['q',Keys.ENTER]:key=get_key()ifkey.is_printable:print(key)yakh is dead-simple, there is only one functionget_key()which takes no arguments and blocks until a key is pressed.For each keypress it creates an instance ofKeywhich holds:.key: characters representing the keypress.key_codes: collection of Unicode code point encodings for all the characters (given byordfunction).is_printable: printability of the characters in the keypressAdditionallyKeyinstancesare comparable with anotherKeyinstances,strinstances andUnicode code pointrepresentations (tuples of integers)come with string representation for purposes of printing and string concatenation, which returns the content of.keyattributeyakh.keysubmoduleyakh.keysub-module contains platform dependent representations of certain keys underKeysclass. These are available namely forCTRLkey combinations and some other common keys.Full list of keys can be seenhereandhere.
Package: python-yaml-logger
Overviewpython-yaml-loggeris a formatter for the standard Python logging module designed to allow formatting log data asYAML. Using YAML allow for both human- and machine-readable log files, and allows developers to quickly parse and make better use of log data.InstallationManual installation:$ wget http://github.com/OldhamMade/python-yaml-logger/archive/master.tar.gz -O- | tar zx
$ cd python-yaml-logger-master
$ python setup.py installUsageimport logging
import yamlformatter

logger = logging.getLogger()
logHandler = logging.FileHandler('my.yamllog')
formatter = yamlformatter.YAMLFormatter()
logHandler.setFormatter(formatter)
logger.addHandler(logHandler)Example output- asctime: 2013-04-10 15:39:26,014
  created: 1365604766.014612
  levelname: INFO
  message: test message
  name: logger_name
Package: python-yandex-cloud-logging
Python Client for Yandex Cloud LoggingInstallationpip3 install python-yandex-cloud-loggingCreating a Yandex Cloud Logging Groupyc logging group create --name=group --retention-period=1hResultdone (1s)
id: af3flf29t8**********
folder_id: aoek6qrs8t**********
cloud_id: aoegtvhtp8**********
created_at: "2021-06-24T09:56:38.970Z"
name: group
status: ACTIVE
retention_period: 3600shttps://cloud.yandex.com/en/docs/logging/quickstartCredentialsThere are several options for authorization your requests - OAuth Token, Metadata Service (if you're executing code inside VMs or Functions running in Yandex.Cloud) and Service Account KeysOAuth Tokenyc config get tokenResultAQA....frompyclm.loggingimportLoggerlog=Logger(log_group_id="....",credentials={"token":"AQA...."})Service Account Keysfrompyclm.loggingimportLoggerlog=Logger(log_group_id="....",credentials={"service_account_key":{"service_account_id":"....","id":"....","private_key":"<PEM>"}})Use Yandex SDKsdk=yandexcloud.SDK(...)log=Logger(sdk=sdk,log_group_id="....",resource_type="....",resource_id="....",elements=100,period=10,workers=1)resource_type- Resource type, serverless.function, hostname.
Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_.]{0,63})?.resource_id- Resource ID, i.e., ID of the function producing logs.
Value must match the regular expression ([a-zA-Z0-9][-a-zA-Z0-9_.]{0,63})?.elements- The number of elements before writing, must be in the range 1-100.period-  Number of seconds to wait for new log entries before writing.workers- Number of process ingestion.
Package: python-yandex-cloud-monitoring
Python Client for Yandex Cloud MonitoringInstallationpip3 install python-yandex-cloud-monitoringGetting started with Yandex MonitoringCredentialsService Account Keys only ...Access managementService Account Keys & RolesFor write metrics, add a folder role:monitoring.editorimportdatetimeimportrandomfrompyclm.monitoringimportMonitoringmetrics=Monitoring(credentials={"service_account_key":{"service_account_id":"....","id":"....","private_key":"<PEM>"},"cloudId":"<CLOUD_ID>","folderId":"<FOLDER_ID>"},group_id="default",resource_type="....",resource_id="....",elements=100,period=10,workers=1)forninrange(1000):#  Numeric value (decimal). It shows the metric value at a certain point in time.#  For example, the amount of used RAMmetrics.dgauge("temperature",random.random(),ts=datetime.datetime.now(datetime.timezone.utc),labels={"building":"office","room":"openspace"})#  Tag. It shows the metric value that increases over time.#  For example, the number of days of service continuous running.metrics.counter("counter",n,labels={"building":"office","room":"openspace"})#  Numeric value (integer). It shows the metric value at a certain point in time.metrics.igauge("number",n,labels={"building":"office","room":"openspace"})#  Derivative value. It shows the change in the metric value over time.#  For example, the number of requests per second.metrics.rate("rate",random.random(),labels={"building":"office","room":"openspace"})credentials.cloudId- The ID of the cloud that the resource belongs to.credentials.folderId- The ID of the folder that the resource belongs to.resource_type- Resource type, serverless.function, hostname.
Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_.]{0,63})?.resource_id- Resource ID, i.e., ID of the function producing metrics.
Value must match the regular expression ([a-zA-Z0-9][-a-zA-Z0-9_.]{0,63})?.elements- The number of elements before writing, must be in the range 1-100.period-  Number of seconds to wait for new log entries before writing.workers- Number of process ingestion.frompyclm.monitoringimportMonitoring,Chronometrics=Monitoring()withChrono(metrics,name="elapsed",labels={"measured":"calculation"},mul=10**9):# ... measured calculation ...name- Name of the metric. The default value iselapsed. Additional metricprocess_{name}sum of the kernel and user-space CPU time.mul- Process time for profiling default as seconds mul = 10^9 .. nanoseconds mul = 1labels- Metric labels askey:valuepairs.
Package: python-yapi
python-yapiPython Client forYApibased on HTTP Api.Installpipinstallpython-yapiSimple UseRegister and Loginfrompython_yapiimportYApiyapi=YApi(base_url='http://localhost:3000')username,email,password='Kevin','kevin@126.com','abc123'yapi.register(username,email,password)# return a dictyapi.login(email,password)# return a dictSimple Useimportjsonfrompython_yapiimportYApiyapi=YApi(base_url='http://localhost:3000')email,password='kevin@126.com','abc123'yapi.login(email,password)# Create a private project in user default group, with auto basepath, random color and random icon.project=yapi.add_project('Demo Project')project_id=project['_id']# Create a private "GET" interface in project default category with a sample json response.yapi.add_interface(project_id=project_id,title='Calc Add',method='GET',path='/add',req_query=[{"name":"a","required":"1","example":"1","desc":"变量a"},{"name":"b","required":"1","example":"2","desc":"变量b"},],res_body_type="json",res_body=json.dumps({"code":0,"message":"success","data":{"result":"3"}}),res_body_is_json_schema=False,status='done')# Create a private "POST" interface in project default category with a sample json data and a sample json response.yapi.add_interface(project_id=project_id,title='Calc Sub',method='POST',path='/sub',req_headers=[{"name":"Content-Type","value":"application/json"}],req_body_type="json",req_body_other=json.dumps({"a":"5","b":"1"}),req_body_is_json_schema=False,res_body_type="json",res_body=json.dumps({"code":0,"message":"success","data":{"result":"4"}}),res_body_is_json_schema=False,status='done')
Package: python-yate
Python support for yate-pbxThis package implements library support for the external module protocol used
by the yate pbx. There is support for the basic wire protocol and higher level
abstractions using asyncio - including special support for IVRs (interactive voice
response) systems.ExamplesHave a look at the examples folder to see how to use the IVR support library.Moreover, there is a call generator example in the tools folder.
Package: python-yeet
what's a yeet?quickstartRun appimportosfromcontrollersimportHomeController,ArticlesControllerfromexamples.constantsimportINIT_QUERIES,DB_SETTINGSfrompython_yeet.appimportYeetfrompython_yeet.dbimportDatabaseapp=Yeet(name=os.path.basename(os.getcwd()))app.add_route(r'^articles/$',ArticlesController(methods=['GET','POST']))app.add_route(r'^.*$',HomeController)db=Database(db_settings=DB_SETTINGS,init_queries=INIT_QUERIES)app.run()Create model exampleimportdatetimefrompython_yeet.ormimportBaseModel,BaseManagerclassArticle(BaseModel):table_name="articles"manager_class=BaseManagerid:inttitle:strtext:strauthor:intcreated_at:datetime.datetimeCreate controller examplefromexamples.models.articleimportArticlefrompython_yeet.controllersimportBaseControllerclassArticlesController(BaseController):defget(self,path):returnself.render_template('articles.html',articles=self._get_articles())@staticmethoddef_get_articles():articles=Article.objects.select("id","title")returnarticles
Package: python-yo
Yo Python=====A Python client for the Yo platform. This is pretty pointless, but I want to try to overengineer it as much as possible, just for fun.Pull Requests are actively encouraged!Installation==`pip install python-yo`Usage==````import yoAPI_TOKEN = '...'yo_client = yo.Yo(API_TOKEN)yo_client.yo()     # Send a Yo to all your subscribersyo_user = 'mcos'yo_client.yo(username=yo_user)     # Send a Yo to a specific user````Roadmap==Since I want to overengineer this in the future, the following needs to be done:* Full test coverage* Travis integration* Updated documentation* A landing page on Github pages* Full git-flow workflow
Package: python-yr
Library for the norwegian weather serviceYR.noinPython.Install (easiest way)pip3installpython-yrUsagefromyr.libyrimportYrweather=Yr(location_name='Norge/Telemark/Skien/Skien')now=weather.now(as_json=True)print(now)This returns{"@from":"2014-06-04T08:00:00","@to":"2014-06-04T12:00:00","@period":"1","symbol":{"@number":"3","@numberEx":"3","@name":"Partly cloudy","@var":"03d"},"precipitation":{"@value":"0","@minvalue":"0","@maxvalue":"0.1"},"windDirection":{"@deg":"159.4","@code":"SSE","@name":"South-southeast"},"windSpeed":{"@mps":"1.3","@name":"Light air"},"temperature":{"@unit":"celsius","@value":"13"},"pressure":{"@unit":"hPa","@value":"1012.1"}}For more usage examples visit folderexamplesor projectwikiPull requestsPlease everyone involved to generate demands and plans (pull requests), so we could set targets for next version 1.5 ;)Branchesdevelop, the main (default) branch for development onGitHubmaster, branch for the stable release published onPyPipython2, branch with support for Python2csv-support, branch with support for CSV export forecasts…Changelog1.4.7 (2020 July 28)Now using version 2.0 of the met.no’s locationforecast1.4.5 (2016 May 19)Parse the ‘nextrun’ field from the cache file as UTC time (API_Locationforecast)1.4.4 (2016 May 06)switched API_Locationforecast tohttps://api.met.no- fixing #341.4.2 (2015 Apr 21)add remove function to Cacheadd explicit installation of language-specific JSON files to setup ~> thanx tokurisukecheck the freshness of cache based on nextupdate tag in meta ~> thanx toknightsamar1.4.1 (2014 Dec 11)add logging supportmod some variablesmod catching exceptionsrewrite LocationXYZ functionality to API_Locationforecastswap longitude and latitudeadd self.coordinatesadd self.location_name ~> not ideal, so it will probably change in futureadd LocationXYZ wrapper over API_Locationforecast for backward compatibilitymod hash names for temporary filesimprove setup.pymod README from Markdown to reStructuredText1.4.0 (2014 Sep 12)add support for yr.no api service ~> thanks tolucadeluadd hourly forecast ~> thanks toantorweep19871.3.2 (2014 Jul 11)improve exception-handling ~> thanks tombambas1.3.1.1 (2014 Jul 10)bugfix: pypi/pip installer in ‘setup.py’1.3.1 (2014 Jul 10)bugfix: caching mechanism in ‘is_fresh’ function ~> thanks toantorweep1987improve examples
Package: python-ytg
Python YourTextGuruConnect toYourText.Guru's API, create guides, check your content optimization.SetupSimply installpython_ytgand its dependencies withpip:pip install python-ytgUsageGet your API key fromhttps://yourtext.guru/profil/api.A simple example:import python_ytg as ytg
from time import sleep

conn = ytg.Api('My API Key')
guide_id = conn.create_guide('My Awesome Keyword')

while(conn.get_guide(guide_id) is None):
    sleep(60)

print(conn.get_guide(guide_id))

print(conn.get_scores(guide_id,'My Awesome Content'))Remember to also checkthe API documentationfor more tips!
Package: python-zanox-api
Python Zanox APIPython zanox.com API - A simple Python wrapper around the zanox.com developer APIPublisher API -https://developer.zanox.com/web/guest/publisher-api-2011FeaturesEasy to use wrapperGenerate tracking url for deeplinksDependenciesrequestsxmltodictInstallation$pipinstallpython-zanox-apiExample>>>fromzanox.apisimportPublisherApi>>>api=PublisherApi(connect_id='XXXXX',secret_key='XXXXX',from_email='yourmail@example.com')>>>example1=api.get('programs')>>>example2=api.get('programs',start_date='2012-01-01')>>>example3=api.get('programs/program/1234')>>>example4=api.get_tracking_url('http://www.example.com/foo/bar.html',adspace=XXXXX)...Parametersconnect_idZanox Connect ID (required)secret_keyZanox Secret Key (required)domaindefault: api.zanox.comformatdefault: jsonversiondefault: 2011-03-01ssldefault: Trueuser_agentdefault: PythonZanoxApi/x.x.xfrom_email(optional)TODOs and BUGSSee:http://github.com/baskoopmans/python-zanox-api/
Package: python-zaqarclient
Python Zaqar ClientWiki:Zaqar WikiLaunchpad:Zaqar LaunchpadReview:Code ReviewDesign:Client WikiIRC:#openstack-zaqar @ freenodeWelcome to theZaqarPython Client project!InstallationThe latest stable release can be installed from PyPI:pip install --upgrade python-zaqarclientFor the adventurous, you may also install the latest code directly from git
.openstack.org:pip install git+https://git.openstack.org/openstack/python-zaqarclient.gitWhat’s in the boxBy installing python-zaqarclient you get programmatic access to the Zaqar v1.0
API library. Plus, it installs a plugin to python-openstackclient that allows
you to perform simple queue operations.How to usePython clientDetails about design, features, usage and workflow can be found in thePython Client Wiki.Command line interfaceZaqar bases its client implementation in theOpenStack Client. It can be
installed and configured by following the instructions inGetting StartedandConfigurationin theOpenStack Client Readmerespectively.The CLI currently allows creation, removal and listing of queues. Some examples
are:$  openstack queue list --limit 3
$  openstack queue create myqueue
$  openstack queue delete myqueueContributingBe sure to reference theHACKINGfile for details on coding style. You may
also wish to read through Zaqar’sContributor Guidebefore contributing your
first patch.License: Apache License, Version 2.0PyPi- package installationBugs- issue trackingSource
Package: python-zbase32
zbase32A human-oriented base-32 encoding.🛠 Installingpoetrypoetry add python-zbase32pippip install python-zbase32🎓 Usage>>>importzbase32>>>zbase32.encode(b"asdasd")'cf3seamuco'>>>zbase32.decode("cf3seamu")b"asdas"🔧  DevelopmentCommandDescriptionmake bootstrapinstall project dependenciesmake cirun continuous integration tasksmake consoleopen a repl consolemake formatformat all source filesmake setupsetup the project after agit clonemake testrun the applications test suitemake updateupdate the project after agit pull⚖️ LicenceThis project is licensed under theMIT licence.All documentation and images are licenced under theCreative Commons Attribution-ShareAlike 4.0 International License.📝 MetaThis project usesSemantic Versioning.
Package: python-zeep
A fast and modern Python SOAP clientHighlights:Compatible with Python 2.7, 3.3, 3.4, 3.5, 3.6 and PyPyBuild on top of lxml and requestsSupport for Soap 1.1, Soap 1.2 and HTTP bindingsSupport for WS-Addressing headersSupport for WSSE (UserNameToken / x.509 signing)Support for tornado async transport via gen.coroutine (Python 2.7+)Support for asyncio via aiohttp (Python 3.5+)Experimental support for XOP messagesPlease see for more information the documentation athttp://docs.python-zeep.org/InstallationpipinstallzeepUsagefromzeepimportClientclient=Client('tests/wsdl_files/example.rst')client.service.ping()To quickly inspect a WSDL file use:python -m zeep <url-to-wsdl>Please see the documentation athttp://docs.python-zeep.orgfor more
information.SupportIf you want to report a bug then please first readhttp://docs.python-zeep.org/en/master/reporting_bugs.htmlI’m also able to offer commercial support.  As in contracting work. Please
contact me atinfo@mvantellingen.nlfor more information.  Note that asking
questions or reporting bugs via this e-mail address will be ignored. Pleae use
the appropriate channels for that (e.g. stackoverflow)
Package: python-zenity
python-zenitypython-zenity is a library for python wich inspired by Zenity. When you write scripts,
you can use python-zenity to create simple dialogs that interact graphically with the user.RequirementsPython 2.x (x>6)PyGTKInstallationInstall using pip :$pipinstallpython-zenityOr clone the repo :$gitclonehttps://github.com/poulp/python-zenity.git$cd./python-zenity$pythonsetup.pyinstallExampleSimple dialog :frompythonzenityimportCalendarresult=Calendar(title="Awesome Calendar",text_info="Your birthday ?")printresultThis code show a calendar dialog :And display the result :$pythontest.py$(2013,7,8)UsageAll the widgets have some common parameters :ParamDescriptionTypetitletitle of the windowstringwidthwindow widthintheightwindow heightinttimeoutin millisecondintExample :Message(title="Close in 5 seconds !",width=800,height=600,timeout=5000)WidgetsMessageDisplay a simple messageParamDescriptionTypetexttext inside the windowstringExample :Message(text="Message in the bottle")ErrorDisplay a simple message as an errorParamDescriptionTypetexttext inside the windowstringExample :Error(text="Something wrong!")WarningDisplay a simple message as an warningParamDescriptionTypetexttext inside the windowstringExample :Warning(text="This operation will delete your computer from the universe")QuestionDisplay a question, possible answer are yes/no. Return the answer as a booleanParamDescriptionTypetexttext inside the windowstringExample :Question(text="Are you in love with me ?")EntryDisplay a text input, return value as a stringParamDescriptionTypetexttext inside the windowstringentry_textplaceholder for the inputstringExample :Entry(text="1 + 1 ?",entry_text="2")PasswordDisplay a text input with hidden characters, return value as a string.ParamDescriptionTypetexttext inside the windowstringentry_textplaceholder for the inputstringExample :Password(text="Need to be authenticated : ")CalendarParamDescriptionTypetext_infotext inside the windowstringdaydefault dayintmonthdefault monthintFile selectionOpen a file selection window, return path of files selected.ParamDescriptionTypemultiplemultilple file selection, return a list of filesbooleandirectoryonly directory selectionbooleansavesave modebooleanconfirm_overwriteconfirm when a file is overwrittenbooleanfilenameplaceholder for the filenamestringExample :FileSelection(multiple=True)ScaleParamDescriptionTypetext_infotext inside the windowstringvaluecurrent valueintminminimum valueintmaxmaximum valueintstepincrementation valueintdraw_valuehide/show cursor valuebooleanExample :Scale(value=50,min=10,max=110,step=10)Color selectionParamDescriptionTypeshow_palettehide/show the palettebooleanExample :ColorSelection(show_palette=True)
Package: python-zenoss-client
python-zenoss-clientZenoss API client for pythonInstallationpipinstallpython-zenoss-clientUsageConnectfromzenoss_clientimportZenossClientapi=ZenossClient(host="localhost",user="zenuser",passwd="*****")API call: The long wayendpoint=api.endpoint('device_router')action=endpoint.action('DeviceRouter')method=action.method('getDevices')method(params={'name':'testdevice'})API call: The sorter wayapi.endpoint('device_router').action('DeviceRouter').method('getDevices')(params={'name':'testdevice'})API call: The sortest wayapi.device_router.DeviceRouter.getDevices(params={'name':'testdevice'})With timeoutapi.device_router.DeviceRouter.getDevices(params={'name':'testdevice'},timeout=10)DocumentationThis module is inspired byjson_api.shSHELL script published onzenoss official wikiFor full documentation of zenoss API, kindly refer to the link below:zenoss official documentationConventional naming of routersProducts.Zuul.routers.device -> device_router
Products.Zuul.routers.users -> users_router
Products.Zuul.routers.triggers -> triggers_router
Package: python-zephyr
ME's Python Zephyr LibraryThis module is meant to be used as a simple library for using Zephyr Scale API functions.What is this repository for?Generic abstractions of common API calls, e.g.Get a list of all projectsGet project, folder or user IDsCreate tests or test executions...How do I get set up?Install specified requirements:pip install -r requirements.txtInstall pre-commit hooks:pre-commit installGet familiar with the API:https://support.smartbear.com/zephyr-scale-cloud/api-docs/Contribution guidelinesFix rather than suppress any pre-commit warningsTry to stick to existing coding patterns and use/extend given structures
Package: python-zhmh
python-zhmh进度条importtimefrompyzhmhimportRichPrintlength=100foriinrange(1,1+length):RichPrint.progress_bar(i/length)time.sleep(0.05)下载frompyzhmhimportdownload_one_filedownload_one_file('./521.jpg',{'url':"https://dss1.bdstatic.com/kvoZeXSm1A5BphGlnYG/skin_zoom/521.jpg?2"})
Package: python-zilore
python-ziloreZilore DNSAPI Python Wrapper. It was implemented by followingZilore DNS APIdocument.InstallaionThe easiest way to installpython-ziloreand get updates is by usingpip$pipinstallpython-ziloreTest installationYou can test your install by using following steps:Log into Zilore DNS management console via BrowserGet your own API key inSettingpageTest if your API key is working with the following Python codeimportziloreapizdns=ziloreapi.Api('YOUR_API_KEY')result=zdns.test_login()print(result)Once you seeTrueon console, you're all set and ready to rock 'n' roll.UsageIt's simple to use the library to interact witgh Zilore DNS.Creating adoamincalledexample.comimportziloreapizdns=ziloreapi.Api('YOUR_API_KEY')result=zdns.add_domain('example.com')print(result)Creating an A record calledtest.example.comwithTTL = 600 secondsand point it to10.0.0.1importziloreapizdns=ziloreapi.Api('YOUR_API_KEY')result=zdns.add_record('example.com','A',600,'test','10.0.0.1')print(result)Creating a CNAME record calledcname.example.comwithTTL = 300 secondsand point it towww.google.comimportziloreapizdns=ziloreapi.Api('YOUR_API_KEY')result=zdns.add_record('example.com','CNAME',300,'cname','www.google.com')print(result)Changing A recordtest.example.comvalue. Set TTL to 3600 and re-pointing to192.168.1.1importziloreapizdns=ziloreapi.Api('YOUR_API_KEY')result=zdns.update_record('csie.io',RECORD_ID,'A',3600,'test','192.168.1.1')print(result)Current supported APIAll API areFULL SUPPORTEDby python-ziloreDOMAINSlist_domainslist_tldslist_nameserverslist_statisticsadd_domaindelete_domainRECORDSlist_recordslist_valid_record_ttladd_recordupdate_recordupdate_record_statusdelete_recordSNAPSHOTSlist_snapshotslist_snapshots_recordsrestore_snapshotGEO RECORDSgeo_recordslist_geo_recordsadd_geo_recordupdate_geo_recordFAILOVER RECORDSfailover_recordslist_failover_recordsadd_failover_recordupdate_failover_recorddelete_failover_recordWEB AND MAIL FORWARDINGlist_mf_addressesadd_mf_addressupdate_mf_addressupdate_mf_address_statusdelete_mf_addresslist_wf_addressesadd_wf_addressupdate_wf_addressupdate_wf_address_statusdelete_wf_addressCUSTOM TEMLATESlist_custom_templatescreate_custom_templateupdate_custom_templatedelete_custom_templaterestore_custom_templatelist_custom_templates_recordsadd_custom_template_recordupdate_custom_template_recorddelete_custom_template_recordLicenseMIT License