Saravanan666/pypi-org huggingface dataset:
Package: python-stripe
Python Library for Stripe APISimplePythonlibrary that pulls the products fromStripedashboard inJSON formatusing onlySTRIPE_API_KEYas input.Actively supported byAppSeedviaEmailandDiscord. Available items:ProductMeta Information:ID, name, descriptionAll ImagesAll PricesThedefault priceseparate node for quick accessQuick StartInstall the packageviaPIP$pipinstallpython-stripeUsage in codefromstripe_pythonimportget_productsSTRIPE_KEY='YOUR_key_here'# mandatory parameterOUTPUT_FILE='products.json'# optionalget_products(STRIPE_KEY,OUTPUT_FILE)All products associated with the account are pulled inproducts.json. Here is a sample output using an account with one product (multiple prices):{"data":[{"id":"prod_L3QBiEdGWquAHl","name":"Django Datta Able PRO","description":"Premium Django Seed project","images":["https://files.stripe.com/links/MDB8YWNjdF8xSGxXdEdHTExkMVgwN1ZVfGZsX3Rlc3RfZjNtOGxwZTRFdGp1MGp1N2ZUeFlENU9Q008T4Zyl6Z"],"price_dfault":{"price_1KNJKmGLLd1X07VUqu1kDHO2":99.0},"prices":{"price_1LuEz0GLLd1X07VUpsvuNCT8":119.0,"price_1KNJKmGLLd1X07VUqu1kDHO2":99.0}}]}Product Imagepulled fromStripeStandalone ExecutionStep 1- Clone the sources frompublic repository$gitclonehttps://github.com/app-generator/python-stripe-wrapper.git
$cdpython-stripe-wrapperStep 2- Create.envusing providedenv.sampleAdd.envfile in your projects root directory and add the following credentialsSTRIPE_API_KEY=<REAL_VALUE_HERE>Step 2- Installdependencies$python-mvenvenv
$sourceenv/bin/activate
$pipinstall-rrequirements.txtStep 3- Pull the products from Stripe dashboard$pythonrun.pyThe products are saved inproducts.json(current working directory). Available props:idnamedescriptionimagesprice(all)Credits & LinksDjango & Stripe Mini eCommerce- free project that use the libraryFlask & Stripe Mini eCommerce- free project that use the libraryFreesupportvia Email & DiscordPython Library for Stripe API- Free library provided byAppSeed.
Package: python-strip-whitespace
HTML Whitespace remover for PythonIntroduction :A powerful tool to optimize HTMLWhy use “python_stip_whitespace” ?Adds line break to InlineJS.It can automagically minify inline CSS, JS.Removes <!–prettier-ignore–> from HTML.It speeds up website by reducing the HTML size.It compiles regex at runtime. So it’s blazing fast.Its mostly based on C ( gzip ) and Rust (minify-html) libraries.Significantly lower bytes transferred when working with frameworks like AlpineJs ( Almost fully working & Please open a issue in theIssue Trackerif you encounter any bug ) & Petite Vue.Is very customizable. ( You can configure lower levelminify-htmlrust bindings and also the lower levelpythonbindings when calling minify  )Why shouldn’t you use python_stip_whitespace ?Adds unnecessary ‘;;’ in HTML. ( If you know any regex to fix this please put a pull request )Requirements :minify-htmlPython 3 ( Should work with all version? )Brotli( orBrotliPy) | ( Optional )ZSTD( Optional )Isn't supperted by modern browsersUsed Internally by :django-strip-whitespaceflask-strip-whitespacefastapi-strip-whitespace( Doesn’t exist  😛 )Contributing :If you like this project add a star.
If you have problems or suggestions please put them in theIssue Tracker.
If you like to add features. Fork this repo and submit a Pull Request. 😛Roadmap :You tell me. If i have free time, I will implement it.
Package: python-stripzip
python-stripzipThis package provides astripzipscript which will set all of the
date/times in given zips to1980-01-01 00:00:00- the lowest valid
value available in zips.The purpose is to zip archive based builds deterministic, e.g. python wheels,
AWS lambdas. There are no extra dependancies, and the package is available
onPyPiwhich is probably the
only advantage of this at the moment.usage: stripzip [-h] zip [zip …]InstallationYou can pick one of:pipsi install python-stripzip
pip install --user python-stripzip
git clone git@github.com:Code0x58/python-stripzip.git && cd python-stripzip && python setup.py installSee alsostrip-nodeterminism- tool written in Perl and released as a Debian package; works on various archive formatsstripzip- tool written in C without binary releases; currently wipes out more zip metadataSOURCE_DATE_EPOCH=315532800 python setup.py bdist_wheel
Package: python_structure
# python-structureSample project structure for a python package.## Guide- use `Python 3` and `pip3` like `npm`- use `virtualenv` like `node_modules`#### Installation```bashpip3 install virtualenvwrapperecho "# python virtualenvsource /usr/local/bin/virtualenvwrapper.sh" >> ~/.bash_profile# activate the created virtual envvirtualenv envsource env/bin/activate# generate dep list for use in pip3 install -r requirements.txtpip3 freeze > requirements.txt# the type 'deactivate' inside to quit```
Package: python-subledger
python-subledger================Python implementation of the Subledger.com API for double entry accountingDocumentation and API endpoint: https://api.subledger.com/### Beware ###This library is experimental and unfinished. Do not rely on it (yet).Feel free to suggest code changes or features!The base for working with Subledger is an Organization. You can get yourself anidentity (user) with Subledger. With this identity and an API key, you cancreate an Organization. The Organization will house accounting Books and journalentries.Implemented:* Organization* Book* Account* JournalEntryTodo:* Switch to v2: https://api.subledger.com/v2/* Fix broken tests* Implement Category* Implement ReportNice to hace:* Implement Identity* ReportRenderings## Usage ##from subledger import Book, Organization# Authenticate with your Subledger credentialsBook.authenticate(api_key, api_secret)# Use your organization to browse the books and accountsorg = Organization.from_id('<your org ID>')for book in Book.all(org):print book# Create a new book and archive it immediatelybook = Book(org, 'USD')book.save()print len(list(Book.all(org))), 'active books'print len(list(Book.all(org, state='archived'))), 'archived books'book.archive()print len(list(Book.all(org))), 'active books'print len(list(Book.all(org, state='archived'))), 'archived books'## Class pattern ##### SubledgerBase ###All models derive from SubledgerBase#### .authenticate(key_id, secret)Register your API key credentials to get access to the Subledger API.#### .from_id(id_)Create the instance by loading the data from Subledger.#### .from_dict(dict)Create the instance from the given dict without requests to Subledger.#### .save()Write the values to Subledger.It will not save data recursively. For example;book.save()will **not** save changes made to book.organization### Organization ####### .from_id(org_id)### Book ####### .from_id(book_id, org_id)#### .organizationThe Organization object this Book belongs to.### Account ####### .from_id(account_id, org_id, book_id)#### .bookThe Book object this Account belongs to.
Package: python-subreg
Python wrapper around the subreg.cz SOAP APIInstallpipinstallpython-subregUsingFirst import module and instance class>>> from subreg import Api
>>> subreg = Api('username', 'password')Get informations about a single domain from your account>>> domain_info = subreg.info_domain('example.com')
>>> print domain_infoGet DNS Zone for domain>>> records = subreg.get_dns_zone('example.com')Add DNS record to domain DNS zone>>> record = dict(name='', type='TXT', content='content')
>>> record_id = subreg.add_dns_record('example.com', record)
>>> print record_idSet Google MX records>>> subreg.set_google_mx_records('example.com')python-subreg documentationSubreg API documentation
Package: python-substack
Python SubstackThis is an unofficial library providing a Python interface forSubstack.
I am in no way affiliated with Substack.InstallationYou can install python-substack using:$ pip install python-substackSetupSet the following environment variables by creating a.envfile:EMAIL=
PASSWORD=If you don't have a passwordRecently Substack has been setting up new accounts without a password. If you sign-out and sign back in it just uses
your email address with a "magic" link.Set a password:Sign-out of SubstackAt the sign-in page click, "Sign in with password" under theEmailtext boxThen choose, "Set a new password"The .env file will be ignored by git but always be careful.UsageCheck out the examples folder for some examples 😃 🚀importosfromsubstackimportApifromsubstack.postimportPostapi=Api(email=os.getenv("EMAIL"),password=os.getenv("PASSWORD"),)user_id=api.get_user_id()# Switch Publications - The library defaults to your users primary publication. You can retrieve all your publications and change which one you want to use.# primary publicationuser_publication=api.get_user_primary_publication()# all publicationsuser_publications=api.get_user_publications()# This step is only necessary if you are not using your primary publication# api.change_publication(user_publication)post=Post(title="How to publish a Substack post using the Python API",subtitle="This post was published using the Python API",user_id=user_id)post.add({'type':'paragraph','content':'This is how you add a new paragraph to your post!'})# bolden textpost.add({'type':"paragraph",'content':[{'content':"This is how you "},{'content':"bolden ",'marks':[{'type':"strong"}]},{'content':"a word."}]})# add hyperlink to textpost.add({'type':'paragraph','content':[{'content':"View Link",'marks':[{'type':"link",'href':'https://whoraised.substack.com/'}]}]})# set paywall boundarypost.add({'type':'paywall'})# add imagepost.add({'type':'captionedImage','src':"https://media.tenor.com/7B4jMa-a7bsAAAAC/i-am-batman.gif"})# add local imageimage=api.get_image('image.png')post.add({"type":"captionedImage","src":image.get("url")})# embed publicationembedded=api.publication_embed("https://jackio.substack.com/")post.add({"type":"embeddedPublication","url":embedded})draft=api.post_draft(post.get_draft())# set section (THIS CAN BE DONE ONLY AFTER HAVING FIRST POSTED THE DRAFT)post.set_section("rick rolling",api.get_sections())api.put_draft(draft.get("id"),draft_section_id=post.draft_section_id)api.prepublish_draft(draft.get("id"))api.publish_draft(draft.get("id"))ContributingInstall pre-commit:pipinstallpre-commitSet up pre-commitpre-commitinstall
Package: python_sudeste
Este módulo é uma chamada à terceira edição da conferência (Python Sudeste 2018) que será em São Paulo.A Python Sudeste é um encontro de comunidades da região sudeste brasileira.Para saber mais é só instalar:pip install python_sudesteE usar:>>>frompython_sudesteimportterceira_edicao>>>terceira_edicao.quando()30demarcoa01deabrilde2018-->#naoehmentira>>>terceira_edicao.onde()BandTecDigitalSchoolRuaHaddockLobo,595SaoPaulo--Capitalhttps://goo.gl/maps/Q7L4swY16V92>>>terceira_edicao.informacoes()http://pythonsudeste.orgVamos lá!
Acesse o site:http://pythonsudeste.orge compre seu ingresso!English versionThis module is a call to the third edition of the conference (Python Sudeste 2018) that will be in São Paulo.Python Sudeste is a meeting of communities in the southeast region of Brazil.To know more just install:pip install python_sudesteAnd use it:>>>frompython_sudesteimportthird_edition>>>third_edition.when()March30toApril1,2018->#isnotajoke>>>third_edition.where()BandTecDigitalSchoolSt.HaddockLobo,595SaoPaulo-SP-Brazilhttps://goo.gl/maps/Q7L4swY16V92>>>third_edition.informations()Visitthewebsite:http://pythonsudeste.orgLet’s go!
Visit the website:http://pythonsudeste.organd buy your ticket!
Package: python-summer-boot
summer-bootAfter spring it comes the summer.Installationpipinstallpython-summer-bootInversion of controlsummer-boot provides an easy dependency injection by splitting classes between services and injectors.
A service is a dependency and an injector is a class that consumes dependencies.You can discover services with thedisvover_servicesfunction.
It is recommended to create a setup file located in your sources root and call discover services function there, once.
Here you have an example:importosfromsummer.inversion_of_control.service_locatorimportget_executable_parent_path,discover_servicesexecutable_parent_path=get_executable_parent_path(os.getcwd())defsetup():discover_services(executable_parent_path)⚠️ Remember to call setup function before use any injection. ⚠️You can define services using the@servicedecorator at class level.fromsummer.inversion_of_control.dependenciesimportservicefromsrc.mock_entity.core.i_repositoryimportIRepository@service()classPostgreRepository(IRepository):defcustom_method(self):return"Postgre repository"Here the code ofIRepository:fromabcimportABC,abstractmethodclassIRepository(ABC):@abstractmethoddefcustom_method(self)->str:raiseNotImplementedErrorFinally, you can consume injected dependencies with the@autowireddecorator, upside the function that needs
dependencies. In most of the cases it will be the__init__function:fromsummer.inversion_of_control.dependenciesimportautowiredfromsrc.mock_entity.core.i_repositoryimportIRepositoryclassUseCase:@autowireddef__init__(self,repository:IRepository):self.repository=repositorydefmy_use_case(self)->str:returnself.repository.custom_method()Models⚠️ It is necessary to install pydantic in order to use this module. ⚠️SummerBoot implements some models using inheritance from pydantic.CamelModelA model which every attribute is represented as camelCase perhaps is coded as snake_case. I.e.:fromsummer.models.camel.camel_modelimportCamelModelclassMockCamelModel(CamelModel):mock_attribute:str="mock"
Package: python-sundials
python-sundialsis a Cython wrapper for the Sundials solver suite.The wrapper is based on code posten on the cython-dev mailing list by
Mr. Jon Olav Vik.HighlightsCVODE - Solver for stiff and nonstiff ordinary differential equationIDA - Solver for the solution of differential-algebraic equation (DAE) systemsKINSOL - solver for nonlinear algebraic systems based on Newton-Krylov solver technologyThe CVODE and IDA solvers support root finding and the solver throws an exception
on finding a root.There is also an example of implementing the explicit equation in Cython for speed.Updates in 0.5Fixed an error in the root handling.
Package: python-supporter
python-supporterhttps://pypi.org/project/python-supporterpip install python-supporterfrom python_supporter import logging

logging.basicConfig(logging.ERROR)
#logging.basicConfig(logging.INFO)
#logging.basicConfig(logging.DEBUG)
#logging.basicConfig()
#logging.basicConfig(logging.ERROR, filename='log.txt')
#logging.basicConfig(logging.INFO, filename='log.txt')
#logging.basicConfig(logging.DEBUG, filename='log.txt')
#logging.basicConfig(filename='log.txt')

logging.error('This is error message') #2023-03-19 22:36:47: ERROR: This is error message
logging.info('This is info message')
logging.debug('This is debug message')import python_supporter

text = python_supporter.file.read_file(file)
python_supporter.file.write_file(file, text)import python_supporter

chrome_debugger_address = "127.0.0.1:1001"
li = chrome_debugger_address.split(":")
remote_debugging_port = int(li[1])
remote_debugging_address = li[0]

port_opened = python_supporter.socket.check_port_open(remote_debugging_address, remote_debugging_port)from python_supporter.file import read_binary_file
from python_supporter.file import write_binary_file

source_image = read_binary_file("./assets/source.png")
driving_video = read_binary_file("./assets/driving.mp4")

source_image = "source_image.png"
write_binary_file(source_image, inputs["source_image"])
driving_video = "driving_video.mp4"
write_binary_file(driving_video, inputs["driving_video"])
Package: python-surveilclient
This is a client library for Surveil built on the Surveil API.Command-line APIInstalling this package gets you a shell command,surveil, that you
can use to interact with the Surveil API.You’ll need to provide the Surveil API URL. You can do this with the--surveil-api-urlparameter, but it’s easier to just set it as environment
variable:export SURVEIL_API_URL=http://localhost:5311/v2
export SURVEIL_AUTH_URL=http://localhost:5311/v2/authYou’ll find complete documentation on the shell by runningsurveil help.Bash completionBasic command tab completion can be enabled by sourcing the bash completion script:source /usr/local/share/surveil.bash_completionPython APITo use the python API, simply create a client with the endpoint:from surveilclient import client
c = client.Client('http://localhost:5311/v2',
                  auth_url='http://localhost:5311/v2/auth',
                  version='2_0')
hosts = c.config.hosts.list()How to use itConfig-host-update:surveil config-host-update --host_name [host_name] --address [ADDRESS] --custom_fields '{"_field1": "value1", "_field2": "value2"}'
Package: python-suseapi
Python module to work with various SUSE services. Please note that many of them
are internal only.Documentation is available athttp://python-suseapi.readthedocs.org/.BugzillaSimple interface for Novell bugzilla, allowing to download, search or
manipulate with bugs. It relies on web scraping using mechanize for many
tasks.Maintained dataProcess database of maintained data. This will be soon obsolete as this
information should be in Build Service.PresenceAccess to vacation and holiday information.ProductsBasic mapping of various variants of product name to standard notation.Service request informationRetrieval information about service requests.SWAMPModule for interfacing SWAMP using SOAP interface based on suds library.
Package: python-svg
PySVGThe Python library for generating dynamic SVGs using Python3Version: 0.0.5Installationpip install python-svgNote:
This library is still under developmentExample:importsvgfromsvg.canvasimportCanvasfromsvg.shapesimportRectanglefromsvg.serverimportsvg_servercanvas=Canvas(500,500)rect1=Rectangle(200,100,canvas)svg_server(canvas=canvas,port=8000)To Access the raw SVG in a form of a stringfromsvg.canvasimportCanvasfromsvg.shapesimportRectanglefromsvg.serverimportsvg_servercanvas=Canvas(500,500)rect1=Rectangle(200,100,canvas)svg_code=canvas.svg_content()print(svg_code)The browser will redirect you to localhost:port and you can see the SVG ouput!There will be a RestAPI Version for the same library soon ;)By KrishnaKanth1729
Package: pythonsweeper
PYTHONSWEEPERPysweeper is a Python implementation of the classic Minesweeper game. It is a simple game where the player has to find all the mines in a grid without detonating any of them. The player can mark a cell as a mine by right-clicking on it. The game ends when the player detonates a mine or when all the cells that are not mines are revealed. The libraty focuses on the game logic and does not provide any graphical interface. The game can be played in the terminal or in a graphical interface using the Pygame library.InstallationThe library can be installed using pip:pip install pythonsweeperUsageimportpythonsweeperasms# Create a game with 10 rows, 10 columns and 10 minesgame=ms.Game(10,10,10)# Reveal a cellgame.reveal(0,0)# Mark a cell as a minegame.mark(0,0)# Get the player's boardgame.get_player_board()# Get the game's boardgame.get_board()#etc.LicenseMITContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Authors and acknowledgmentThe library was created by Boris Khesin (aka Shagulka) and is maintained by him.Project statusThe library is still in development and is not yet ready for production use.
Package: python-swiftclient
Python bindings to the OpenStack Object Storage APIThis is a python client for the Swift API. There’s a Python API (theswiftclientmodule), and a command-line script (swift).Development takes place via the usual OpenStack processes as outlined
in theOpenStack wiki.This code is based on the original client previously included withOpenStack’s Swift. The python-swiftclient is licensed under the
Apache License like the rest of OpenStack.Free software: Apache licensePyPI- package installationOnline DocumentationLaunchpad project- release managementBugs- issue trackingSourceHow to ContributeRelease Notes
Package: python-switch
Python Switch Like JavaScript Switch StatementInstallingInstall and update usingpip:pipinstallpython-switchA Simple Examplesfrompython_switchimportSwitchs=Switch({"d":lambdax:f"returns{x}(d)","default":lambdax:f"returns{x}(default)"})print(s.get("d")(1))Adding a case later.frompython_switchimportSwitchs=Switch({"default":lambdax:f"returns{x}(default)"})s.addCase("d",lambdax:f"returns{x}(d)")print(s.get("d")(1))Adding cases with the decorator.frompython_switchimportSwitchs=Switch({"default":lambdax:f"returns{x}(default)"})@s.case()defd(x):returnf"returns{x}(d)"print(s.get("d")(1))
Package: python-switchbot
python-switchbotA Python library to control SwitchBot devices connected to SwitchBot HubRequirementsPython 3.7+A SwitchBot TokenInstallationpipinstallpython-switchbotUsageDevicesfromswitchbotimportSwitchBot# To get the token and secret, please refer to https://github.com/OpenWonderLabs/SwitchBotAPI#getting-startedyour_switch_bot_token='98a6732b2ac256d40ffab7db31a82f518969f4d1a64eadff581d45e902327b7c577aa6ead517bda589c19b4ca0b2599b'your_switch_bot_secret='222cdc22f049d111c5d0071c131b8b77'switchbot=SwitchBot(token=your_switch_bot_token,secret=your_switch_bot_secret)# To list all devicesdevices=switchbot.devices()fordeviceindevices:print(device)# Bot(id=CD0A18B1C291)# Lock(id=CD0A1221C291)# HubMini(id=4CAF08629A21)# Bot(id=5F0B798AEF91)# If you already know a device id:device=switchbot.device(id='5F0B798AEF91')# Device(id=5F0B798AEF91)# To query a status of a deviceprint(device.status())# {'power': 'off'}# To command actions,device.command('turn_on')device.command('turn_off')device.command('press')device.command('set_position',parameter='0,ff,80')# For some device types like Bot:bot=devices[0]bot.turn('on')bot.turn('off')bot.toggle()bot.press()# For some device types like Lock:lock=devices[1]lock.lock()lock.unlock()lock.toggle()Remotes# To list all infra red remotesremotes=switchbot.remotes()forremoteinremotes:print(remote)# If you already know a remote id:remote=switchbot.remote(id='')# Supported devices such as fans, air purifiers:remote.turn('on')remote.turn('off')# To send supported commands,remote.command('swing')remote.command('low_speed')# To send custom commands,remote.command('MyCustomCommand',customize=True)Scenes# To list all infra red remotesscenes=switchbot.scenes()forsceneinscenes:print(scene)# If you already know a remote id:scene=switchbot.scene(id='')# To execute scenescene.execute()
Package: python-systemair-savecair
python-systemair-savecairThis is a simple package that expose the savecair API as a python module.Installationpipinstallpython-systemair-savecairExamplefromsystemair.savecair.clientimportSavecairClientimportasyncioif__name__=="__main__":asyncdefon_connect():passasyncdefon_disconnect():passasyncdefon_update():passasyncdefon_error():passasyncdefstart(loop=asyncio.get_event_loop()):x=SavecairClient(iam_id="xxxxx",password="xxxxx",loop=loop)x.on_connect.append(on_connect)x.on_disconnect.append(on_disconnect)x.on_update.append(on_update)x.on_error.append(on_error)x.start()loop=asyncio.get_event_loop()loop.run_until_complete(start(loop))loop.run_forever()Version History1.0.0 - Initial Version
Package: python-systemair-saveconnect
python-systemair-saveconnectThis is a simple package that expose the SaveConnect API as a python
module.Installationpipinstallpython-systemair-saveconnectExamplefromsystemair.saveconnectimportSaveConnectemail=""password=""sc=SaveConnect(email=email,password=password,ws_enabled=True,update_interval=60,refresh_token_interval=300)# Authenticateifnotawaitsc.login():raiseRuntimeError("Could not connect to systemAIR")# Refresh Tokenawaitsc.auth.refresh_token()devices=awaitsc.get_devices()device_0=devices[0]["identifier"]device_0_data=awaitsc.read_data(device_id=device_0)Version History3.0.0 - Updated to work with SaveConnect1.0.0 - Initial Version