Saravanan666/pypi-org huggingface dataset:
Package: qsketchmetric
QSketchMetricis a Python 2Dparametric DXFCAD rendering engine. Parametrization is done usingQCAD Professional software⚡️ Quickstartfromqsketchmetric.rendererimportRendererfromezdxfimportnewfromezdxfimportunitsoutput_dxf=new()output_dxf.units=units.MMinput_parametric_dxf_path='tutorial.dxf'input_variables={"h":50}renderer=Renderer(input_parametric_dxf_path,output_dxf,variables=input_variables)renderer.render()output_dxf.saveas('tutorial_rendered.dxf')📷 Demo showcase⚙️ InstallationThe most common case is the installation bypip package manager:pipinstallqsketchmetric📐 DXF ParametrizationParametrization is done usingQCAD Professional software.
You can download thefree trialversion of the software and use it for parametrization of your DXF files.
We need to use it because it is the only software that supports adding custom data to DXF entities.See docs to learn more...✅ QSketchMetric ValidatorTo verify the proper parametrization of a DXF file during parametrization process, use theQSketchMetric Validator. It is a web application that
allows you to upload DXF file and check if it is properly parametrized.
In the event of an error, the app will give you full debug report. Including
place where the error occurred in the DXF file and the error message.See docs to learn more...🎯 FeaturesParametricDXFrenderingEasy dxf files parametrization usingQCAD Professional softwareExplicit support for parametrization ofLINE,CIRCLE,ARC,POINTentitiesSupport for parametrization ofLWPOLYLINE,POLYLINE,SPLINE,ELLIPSE,MTEXT,TEXTetc.entities usingINSERTentity.Open source and daily maintained📚 DocumentationDocumentation is available atQSketchMetric docs📈 RoadmapExplicit support for more entities is planned in the future. If you have any suggestions, please create an issue.
If you want to contribute, seeHow to contributesection in the documentation. I am open to any suggestions
and waiting for your pull requests!⚠️ LicenseQSketchMetric is licensed under theMITlicense.
When using the QSketchMetric in your open-source project I would be grateful for a reference to the repository.🏆 Hall of fameThis project exists thanks to all the people who contribute. Thank you!
Package: qsm
qsmModule Python pour la manipulation de circuits quantiques.InstallationpipinstallqsmExample d Utilisation:fromqsmimportQuantumCircuit# Créer un circuit quantique avec 3 qubitscircuit=QuantumCircuit(3)# Appliquer une porte Hadamard sur le premier qubitcircuit.h(0)# Appliquer une porte CNOT entre le premier et le deuxième qubitcircuit.cx(0,1)# Mesurer l'état du circuitresultats=circuit.measure_all(shots=1024)print(resultats)Licencece projet est sous licence particulier, juste un message au proprietaire du module pour son accord pour la copie, etc..Contributionce projet peut etre contribué par differente maniére:
reddit laisser un message pour contribué dans r/pythongithub créer un repertoire pour ajouter des fonctionnalité si neccéssaire
Package: qsmcli
qsmcliQ system management command line toolInstallationYou will need to install python3 first, qsmcli has
# pip3 install qsmclirunning qsmclipython3 -m qsmclisupported shell mode and commandCommand line modeWhen invoke this command, if there is any argument, then the command executed.Shell modeIn Shell mode, if there is no argument is specified, then the shell mode is entered.
The host and username/password is saved in the prompt.Command supportedhelp/?Any command with help command involved will print the help message.ipmiThis is the command to redirect all of the command to ipmitoolmacget system mac command and print out the system mac we have
mac [index], index range from 0 to 5
for example: mac 0cpldget CPLD information:
cpld [fw|cksum|id]
fw: get CPLD fw
cksum: get CPLD checksum
id: Get CPLD idcodemeQuery ME related information.
me [version|cpu|dimm|io]
me version: to get ME version
me cpu: to get CPU utililization
me dimm: to get DIMM utililization
me io: to get IO utilizationnicget, set the BMC dedicate/share NIC
nic [dedicate|lom-share|mezz-share0|mizz-share1]Return:  
For LAN Card Type,
0h- BMC Dedicated
2h- Shared NIC (OCP Mezzanine slot)
3h- Shared NIC (QCT Mezzanine slot)serviceeanble/disable Service commands:
service [enable/disable] [web|kvm|cd-media|hd-media|ssh|solssh]
Please notice this utility will get the service configuration data and
set the configuration data when set it. It do not guarantee that BMC has this feature.TestTo run the unit test command, use 'python3 -m unittest'
Upload to github will trigger Travis CI run the unittestDistribute the packageTo generate the package, use 'package.sh' to build the package.
Package: qsml
qsmlqsml is a markup language for key value securities (stock name, amount)quick securities markup language is a project geared towards listing portfolios for performing data analysis uponInstallationgit clone https://github.com/michaelpeterswa/qsml.git

or

pip3 install qsmlOr download the file manually.Release History1.0.0Opened Repository (06.25.2020)MetaMichael Peters -enter additional contact information hereDistributed under the MIT license. SeeLICENSEfor more information.
Package: qs-mps
qs-mpsqs-mps is a Python package that enables researchers to simulate Quantum Systems with Matrix Product State tensors.InstallationYou can install qs-mps either by cloning the repository or using pip.pipinstallqs-mpsClone the RepositoryTo clone the repository locally, use the following command:gitclonegit@github.com:Fradm98/qs-mps.git
Package: qsnctf
🤔What is QSNCTF？青少年CTF训练平台是一个公益、免费、供给全国青少年学习、训练的CTF在线平台。（本仓库）qsnctf是青少年CTF训练平台进行编写的一个Python包程序，意图在Python中为大家快速使用一些CTF常用功能开发的开源包。这里有很多CTF常用功能，如Base编码、hash加密，甚至少见的社会主义核心价值观编码、quipqiup等都在其中。注意：2023年01月09日发布的Ver:0.0.8.7已经支持了压缩包密码破解和下面的所有功能，Function的文档准备迁移至：https://docs.qsnctf.com/首次发布时间预计于2022年01月10日，敬请期待。如果您有好的想法和建议，欢迎与我取得联系：QQ：1044631097。文档其他语种：English函数库：使用说明安装首先将GitHub上的项目下载下来后可以文件中有一个setup.py打开终端然后输入pythonsetup.pyinstall或者也可以直接使用pip来进行安装**（由于本Python库仍在开发，所以pip可能不是最新版，如果您有较高的需求，可以直接clone本仓库进行安装）**pipinstallqsnctf安装成功会显示Successfully installed PyExecJS-1.5.1 qsnctf-0.0.4也可以使用以下命令来更新此库pipinstall--upgradeqsnctf如果你想知道具体怎么使用可以导入这个包，然后使用help(qsnctf)查看库的用法>>>importqsnctf
>>>help(qsnctf)Helponpackageqsnctf:

NAMEqsnctf

PACKAGECONTENTSbasecryptohashmainmiscuuid

FILEc:\users\xiniyi\appdata\local\programs\python\python39\lib\site-packages\qsnctf-0.0.4-py3.9.egg\qsnctf\__init__.py然后使用help(qsnctf.PACKAGE CONTENTS)来查看具体的使用方法演示查看base的使用方法>>>help(qsnctf.base)Helponmoduleqsnctf.baseinqsnctNAMEqsnctf.baseDESCRIPTION# Base编码解码功能# 2023年1月1日# 末心FUNCTIONSbase16_decode(text)base16_encode(text)base32_decode(text)base32_encode(text)base64_decode(text)base64_encode(text)base85_decode(text)>>>功能列表BASEbase16base32base36base58base62base64base85base91base92base100自定义base64CRYPTO凯撒密码凯撒爆破培根密码ROT5ROT13ROT18八卦密码埃特巴什码摩斯密码（支持自定义）MD5md5sha1sha224sha256sha384sha512shake128shake256HMAC-SHA256sha3-224sha3-256sha3-385sha3-512MISC核心价值观加密解密文本逆向url加密解密位异或文本逆向（步长2）文本逆向（自定义步长）获取uuidord转字符串字符串转ord字符串分割flag寻找百家姓编码Qwerty编码HTM编码JSFUCKAAencodestr2hexhex2strZIP密码爆破ZIP解压缩（高级）APIquipqiup词频分析飞书Webhook钉钉Talk微步在线FOFA大圣云沙箱零零信安Go-CQ-HTTPWEB目录扫描网站存活检测取网站标题子域名扫描取网站描述取网站关键字取网站ICP取网站a标签地址取网站注释取网站响应时间取网站ICOPOST WebshellGET Webshellexec-shelleval-shellWebShell爆破具体使用命令行使用第一步导入qsnctf库fromqsnctfimport*例如需要使用base64编码base64_encode("需要编码的")# 6ZyA6KaB57yW56CB55qE相同如果使用base64解码的话就是base64_decode("6ZyA6KaB57yW56CB55qE")# 需要编码的其他的编码解码类似编译器使用这里还是使用base64来演示，其他的编码解码类似。fromqsnctfimportqsnctfa=base64_encode("需要编码的")print(a)b=base64_decode("6ZyA6KaB57yW56CB55qE")print(b)返回信息需要编码的6ZyA6KaB57yW56CB55qEBase62的encode值应该是整数！fromqsnctfimportqsnctfa=base62_encode(34441886726)print(a)b=base62_decode("base62")print(b)传参方法文档移动到：Function.md环境开发环境Windows11 + Python3.11 + PyCharm 2022.3.1 (Professional Edition)使用环境支持python 3.x环境。文档持续更新。✨ Contributors感谢下面的所有人：Moxinxinyiyiye-yfs
Package: qsonic
Lightining-fast continuum fittingQSOnicis an MPI-parallelized, highly optimized quasar continuum fitting package for DESI built on the same algorithm aspicca, butfaster. It also provides an efficient API to read DESI quasar spectra.The key differencesCoadding of spectrograph arms can be performed after continuum fitting or disabled entirely.Continuum is multiplied by a fiducial mean flux when provided.You can pass fiducial var_lss (columnVAR_LSS) and mean flux (columnMEANFLUX) for observed wavelengthLAMBDAinSTATSextention of a FITS file. Wavelength should be linearly and equally spaced. This is the same format as rawio output from picca, exceptVARcolumn in picca is the variance on flux not deltas. We break away from that convention by explicitly requiring variance on deltas in a new column.If no fiducial is passed, we fit only for var_lss (no eta fitting by default). Eta fitting can be enabled, but is not recommended for Lya forest.Internal weights for continuum fitting and coadding are based on smoothedIVAR, and outputWEIGHTis based on this smoothed ivar. This smoothing can be turned off.Chi2 information as well as best fits are saved in continuum_chi2_catalog.fits. Chi2 is calculated using smooth ivar and var_lss, and does not subtract sum of ln(weights).SimilaritiesDelta files are the same.CONTcolumn is mean flux times continuum even when fiducial mean flux is passed.MEANSNRin header file and chi2 catalog is average of flux times square root of positive ivar values. Header values are per arm, but catalog values are the average over all arms.Eta fitting does not rescaleIVARoutput. Pipeline noise will be modified with explicit calibration option.
Package: qsp
Quantum State PreparationThis repository provides an implementation of various methods for preparing tensor network states (specifically, 1D tensor network states) on a quantum computer.To use the package, you first need to specify a list of NumPy arrays that represent the MPS. You can then
call different routines in the package to prepare the state.Installationpip install qspOne can also install the development version directly aspip install git+https://github.com/mohsin-0/qsp.git@mainTutorialUsage tutorialand somebenchmarksBasic Examplefromqsp.tspimportMPSPreparationimportnumpyasnpbond_dim,phys_dim=4,2L=10tensor_array=[np.random.rand(bond_dim,bond_dim,phys_dim)for_inrange(L)]tensor_array[0]=np.random.rand(bond_dim,phys_dim)# end points of mpstensor_array[-1]=np.random.rand(bond_dim,phys_dim)prep=MPSPreparation(tensor_array,shape='lrp')overlap,circ=prep.sequential_unitary_circuit(num_seq_layers=4)ReferencesEncoding of matrix product states into quantum circuits of one-and two-qubit gates,Shi-Ju Ran, Phys. Rev. A 101, 032310 (2020)Variational power of quantum circuit tensor networks,Reza Haghshenas, Johnnie Gray, Andrew C Potter,  and Garnet Kin-Lic Chan, Phys. Rev. X 12, 011047 (2022)Preentangling Quantum Algorithms--the Density Matrix Renormalization Group-assisted Quantum Canonical Transformation,Mohsin Iqbal,  David Munoz Ramo and Henrik Dreyer, arXiv preprint arXiv:2209.07106 (2022)Efficient adiabatic preparation of tensor network states,Zhi-Yuan Wei, Daniel Malz and Ignacio J. Cirac, Phys. Rev. Research 5, L022037 (2023)
Package: qsparse
QSPARSEQSPARSE provides the open source implementation of the quantization and pruning methods proposed inLearning Low-Precision Structured Subnetworks Using Joint Layerwise Channel Pruning and Uniform Quantization. This library was developed to support and demonstrate strong performance and flexibility among various experiments.Full PrecisionJoint Quantization4bitand Channel Pruning75%importtorch.nnasnnnet=nn.Sequential(nn.Conv2d(3,32,5),nn.ReLU(),nn.ConvTranspose2d(32,3,5,stride=2))importtorch.nnasnnfromqsparseimportprune,quantize,convertnet=nn.Sequential(quantize(nn.Conv2d(3,32,5),bits=4),nn.ReLU(),prune(sparsity=0.75,dimensions={1}),quantize(bits=8),quantize(nn.ConvTranspose2d(32,3,5,stride=2),bits=4))# Automatic conversion is available via `convert`.# Please refer to documentation for more details.InstallationQSPARSE can be installed fromPyPI:pipinstallqsparseUsageDocumentation can be accessed fromRead the Docs.Examples of applying QSPARSE to different tasks are provided atexamplesandmdpi2022.CitingIf you find this open source release useful, please reference in your paper:Zhang, X.; Colbert, I.; Das, S. Learning Low-Precision Structured Subnetworks Using Joint Layerwise Channel Pruning and Uniform Quantization. Appl. Sci. 2022, 12, 7829.https://doi.org/10.3390/app12157829@Article{app12157829,AUTHOR={Zhang, Xinyu and Colbert, Ian and Das, Srinjoy},TITLE={Learning Low-Precision Structured Subnetworks Using Joint Layerwise Channel Pruning and Uniform Quantization},JOURNAL={Applied Sciences},VOLUME={12},YEAR={2022},NUMBER={15},ARTICLE-NUMBER={7829},URL={https://www.mdpi.com/2076-3417/12/15/7829},ISSN={2076-3417}}
Package: qsparser
qsparserQuery string parser with nested structure supported.UsageStringifyfromqsparserimportstringify# simple objectstringify({'a':'5','b':'c'})# a=5&b=c# nested objectstringify({'a':{'b':'c'},'d':{'e':'f'}})# a[b]=c&d[e]=fParsefromqsparserimportparse# simple stringparse('a=5&b=c')# {'a': '5', 'b': 'c'}# multiple stringparse('a[b]=c&d[e]=f')# {'a': {'b': 'c'},'d': {'e': 'f'}}InstallationpipinstallqsparserChangelog1.1.0Rigid rules on string with null representing content.Use private function names.Authorqsparseris authored by Victor Teo and Chun Tse.LicenseMIT LicenseCopyright (c) 2021 Fillmula Inc.Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: qspd
This package implements Jeongwan Haah's algorithm for quantum signal processing as described in thispaper. It includes a step by step
algorithm that decomposes periodic functions (often from quantum signal processing) into a product of primitive matrices,
represented as a list of angles. The algorithmic complexity is O(N3polylog(N/𝜺)) where N is the degree of the
periodic function and 𝜺 is the precision parameter. The runtime bottleneck is a polynomial rootfinding in step 2. Haah
concludes that the error is at most the error input (=15𝜺).
DISCLAIMER: This is in initial investigation stages, and the usage is subject to change.
Package: qspec
qspecA python package for calculations surrounding laser spectroscopy.TheqspecPython package provides mathematical and physical functions
frequently used in laser spectroscopy but also more general methods for data processing.
Most functions are compatible with numpy arrays and are able to process n-dimensional arrays,
even in the case of arrays of vector- or matrix-objects. This enables fast calculations with large samples of data,
e.g., facilitating Monte-Carlo simulations.Exemplary, two exciting use cases could be:Coherently evolve atomic state population in a classical laser field.
In contrast to powerful packages such asqutip,
the quantum mechanical system is set up automatically by just providing atomic state and laser information.Generate modular lineshape models for fitting. The modular system can be used
to sum, convolve, link models and share parameters, fit hyperfine structure spectra, etc.Included modulestools: General helper, print, data shaping and mathematical functions.stats: Contains functions for the statistical analysis of data.physics: Library of physical functions.algebra: Contains functions to calculate dipole coefficients and Wigner-j symbols.analyze: Contains optimization functions and a class for King-plots.lineshapes: A framework to generate modular lineshape models for fitting.simulate: An intuitive framework to simulate laser-atom interactions.
Package: qspider
QSpiderAn easy to use tools module for writing multi-thread and multi-process programs.InstallQSpider could be easily installed using pip:$pipinstallqspiderExampleimportrequestsfromqspiderimportconcurrent# Define a source list for task function to parse.defget_source():"""Return a url list."""return['http://www.baidu.com'foriinrange(500)]# Define the task function and add a thread_func decorator# The thread_func decorator needs a source list, and other options (num_workers, has_result ...) as arguments@concurrent.thread_func(source=get_source(),num_workers=100,has_result=True)defmy_task(task_source):"""A customized task function.Process the task_source and return the processed results.Arguments:param task_source: the elem in the source list, which is a url here.:rtype: (int) A http status code."""url=task_sourceres=requests.get(url,timeout=5)returnres.status_code# Execute the task function.results=my_task()print(results)Results of the example is as below:[Info]500tasksintotal.[✔]100%━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━500/500[eta-0:00:00,0.9s,542.9it/s][200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,...,200,200,200,200]Releasesv0.1.1: First release with basic classes.v0.1.2: Reconstruct code, add ThreadManager, ProcessManager and other tool classes.v0.1.3: Fix multiprocess locking bug on Windows.v0.1.4:Add silent argument in manager._run method.Enhance the display style of the progress message.v0.1.5:Make task be either a class, a function or a class method.Add concurrent decorators for convenient use.Add concurrent decorator examples.v0.1.6:Update templates.Replace multiprocessing queue.Support with statement.Optimize displays in jupyter notebook and windows powershell.LicenseCopyright (c) 2020 tishacy.Licensed under theMIT License.
Package: qsql
PyQuickSQLFor a more thorough explanation seeexample.ipynbHow to use the query loader:importquicksqlasqqqueries=qq.LoadSQL('path/to/queries.sql')Printing the queries should give you something like this:LoadSQL('path/to/queries.sql')
Query Name: examplequery_1, Params: order_avg, num_orders
Query Name: examplequery_2, Params: sdate, edate, product_idThese are callable objects that return the string given the non-optional **params.They are equivalent to an f-string + a lambda but loaded from an sql file and stored in the LoadSQL object.print(str(queries))will give you the raw SQL string.How to use them:print(queries.examplequery_2(product_id=10,sdate='1-10-2022',edate=qq.NoStr("DATE'4-11-2023'"),something_not_a_param='test'))Unused variables: something_not_a_param in query examplequery_2Above will be printed as a warning with invalid inclusions, no non-verbose option yet.SELECTc.CustomerName,o.OrderDate,o.Status,(SELECTSUM(od.Quantity*od.UnitPrice)FROMOrderDetailsodWHEREod.OrderID=o.OrderID)ASTotalValueFROMCustomerscINNERJOINOrdersoONc.CustomerID=o.CustomerIDWHEREo.OrderDateBETWEEN'1-10-2022'ANDDATE'4-11-2023'ANDEXISTS(SELECT1FROMOrderDetailsodWHEREod.OrderID=o.OrderIDANDod.ProductID=10)ORDERBYTotalValueDESC;How to use the file cache:This is very similar to functool'scache, with the main difference being that@qq.file_cachecaches the asset to memory
and to you system's default temporary directory. If the memory cache ever fails (eg a restarted kernel) it will load the asset from it's pickled file.fromrandomimportrandintimportquicksqlasqq@qq.file_cache()deftest_mem(size:int):return[randint(0,10)for_inrange(size)]print(test_mem(8))[10, 3, 4, 9, 2, 2, 4, 2]print(test_mem(8))[10, 3, 4, 9, 2, 2, 4, 2]To clear the cache:qq.clear_cache()For more examples and how to configure seeexample.ipynb
Package: qsqla
qsqla===============================[![Build Status](https://travis-ci.org/blue-yonder/qsqla.svg?branch=master)](https://travis-ci.org/blue-yonder/qsqla)qSQLA is a query builder for SQLAlchemy Core SelectablesInstallation / Usage--------------------To install use pip:$ pip install qsqlaOr clone the repo:$ git clone https://github.com/blue-yonder/qsqla.git$ python setup.py installExample-------```pythonfrom sqlalchemy import create_engine, MetaData, Table, Column, Integer, Stringdb = create_engine("sqlite:////:memory:")md = MetaData(bind=db)table = Table('user',md,Column('id', Integer, primary_key=True),Column('name', String(16), nullable=False),Column('age', Integer))sel = table.select()from qsqla.query import query, build_filtersfilter =  build_filters({"id__eq":1})stm = query(sel, filter)```
Package: qs-qrcode
install:pip install qs-qrcodeusageuse in cmd:qsqrcode-lH-m唱歌不如跳舞-s400-b20-c#569932or if you did not install with pip:pythonqsqrcode.py-lH-m唱歌不如跳舞-s400-b20-c#569932and for more usage:qsqrcode-huse in python:fromqsqrcode.qrcodeimportQrcodeqr=Qrcode('test it')qr.generate('testpic/test.png')more usagefromqsqrcode.qrcodeimportQrcode# Qrcode 的第二个参数，L ≈ 7%容错，M ≈ 15%容错，Q ≈ 25%容错，H ≈ 30%容错Qrcode('test','L').generate('testpic/test7.png')Qrcode('test','M').generate('testpic/test8.png')Qrcode('test','Q').generate('testpic/test9.png')Qrcode('test','H').generate('testpic/testA.png')Qrcode('填充颜色','H').colour('#1294B8').resize(250).generate('testpic/test1.png')Qrcode('填充图片','H').paint('pic/testbg.jpg').resize(250).generate('testpic/test2.png')Qrcode('再看看如何加border','H').paint('pic/test.jpg').resize(230).set_border(10).generate('testpic/test3.png')Qrcode('测试二维码中间加入图片','H').put_img_inside('pic/mystic.png').resize(375).generate('testpic/test4.png')Qrcode('gif试试看，但效果并不好看，而且暂不支持set_border','H').fill_gif('pic/pla.gif').resize(250).generate('testpic/testD.gif')
Package: qsr
Simple Quick Screen RecordQuick Screen Record is The software that can help you record screen quickly.Usagefirst, install qsr, just typepip install qsron your terminalsecond, typeC:\Users\USER\AppData\Local\Programs\Python\Python39\Lib\site-packages\qsr\qsr.pyon your terminal to run the softwarelast, just follow what the command say, and yeah, now you can use itRequirementOperating systemx64 bitProcessorDisplay1280 x 960 - 1920 x 1080OtherSupportFollow Us OnÂ©2021  R Stu Team â”‚ All Right Reserved.
Package: qssimport
qssimportqssimport allows you to use multiple qt stylesheet files for a single project by merging those stylesheets into a main qss file. Simply create a base .qss file that defines 1 or more @import statements that point to other stylesheets.Installationsudo pip install qssimportUsageThebase_diris the path to the stylesheetsTheimport_deffile is assumed to be stored in the stylesheets directoryimport_defis file where all of the @imports need to be definedThemain_stylesheetis an optional argument that defines the name of the compiled stylesheet.
if a name is not provided, the program defaults to mainStyle.qssfrom qssimport import stylesheet
...
app = QApplication([])
  my_q_stylesheet = stylesheet.Stylesheet(base_dir='/path/to/stylesheets/',
                            import_def_file='imports.qss',
                            main_stylesheet='myStyle.qss')
app.setStyleSheet(my_q_stylesheet.load_stylesheet())
...ExampleGiven the following:import.qss@import "lineEdit.qss";
@import "widget.qss";lineEdit.qssQLineEdit{color:#FFF;}
QLineEdit{background:#A06;}widget.qssQWidget{background:#434343;}
QWidget#MyWidget{background:#909090;}The file you specified asmain_stylesheetwill contain all of the lines fromlineEdit.qssandwidget.qssmyStyle.qssQLineEdit{color:#FFF;}
QLineEdit{background:#A06;}
QWidget{background:#434343;}
QWidget#MyWidget{background:#909090;}