Saravanan666/pypi-org huggingface dataset:
Package: pythonwhat
pythonwhatVerify Python code submissions and auto-generate meaningful feedback messages. Originally developed for Python exercises on DataCamp for so-called Submission Correctness Tests, but can also be used independently.New to teaching on DataCamp? Check outhttps://instructor-support.datacamp.comTo learn what SCTs are and how they work, visitthis articlespecifically.For a complete overview of all functionality inside pythonwhat and articles about what to use when, consulthttps://pythonwhat.readthedocs.io.Installation# latest stable version from PyPipipinstallpythonwhat# latest development version from GitHubpipinstallgit+https://github.com/datacamp/pythonwhatDemoTo experiment locally, you can usesetup_state()and write SCTs interactively.
The code throws an error when the underlying checks fail.# make all checking functions availablefrompythonwhat.test_exerciseimportprep_context_,ctxt=prep_context()globals().update(ctxt)# initialize state with student and solution submissionfrompythonwhat.test_exerciseimportsetup_statesetup_state(stu_code="x = 5",sol_code="x = 4")Ex().check_object('x')# No error: x is defined in both student and solution processEx().check_object('x').has_equal_value()# TestFail: Did you correctly define the variable `x`? Expected `4`, but got `5`.# Debugging stateEx()._state# access state objectdir(Ex()._state)# list all elements available in the state objectEx()._state.student_code# access student_code of state objectTo learn how to include an SCT in a DataCamp course, visithttps://instructor-support.datacamp.com.Run testspyenvlocal3.9.6
pip3.9install-rrequirements.txt
pip3.9install-e.
pytestContributingBugs? Questions? Suggestions?Create an issue, orcontact us!License
Package: python-whatanime
python-whatanimeAn unofficial python wrapper/library to interact with trace.moe.
I have no relationship with the API owner.InstallationInstall withsetup.py:python setup.py buildInstall from pip:Installing pip requires python version >=3.9pip install python-whatanimeExamplefromWhatAnimeimportClientclient=Client(token=" ")me=client.get_me()url_search=client.search_url(url="sample.com/image.jpg",anilist=False)result=client.search_file("image.jpeg")DocumentaionDocumentation for this library can be foundhere.Documentation for the API can be foundhere
Package: python-wheel-to-conda-package
Python Wheel to Conda packageThis converts a Pure-Python Wheel to a noarch Conda package.This tool can be used to replaceconda buildwhich can sometimes be very slow.setup.py bdist_condacan build a Conda package without a recipe but it relies on conda-build behind the scenes and thus suffers from the same slowness.UsageAs a libraryfrompython_wheel_to_conda_packageimportpython_wheel_to_conda_packageconda_package_path=python_wheel_to_conda_package(wheel_path,output_directory=some_directory)As a command line tool$python-wheel-to-conda-packagetest_lib-0.4.2.dev0-42_1337gg-py3-none-any.whl--output-directory/a/b/c//a/b/c/test-lib-0.4.2.dev0-1337gg.tar.bz2
Package: python-whitebit-sdk
A Python SDK forwhitebitPlease readwhitebit API documentbefore continuing.API ListPrivate APIPublic APIPrivate WSPublic WSv4 is the preferred one to useDisclaimer“You acknowledge that the software is provided “as is”. Author makes no representations or warranties with respect to
the software whether express or implied, including but not limited to, implied warranties of merchantability and fitness
for a particular purpose. author makes no representation or warranty that: (i) the use and distribution of the software
will be uninterrupted or error free, and (ii) any use and distribution of the software is free from infringement of any
third party intellectual property rights. It shall be your sole responsibility to make such determination before the use
of software. Author disclaims any liability in case any such use and distribution infringe any third party’s
intellectual property rights. Author hereby disclaims any warranty and liability whatsoever for any development created
by or for you with respect to your customers. You acknowledge that you have relied on no warranties and that no
warranties are made by author or granted by law whenever it is permitted by law.”REST APISetupInit client for API services. Get APIKey/SecretKey from your whitebit account.account=MainAccountClient(api_key="",api_secret=""))Following are some simple examples.See theexamplesfolder for full references.Create Spot Limit Order# Create order/spot clientorder=OrderClient(api_key="",api_secret="")# Call SDK function put_limitprint(order.put_limit("BTC_USDT","sell","0.1","40000",True))Websocket APISetupInit bot class and "on_message" method for work with ws responses. Get APIKey/SecretKey from your whitebit account.classBot(WhitebitWsClient):def__init__(self):super().__init__(key="",secret="")asyncdefon_message(self,event)->None:logging.info(event)Following are some simple examples.See theexamplesfolder for full references.Subscribe on deals topicclassBot(WhitebitWsClient):'''Can be used to create a custom trading strategy/bot'''def__init__(self):super().__init__(key="",secret="")asyncdefon_message(self,event)->None:'''receives the websocket events'''if'result'inevent:result=event['result']matchresult:case'pong':returnlogging.info(event['result'])returnelse:method=event['method']matchmethod:caseWhitebitWsClient.DEALS_UPDATE:logging.info(event['params'])returnasyncdefmain()->None:bot=Bot()awaitbot.get_deals("BTC_USDT",0,100)awaitbot.subscribe_deals(["BTC_USDT"])whilenotbot.exception_occur:awaitasyncio.sleep(100)returnif__name__=='__main__':logging.basicConfig(level=logging.INFO)loop=asyncio.new_event_loop()asyncio.set_event_loop(loop)try:asyncio.run(main())exceptKeyboardInterrupt:passfinally:loop.close()
Package: python-whiteprint
Python Whiteprint, generate easily Python projects with (opinionated) best practices.Documentation:https://python-whiteprint.readthedocs.io/en/latest/Source Code:https://github.com/RomainBrault/python-whiteprintInstallationEnsure that you havegitandpython3installed.Then install the required Python tools:$python3-mpipinstall--user--upgradepipx$pipxinstallpoetry$pipxinstallnox$pipxinjectnoxnox-poetryrichEventually install Python Whiteprint:$pipxinstallpython-whiteprintExampleCreate a local project$whiteprintinit<my_project>Create a GitHub project$whiteprintinit<my_project>--github-token<my_github_token>Note that the GitHub token must have repository, workflows and packages
permissions.Yet another Python Project scaffold/cookiecutter/generator?Yes.This project build upon the excellentscookiecutter-hypermodern-pythonby@cjolowiczas well aspython-blueprintby@johnthagen.You might want to check these projects as they might be more suited to your
needs.The documentation of this project is heavily inspired from @cjolowicz's work.
We also recommend readings @cjolowicz'sguide on modern Python
tooling.Differences compared tocookiecutter-hypermodern-pythonUsecopierinstead of the
cookiecutter project,tweaks in the generated project (non exhaustively: CLI with Typer
instead of Click, dynamic type checking with beartype,auto-API
documentation),manage licenses withReuse,more Github Actions and Community Standards and Community Standards,Ruffinstead of Flake8 to auto-fix a maximum of
code smells,strict linting withpylint,OCI Container images,localization withBabel.
Package: python-whois
GoalCreate a simple importable Python module which will produce parsed
WHOIS data for a given domain.Able to extract data for all the popular TLDs (com, org, net, …)Query a WHOIS server directly instead of going through an
intermediate web service like many others do.Works with Python 2 & 3Example>>>importwhois>>>w=whois.whois('example.com')>>>w.expiration_date# dates converted to datetime objectdatetime.datetime(2022,8,13,4,0)>>>w.text# the content downloaded from whois serveru'\nDomain Name: EXAMPLE.COM
Registry Domain ID: 2336799_DOMAIN_COM-VRSN
...'>>>printw# print values of all found attributes{"creation_date":"1995-08-14 04:00:00","expiration_date":"2022-08-13 04:00:00","updated_date":"2021-08-14 07:01:44","domain_name":"EXAMPLE.COM","name_servers":["A.IANA-SERVERS.NET","B.IANA-SERVERS.NET"],...InstallInstall from pypi:$pipinstallpython-whoisOr checkout latest version from repository:$gitclonegit@github.com:richardpenman/whois.gitNote that then you will need to manually install the futures module, which allows supporting both Python 2 & 3:$pipinstallfuturesRun test cases for python 2 & 3:$python-munittestdiscovertest.............----------------------------------------------------------------------Ran13testsin0.812sOK$python3-munittestdiscovertest.............----------------------------------------------------------------------Ran13testsin1.431sOKSOCKS Proxy support requirements:$pipinstallPySocks............---------------------------------------------------------------------$exportSOCKS=socksproxy.someplace.com:8080Problems?Pull requests are welcome!Thanks to the many who have sent patches for additional TLDs. If you want to add or fix a TLD it’s quite straightforward.
See example domains inwhois/parser.pyBasically each TLD has a similar format to the following:classWhoisOrg(WhoisEntry):"""Whois parser for .org domains
"""regex={'domain_name':'Domain Name: *(.+)','registrar':'Registrar: *(.+)','whois_server':'Whois Server: *(.+)',...}def__init__(self,domain,text):iftext.strip()=='NOT FOUND':raisePywhoisError(text)else:WhoisEntry.__init__(self,domain,text)
Package: python-whois-extended
WHOISPython module/library for retrieving WHOIS information of domains.By DDarkohttp://ddarko.org/FeaturesPython wrapper for Linux “whois” commandsimple interface to access parsed WHOIS data for a given domainable to extract data for all the popular TLDs (com, net, org, uk, pl, ru, рф, lv, jp, co_jp, de, at, eu, biz, info, online, center, support, name, us, co, me, be, nz, cz, it, fr, kg, vc, fm, tv, edu, ca, pw, bid, host, online, party, pro, review, site, space, top, website, win)query a WHOIS server directly instead of going through an intermediate web service like many others doworks with Python 2.4+ and Python 3.xall dates as datetime objectspossibility to cache resultsUsage example>>> import whois
>>> domain = whois.query('google.com')>>> print(domain.__dict__)
{
        'expiration_date': datetime.datetime(2020, 9, 14, 0, 0),
        'last_updated': datetime.datetime(2011, 7, 20, 0, 0),
        'registrar': 'MARKMONITOR INC.',
        'name': 'google.com',
        'creation_date': datetime.datetime(1997, 9, 15, 0, 0)
}>>> print(domain.name)
google.com>>> print(domain.expiration_date)
2020-09-14 00:00:00
Package: python-wialon
WialonWialonis a Python wrapper for Remote Api. (Now with support for Python 3 since v1.0.2)For async implementation please checko-murphy:py-aiowialonInstallationpip install python-wialonUsagefromwialonimportWialon,WialonErrortry:wialon_api=Wialon()# old username and password login is deprecated, use token loginresult=wialon_api.token_login(token='YOUR WIALON USER TOKEN')wialon_api.sid=result['eid']result=wialon_api.avl_evts()wialon_api.core_logout()exceptWialonErrorase:passAPI DocumentationWialon Remote Api documentation
Package: python-wifi
Python WiFi is a Python module that provides read and write access to a
wireless network card’s capabilities using the Linux Wireless Extensions.
It was initially developed by Roman Joost with advice from Guido Goldstein
of Infrae.  It is currently maintained by Sean Robinson.More information is available athttp://pythonwifi.tuxfamily.org.  A
mailing list for announcements and developer discussion is available atpythonwifi@lists.tuxfamily.org.Check the ./docs/feature_matrix_*.txt files for a detailed list of what is
implemented.  This may not work with 64-bit Linux kernels, I would appreciate
reports of success or failure on such systems.Example ApplicationsThe examples directory contains iwconfig.py and iwlist.py, which are sample
re-implementations of iwconfig and iwlist.  These scripts use the pythonwifi
module to duplicate the functionality of those programs as closely as possible.Files and Directories./docs/ - supporting documentation
./docs/api/ - documentation of the pythonwifi API (not yet there)
./docs/logos/ - the Python WiFi logo in various formats
./examples/ - sample uses of pythonwifi module
./pythonwifi/ - the module source code
./INSTALL - installation instructions
./Makefile - convenience commands for developers
./README - this file
./setup.py - installation scriptPython WiFi UsersThe methods in the Wireless class are the highest level interace. An example
program, which prints the ESSID and the association mode:>>> from pythonwifi.iwlibs import Wireless
>>> wifi = Wireless('eth1')
>>> wifi.getEssid()
'romanofski'
>>> wifi.getMode()
'Managed'Licensepythonwifi is licensed under LGPLv2+, however, the examples
(e.g. iwconfig.py and iwlist.py) are licensed under GPLv2+.
Package: python-wikibase
python-wikibasepython-wikibaseprovides an object-oriented abstraction of theWikibase API.The library simplifies the authentication process and can be used to query and edit information on Wikidata or any other Wikibase instance.Examplefrompython_wikibaseimportPyWikibase# Authenticate with Wikibasepy_wb=PyWikibase(config_path="config.json")# Fetch item and "coordinate location" propertyitem=py_wb.Item().get(entity_id="item label")prop=py_wb.Property().get(entity_id="coordinate location")# Create new GeoLocation valuevalue=py_wb.GeoLocation().create(1.23,4.56)# Create GeoLocation claimclaim=item.claims.add(prop,value)Installationpipinstallpython-wikibaseAuthenticationThePyWikibaseclass takes the same authentication and configuration parameters as theWikibaseApiclass from thewikibase-apilibrary. See its documentation for a guide on how to authenticate with Wikibase.Usage→Documentation
Package: python-win-ad
Introductionpyad is a Python library designed to provide a simple, Pythonic interface to Active Directory
through ADSI on the Windows platform. Complete documentation can be found athttp://jcarswell.github.io/pyad/. Code is maintained athttps://github.com/jcarswell/pyad. The
library can be downloaded from PyPI athttps://github.com/jcarswell/pyad.Breaking Changes from upstreamADObject:_get_password_last_set - Act’s like AD and returns 1970-01-01 if the date can’t be parsedget_last_login - Act’s like AD and returns 1970-01-01 if the date can’t be parsedImporting pyad directly exposes set_defaults, ADQuery, ADComputer, ADContainer, ADDomain,
ADGroup, ADUser, from_cn, from_dn, from_guid. Importing pyad.pyad no longer imports
the sub modulesMost ADObject update methods now take flush as an optional argument that defaults to True
to maintain compatibility with upstream code. For large updates it’s recommended to set
this to False until you are ready to write out the change, otherwise you may run into a
back-off period in AD where all further changes will fail.Requirementspyad requires pywin32, available athttps://github.com/mhammond/pywin32.TestingTo run unittest you will need to set the configuration to be specific to your environment.
To do this you will need to edit config.py located in the tests folder.Licensepyad is licensed under the Apache License, Version 2.0 (the “License”). You may obtain a copy
of the License athttp://www.apache.org/licenses/LICENSE-2.0.Unless required by applicable law or agreed to in writing, software distributed 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
and limitations under the License.
Package: python-wireguard
Python Wireguard interfaceLibrary for controlling Wireguard using python.InstallationTo install this package, use pip:pipinstallpython_wireguardSecurity remarkChanging network interface settings, and interacting with Wireguard, is only possible as the root user by default.UsageThis package was designed with a client/server infrastructure in mind. This differs from the 'default' usage of Wireguard, which is peer to peer. Because of this, there is a different set of functions required depending on whether you are writing client-side code or server-side code. We will now discuss an example workflow for setting up a client-server connection to Wireguard.Generate key pairBoth the client and the server need a key pair.frompython_wireguardimportKeyprivate,public=Key.key_pair()public# <python_wireguard.Key object: 5TxYUa403l9A9yEVMyIsSZwae4C7497IT8uaMYEdLHQ=>print(public)# 5TxYUa403l9A9yEVMyIsSZwae4C7497IT8uaMYEdLHQ=Creating a key from a base64 string is also possible, which is useful for creating one for the other device's public key:frompython_wireguardimportKeysrv_public=Key("some string containing a base64 key")ServerThis section explains setting up the connection on the server machine.frompython_wireguardimportServer,ClientConnectionserver=Server("wg-srv",private,"10.0.0.1/24",12345)server.enable()You should now be able to see connection on your machine using the 'normal' wireguard cli:sudowgExample output:interface: wg-srv
  public key: Z9mHJ0apfgTvULpV3t9jpzyjmABSts1weE2jPiee8w8=
  private key: (hidden)
  listening port: 12345Add a clientFor adding a client connection, you first need to create aClientConnectionobject:frompython_wireguardimportClientConnection,Keyclient_key=Key("base64 string received from client (public key)")client_ip="10.0.0.2"# The 'local' ip address that the client will be assigned.conn=ClientConnection(client_key,client_ip)You can now add this client to the server:server.add_client(conn)ClientThis section explains setting up the connection on a client machine. This needs to be a different machine than the server machine.frompython_wireguardimportClient,ServerConnection,Keylocal_ip="10.0.0.2/24"# CIDR block received from server.client=Client('wg-client',private,local_ip)srv_key=Key("base64 string received from the server (public key)")endpoint="public ip address of the server"port=12345# The port on which the server has been set up to listenserver_conn=ServerConnection(srv_key,endpoint,port)client.set_server(server_conn)client.connect()
Package: python-withings
python-withingsWithings API Python Client ImplementationRequirementspython-dateutil:https://pypi.org/project/python-dateutil/1.4/requests-oauthlib:https://pypi.python.org/pypi/requests-oauthlibUsagefromwithingsimportWithingsfromwithingsimportWithingsAUTH# If first time authorizing userwith_auth=WithingsAUTH('developer client id','developer callback url')auth_code=with_auth.authorize("user email address","user password")# Pass in authorization code to use APIwithings=Withings('developer client id','developer client secret','developer callback url',auth_code=auth_code)# Start making callssleep=withings.get_sleep_detail_data(last_update_date=datetime(year=2021,month=5,day=18))
Package: python-wns
# python-wns
Python module for Windows Notification Service (WNS) for Windows tablets/phones(8+)example:-//Send toast notificationfrom python-wns import WNSClienttoken = ‘b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b87’message = {“type”: ‘toast’, “text”: [“Hello World!”]}wns = WNSClient(‘wnsclientid’:  ‘123’,’wnsclientsecret’: ‘xyz’)wns.process(token=token, message=message)
Package: python-wordchain
Word ChainA package to build word chains from a given list of words.Installationpip install python-wordchainSample Usagefromwordchain.wordchainimportWordChainerWORD_LIST=["bird","bind","bord","bond","bend","bing","bong","sing","song"]chainer=WordChainer(word_list=WORD_LIST)chainer.get_chains('bird','song')This yields:[('bird','bord','bond','bong','song'),('bird','bind','bing','sing','song'),('bird','bind','bond','bong','song'),('bird','bind','bing','bong','song')]TestingRunning the test suite from repository root:pytest -v tests/tests.pyRun tests using docker and tox:docker run --rm $(docker build -q . -f Dockerfile.tox) tox
Package: python-wordle-helper
Cheat at wordle!wordle-helpertakes a list of arguments that constrain the possibile letter placements. The
arguments take the form of <word>,<constraints>, where <word> is the word guessed and
<constraints> are the color of each letter returned by Wordle. The allowed colors areyellow,black, andgreen:"y": represents yellow letters"b": represents unused letters"g": represents green lettersEach five letter <word> will have a five letter <constraints> string. For example:~$ poetry run wordle-helper least,ybbyb
INFO:wordle-helper:Found 320 possibilites, the most common one is 'girls'
INFO:wordle-helper:Check 'words_3b035b135cec4e10aad9abd5940fff75' for all possibilites, sorted by frequency
~$ poetry run wordle-helper least,ybbyb girls,bbygg
INFO:wordle-helper:Found 2 possibilites, the most common one is 'rolls'
INFO:wordle-helper:All valid guesses, sorted by frequency:
rolls
roulsInstallationwordle-helperis available onPyPI:~$ pip install python-wordle-helper
...
~$ wordle-helper -hInstallation from sourceThis assumes you havegit,Python 3.9+, andpoetryinstalled already.~$ git clone git@gitlab.com:henxing/wordle_helper.git
~$ cd wordle_helper
wordle_helper$ poetry install
...
wordle_helper$ poetry run wordle-helper -h
Package: python-wordpress
A simple Python library for talking to Wordpress in JSON. This library relies on the [WordPress JSON API plugin][1]. This won’t work if your WordPress site doesn’t have the plugin installed.[1]:http://wordpress.org/extend/plugins/json-api/“WordPress JSON API”Install:$ pip install python-wordpressOrgit cloneandpython setup.py installand such.Usage:>>> from wordpress import WordPress
>>> wp = WordPress('http://example.com/blog/')
>>> posts = wp.get_recent_posts()For now, this only covers thereadportions of the API under thecorecontroller. See the [WordPress JSON API documentation][2] for details.[2]:http://wordpress.org/extend/plugins/json-api/other_notes/Tests assume a WordPress blog running on [MAMP][3] athttp://localhost:8888/wordpress, but you can change that by settingWORDPRESS_BLOG_URLas an environment variable, like so:WORDPRESS_BLOG_URL=http://wordpress.local.host python test.py[3]:http://www.mamp.info/en/index.html“MAMP!”
Package: python-wordpress-api
Python library to interface with a WordPress blog’sJSON APIorXML-RPC API.An implementation of the standard WordPress API methods is provided,
but the library is designed for easy integration with custom
API methods provided by plugins.This library was developed against and tested on WordPress 3.6.
This library is compatible with Python 2.6+ and 3.2+.Please see docs for more information:http://python-wordpress-api.rtfd.org
Package: python-wordpress-xmlrpc
Python library to interface with a WordPress blog’sXML-RPC API.An implementation of the standard WordPress API methods is provided,
but the library is designed for easy integration with custom
XML-RPC API methods provided by plugins.This library was developed against and tested on WordPress 3.5.
This library is compatible with Python 2.6+ and 3.2+.Please see docs for more information:http://python-wordpress-xmlrpc.rtfd.org