Saravanan666/pypi-org huggingface dataset:
Package: pyovpn-as
Python OpenVPN Access Server SDKA Python library built on XML-RPC that demystifies remote interaction with OpenVPN Access ServerOpenVPN Access Server provides an XML-RPC API that allows administrators to manage the server remotely and programatically. Unfortunately, OpenVPN explicitly provides this feature undocumented. This SDK provides a way to interact with this API, with helpful error messages, powerful functionality, and a clear explanation of what the hell you're looking at.For support please emailperitz@pardonmynoot.com. Code is athttps://github.com/peritz/pyovpn-asGetting StartedGetting started is simple. First you must enable the XML-RPC feature on your access server. This can be done either through the web interface by navigating toConfigurations -> Client Settings -> Enable Complete APIor by setting it via the command line./sacli --key "xmlrpc.relay_level" --value 2 ConfigPutNow we can start running commands:>>>frompyovpn_asimportclient>>>mgmt_client=client.from_args('https://ovpn.example.org/RPC2/','openvpn','P4ssw0rd!!!!')>>>new_user=mgmt_client.users.create_new_user('newuser','P4ssw0rd123£',prop_superuser=True)>>>new_user.type"user_connect">>>new_user.is_adminTrue>>>mgmt_client.users.delete_user(as_client,'404')Traceback(mostrecentcalllast):File"<stdin>",line1,in<module>AccessServerProfileNotFoundError:User"404"doesnotexistInstallationpip install pyovpn-asHow to ContributeThere are three main ways to contribute to this project:Search for open issues or open your own issue for a bug or problem discovered in the codebase or the documentationSubmit a pull request to merge a feature or fix into the master branch (more information on how to do that and what maintainers expect from your code can be found in the full documentation)Use this SDK to poke at OpenVPN Access Server to find additional functionality, or to clarify the functionality given here, then open an issue and tell us what you found and how we can improveWe don't accept monetary contributions, everything you see is free :)LicenseGPL license, see theLicense
Package: pyow
Function argument validation for humans for Python 3!HighlightsStraight port from the amazing libraryowfrom Sindre SorhusExpressive chainable APIPythonic approach via decoratorLots of built-in validationsSupports custom validationsWritten in Python3 with Type hintingNotesSince this is a straight up port from the JavaScript library not all features are available.
Partly since this is a port and I haven't caught up and also since Python doesn't support all usecases
as JavaScript does.Install$pip3installpyowUsagefrompyowimportpyowdefunicorn(input):pyow(input,pyow.string.min_length(5))# ...unicorn(3)>>>ArgumentError:'Expected argument to be of type `str` but received type `int`unicorn('yo')>>>ArgumentError:Expectedstringtohaveaminimumlengthof`3`,got`yo`or via decoratorfrompyow.decoratorimportvalidate@validate(pyow.string.min_length(5))defunicorn(input):return1APIpyow(value, predicate)Test ifvaluematches the providedpredicate. Throws anArgumentErrorif the test fails.pyow.is_valid(value, predicate)ReturnsTrueif the value matches the predicate, otherwise returnsFalse.pyow.create(predicate)Create a reusable validator.check_password=pyow.create(pyow.string.min_length(6))check_password('foo')>>>ArgumentError:('Expected string to have a minimum length of `6`, got `foo`')pyow.any(predicate: List[Predicate])Returns a predicate that verifies if the value matches at least one of the given predicates.pyow('foo',pyow.any(pyow.string.max_length(3),pyow.number))pyow.{type}All the below types return a predicate. Every predicate has some extra operators that you can use to test the value even more fine-grained.PrimitivesstringnumberbooleanBuilt-in typeslistsetdicterrorPredicatesThe following predicates are available on every type.nix/isnotInverts the following predicates.pyow(1,pyow.number.nix.infinite)pyow(1,pyow.number.isnot.infinite)pyow('',pyow.string.isnot.empty);>>>ArgumentError:[NOT]Expectedstringtobeempty,got``is_(fn)Use a custom validation function. ReturnTrueif the value matches the validation, returnFalseif it doesn't.pyow(1,pyow.number.is_(lambdax:x<10))pyow(1,pyow.number.is_(lambdax:x>10))>>>ArgumentError:Expected`1`topasscustomvalidationfunctionInstead of returningFalse, you can also return a custom error message which results in a failure.defgreater_than(max_number:int,x:int):returnx>max_numberorf'Expected `{x}` to be greater than `{max_number}`'};pyow(5,pyow.number.is_(lambdax:greater_than(10,x)))>>>ArgumentError:Expected`5`tobegreaterthan`10`MaintainersHenrik AnderssonRelated@sindresorhus/ow- Function argument validation for humansLicenseMIT
Package: pyowapi
pyowapipyowapiis an asynchronous wrapper around an unofficial Overwatch api (https://ow-api.com) using aiohttp.Things have changed considerably from v2 to v3, make sure to update your code before upgrading.Example usageimportpyowapi# Both of these create an event loop for you for convenience. This will not work where an event loop already exists (like discord.py)# For a single playerplayer=pyowapi.get_player("Jayne#1447")print(player.success)print(player.private)print(player.competitive_tank)# For multiple playersplayer_list=["Jayne#1447","Krusher#9999"]players=pyowapi.get_player(player_list)forsingle_playerinplayers:print(player.competitive_tank.group)print(player.competitive_tank.tier)# For different platformsplayer=pyowapi.get_player("Krusher99",platform="psn")# platform can be pc, xbox, ps4 and nintendo-switchprint(player.competitive_tank)# If the player name is from user input sometimes it can be capitalized wrong or use the wrong discriminator# You can pass correct_player = True and if the player name is incorrect pyowapi will attempt to find the correct one# The player object will then have original_player_name which is the previous battletagplayer=pyowapi.get_player("jayne#1447",correct_player=True)print(player.original_player_name)# jayne#1447print(player.player_name)# Jayne#1447print(player.success)# True# If an event loop already exists you need to call get_player_async insteadplayer=awaitpyowapi.get_player_async("Jayne#1447")print(player.private)print(player.competitive_tank)# A player has the following propertiesprint(player.player_name)# The name of the Player (battletag or other)print(player.original_player_name)# If a player name was corrected this is the misspelled versionprint(player.success)# If the request was successfulprint(player.private)# If the player profile is privateprint(player.endorsement)# The player endorsement levelprint(player.competitive_tank.tier)# Player Tank Tier (5-1)print(player.competitive_tank.group)# Player Tank Group (Bronze, Silver, Gold, Platinum, Diamond, Master, Grandmaster)print(player.competitive_damage)# Player Damage Rating (similar to Tank)print(player.competitive_support)# Player Support Rating (similar to Tank)print(player.quickplay_stats)# Dictionary containing all quickplay statsprint(player.quickplay_games_won)print(player.competitive_stats)# Dictionary containing all competitive statsprint(player.competitive_games_played)print(player.competitive_games_won)
Package: pyowletapi
IntroductionInspiration and API reverse engineering taken from various projects:https://github.com/BastianPoe/owlet_apihttps://github.com/mbevand/owlet_monitorInstallTo install via pip run commandpip install pyowletapiTo doTidy up exception loggingCreate test routinesUseimport the api and sock objectsfrompyowletapi.apiimportOwletAPIfrompyowlet.sockimportSockcreate an api object passing your region, username and password, the OwletAPI will also take a aiohttp session as a keyword argumentapi=OwletAPI('europe',username,password)you can then authenticate against the Owlet servers using this object and create a list of sock objectsawaitapi.authenticate()socks={device['device']['dsn']:Sock(api,device['device'])fordeviceindevices}to get current reading from sock call the update_properties function on each sock objectdevice.update_properties()This will return a dictionary, the key 'raw_properties' contains the raw response as a dict and the 'properties' key is a more cut down dict version of the response showing only the most relevant data and the 'tokens' key will return a dictionary if the api tokens have changed since the last call
Package: pyownet
Pyownet is a pure python package that allows network client access to
theOWFS 1-Wire File Systemvia anowserverand theowserver
network protocol, in shortownet.Thepyownet.protocolmodule is an implementation of the owserver
client protocol that exposes owserver messages as methods of a proxy
object:>>> owproxy = pyownet.protocol.proxy(host="owserver.example.com", port=4304)
>>> owproxy.dir()
['/10.67C6697351FF/', '/05.4AEC29CDBAAB/']
>>> owproxy.read('/10.67C6697351FF/temperature')
'     91.6195'InstallationTo install pyownet:$ pip install pyownetPython version supportThe code base is written in Python 2, but Python 3 is fully supported,
and is the main developing language. Running the2to3tool will
generate valid and, whenever possible, idiomatic Python 3 code.Explicitly supported versions are Python 2.7, 3.3 through 3.7.DocumentationFull package documentation is available athttp://pyownet.readthedocs.org/en/latest/
Package: py-oxford
pyoxfordpyoxford is a python library for theoxford dictionary API.InstallationUse the package managerpipto install pyoxford.Installation using pippipinstallpy-oxfordInstallation from sourcegitclonehttps://github.com/spacesudo/pyoxford.gitcdpyoxford
pythonsetup.pyUsagefrompyoxfordimportpyOxforddictionary=pyOxford()search=dictionary.entries("example")#search for "example"print(search)ConfigurationTo configure the library pass your configurations to thepyOxford()class.frompyoxfordimportpyOxfordoxford=pyOxford(app_id="<your id>",app_key="<your key>",timeout=(2,6))#timeout should be a tupleCommon IssuesAuthentification errorPlease now that the api key and id used for this package is for test purpose only.
Some features of the API are not accessible with a Developer API credentials.If you face any other issue please kindly let me knowRoadmapPlease know that this library is still under developmentFuture updates of this library will have advanced features and probably use other dictionary API for Meriam Webster support and otherswhile this library is production ready please remember to regularly update the library usingpip install py-oxford --upgradeSocial mediaYou can follow me on:Twitter@derankemor send a message on telegram@spacesudoContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseThis project is licensed under theMITLicense.
Package: pyoxigraph
Pyoxigraph (Oxigraph for Python)Pyoxigraph is a graph database library implementing theSPARQLstandard.
It is a Python library written on top ofOxigraph.Pyoxigraph offers two stores withSPARQL 1.1capabilities.
One of the store is in-memory, and the other one is disk based.It also provides a set of utility functions for reading, writing and processing RDF files inTurtle,TriG,N-Triples,N-QuadsandRDF/XML.Pyoxigraph is distributedon Pypiandon conda-forge.
Runpip install pyoxigraphto install it.There exists also a small library providingrdflibstores using pyoxigraph:oxrdflib.Pyoxigraph documentation isavailable on the Oxigraph website.Build the development versionTo build and install the development version of pyoxigraph you need to clone this git repository including submodules (git clone --recursive https://github.com/oxigraph/oxigraph.git)
and to runpip install .in thepythondirectory (the one this README is in).HelpFeel free to useGitHub discussionsorthe Gitter chatto ask questions or talk about Oxigraph.Bug reportsare also very welcome.If you need advanced support or are willing to pay to get some extra features, feel free to reach out toTpt.How to contributePyoxigraph is written in Rust usingPyO3.Pyoxigraph is built usingMaturin.
Maturin could be installed using thepip install 'maturin>=0.9,<0.10'.
To install a development version of Oxigraph just runmaturin developin this README directory.TestsThe Python bindings tests are written in Python.
To run them usepython -m unittestin thetestsdirectory.DocsThe Sphinx documentation can be generated and viewed in the browser using the following command:sphinx-autobuild docs docs/_build/htmlNote that you will need to havesphinx-autobuildinstalled.Alternatively, you can usesphinx-buildwith Python'shttp.serverto achieve the same thing.LicenseThis project is licensed under either ofApache License, Version 2.0, (LICENSE-APACHEorhttp://www.apache.org/licenses/LICENSE-2.0)MIT license (LICENSE-MITorhttp://opensource.org/licenses/MIT)at your option.ContributionUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Oxigraph by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Package: pyoxynet
Pyoxynet packageThis README has been intentionally created for Pypi. Please find a more extended and detailed description of the project on theGitHub repository.DocumentationPlease refer to the extendeddocumentationto read the docs.InstallationUse the package managerpipto installpyoxynet.pipinstall--upgradepip
pipinstallpyoxynetTest settingsimportpyoxynet# Load the TFL modeltfl_model=pyoxynet.load_tf_model()# Make inference on a random inputtest_tfl_model(tfl_model)# Plot the inference on a test datasetpyoxynet.test_pyoxynet()Data required for the inference include oxygen uptake (VO2), exhaled CO2 (VCO2), minute ventilation (VE), end tidal O2 (PetO2) and CO2(PetCO2), and ventilatory equivalents (VEVO2 and VEVCO2):VO2VCO2VEPetO2PetCO2VEVO2VEVCO2This structure might evolve with different package version, so please refer to the mainGitHub repositoryREADME for the latest structure details.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicensePlease refer to the LICENSE file at theGitHub repository.DisclaimerAll content found on this website, including: text, images, tables, or other formats are created for informational purposes only. The information provided by this software is not intended to be a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified health provider with any questions you may have regarding a medical condition. Never disregard professional medical advice or delay in seeking it because of something has been provided by this software.
Package: pyp0f
pyp0fNative implementation ofp0f v3in typed Python 3.Documentation:https://github.com/Nisitay/pyp0f/blob/master/docs/README.mdSource Code:https://github.com/Nisitay/pyp0fpyp0fis able to accurately guess the source OS or user application of a given packet with passive fingerprinting, as well as impersonate packets so thatp0fwill think it has been sent by a specific OS.Motivationpyp0fis platform independent (usingScapy), whilep0fcan be cumbersome to run on some platforms (such as Windows).The implementation and concepts behindp0fare very sophisticated, but the tool is written in C which makes it harder to understand and extend. Performance is expected to be slower in Python, butpyp0fstill performs well enough (seePerformance benchmarks)p0fheavily depends on full packet flow details, whilepyp0fattempts to use as little information as possible. For example, you may be able to fingerprint a SYN+ACK packet from a session without having the matching SYN packet.pyp0faims to be highly configurable and used as a library, without limiting its effectiveness to one packet format/library, as opposed top0fwhich runs on a seperate process and you query the results using an API.Installation$pipinstallpyp0fFeaturesFull p0f fingerprinting (MTU, TCP, HTTP)p0f spoofing - impersonation (MTU, TCP)TCP timestamps uptime detectionIn ProgressFlow trackingNAT detectionGetting Startedfromscapy.layers.inetimportIP,TCPfrompyp0f.databaseimportDATABASEfrompyp0f.fingerprintimportfingerprint_mtu,fingerprint_tcp,fingerprint_httpfrompyp0f.fingerprint.resultsimportMTUResult,TCPResult,HTTPResultDATABASE.load()# Load the fingerprints database# MTU Fingerprintinggoogle_packet=IP()/TCP(options=[("MSS",1430)])mtu_result:MTUResult=fingerprint_mtu(google_packet)# TCP Fingerprintinglinux_packet=IP(tos=0x10,flags=0x02,ttl=58)/TCP(seq=1,window=29200,options=[("MSS",1460),("SAckOK",b""),("Timestamp",(177816630,0)),("NOP",None),("WScale",7)],)tcp_result:TCPResult=fingerprint_tcp(linux_packet)# HTTP Fingerprintingapache_payload=b"HTTP/1.1 200 OK\r\nDate: Fri, 10 Jun 2011 13:27:01 GMT\r\nServer: Apache\r\nLast-Modified: Thu, 09 Jun 2011 17:25:43 GMT\r\nExpires: Mon, 13 Jun 2011 17:25:43 GMT\r\nETag: 963D6BC0ED128283945AF1FB57899C9F3ABF50B3\r\nCache-Control: max-age=272921,public,no-transform,must-revalidate\r\nContent-Length: 491\r\nConnection: close\r\nContent-Type: application/ocsp-response\r\n\r\n"http_result:HTTPResult=fingerprint_http(apache_payload)Sourcesp0f source codeScapy docs & source codeAuthorsItay Margolin-Nisitay
Package: pyp3
pyp3A minifiedpypcompatible with python3Pyp is a linux command line text manipulation tool similar to awk or sed, but which uses standard python string and list methods as well as custom functions evolved to generate fast results in an intense production environment.InstallationFrom PyPIpip3installpyp3From GitHubpip3installgit+https://github.com/donno2048/pyp3UsageBecause pyp employs it's own internal piping syntax ("|") similar to unix pipes, complex operations can be proceduralized by feeding the output of one python command to the input of the next.This greatly simplifies the generation and troubleshooting of multistep operations without the use of temporary variables or nested parentheses. The variable "p" represents each line as a string, while "pp" is entire input as python listUse it directlyls|pyp3"p[0] | pp.sort()"#gives sorted list of first letters of every lineUse it as a python modulels|python3-mpyp3"p.replace('.', ',')"#replaces . with ,
Package: pyp333
pyp333a test for pypi package
being inspired byhttps://github.com/ytakefuji/defenseThe goal of this is  compareing the diferense of Military spending　and gdp of us,uk,russia,ukraine on graph.
using SIPRI datasethttps://sipri.org/sites/default/files/SIPRI-Milex-data-1949-2020_0.xlsxi 　visualize the data of total cost,per cost and gdphow to install :
pip install pyp333
Package: pyp3rclip
This is a slightly modified version of pyperclip 1.8.3 fixing an attribution error, renamed to pyp3rclip as this may break python 2 compatibility.The description below is from the original pyperclip repository:https://github.com/asweigart/pyperclipPyp3rclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.Install on Windows:pip install pyp3rclipInstall on Linux/macOS:pip3 install pyp3rclipAl Sweigartal@inventwithpython.comBSD LicenseExample Usage>>> import pyp3rclip
>>> pyp3rclip.copy('The text to be copied to the clipboard.')
>>> pyp3rclip.paste()
'The text to be copied to the clipboard.'Currently only handles plaintext.On Windows, no additional modules are needed.On Mac, this module makes use of the pbcopy and pbpaste commands, which should come with the os.On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run “sudo apt-get install xclip” or “sudo apt-get install xsel” (Note: xsel does not always seem to work.)Otherwise on Linux, you will need the gtk or PyQt4 modules installed.
Package: pyp5js
pyp5js: drawing with Python 3Processingideas and Python 3 together withP5.jsin the browser.Python 3 drawing in the web! Try ithere!Here's an example of a valid Python code using P5.js API:defsetup():createCanvas(200,200)defdraw():background(200)diameter=sin(frameCount/60)*50+50fill('blue')ellipse(100,100,diameter,diameter)Project setup$ git clone git@github.com:YOUR_GITHUB_PROFILE/pyp5js.git
$ cd pyp5js
$ pip install -r dev-requirements.txt
$ python setup.py develop
$ make testMore referencesDocumentationExamplesInstallationQuickstartInternals detailsKnown issues and differences to the Processing.Py and P5.js ways of doing thingsHow can I contribute?
Package: pyp8s
pyp8sCustomisable prometheus exporter for your python application.Currently not that much customisable, though.Installationpython3-mpipinstallpyp8sUsageExamples:https://github.com/pyp8s/examplesMetricsHandler implements a singleton.frompyp8simportMetricsHandlerasmehif__name__=='__main__':meh.serve(listen_address="0.0.0.0",listen_port=8081)meh.init("calls","counter","Number of calls I've received")meh.init("doorbells","counter","Number of doorbells I've answered")meh.init("yawns","counter","Quite self-explanatory")meh.init("mood","gauge","How do I feel myself from 1 to good enough")meh.init("giggles","counter","Measurement of the joke power.",init_value=0)meh.inc("calls",1)meh.inc("doorbells",100,can="have",extra="labels",since="2.1.0")meh.inc("doorbells",9000,this="will",be="useful")meh.inc("yawns",8,satisfying="yes")meh.inc("yawns",1,satisfying="no",loud="yes")meh.set("mood",3)meh.set("mood",6)curl127.0.0.1:8081/metrics# HELP http_get_requests Number GET requests accepted# TYPE http_get_requests counterhttp_get_requests{}1# HELP http_get_metrics Number times the metrics endpoint was called# TYPE http_get_metrics counterhttp_get_metrics{}1# HELP calls Number of calls I've received# TYPE calls countercalls{}1# HELP doorbells Number of doorbells I've answered# TYPE doorbells counterdoorbells{can="have",extra="labels",since="2.1.0"}100doorbells{this="will",be="useful"}9000# HELP yawns Quite self-explanatory# TYPE yawns counteryawns{satisfying="yes"}8yawns{satisfying="no",loud="yes"}1# HELP mood How do I feel myself from 1 to good enough# TYPE mood gaugemood{}6# HELP giggles Measurement of the joke power.# TYPE giggles countergiggles{}0Usage without starting a serverWhen you only need this thing to collect and render metrics:frompyp8simportMetricsHandlerasmehif__name__=='__main__':meh.init("calls","counter","Number of calls I've received")print(meh.render())render()returns a string object.Test environmentpython3.10-mvirtualenv--prompt="py3.10 pyp8s".virtualenvsource.virtualenv/bin/activateReporting bugsPlease, use GitHub issues.Requesting new functionalityPlease, use GitHub issues.