Saravanan666/pypi-org huggingface dataset:
Package: gql-next
GQL: Python GraphQL Client LibraryIntroductionGQL is a GraphQL Client Python library intended to help Python application make GraphQL
API call while enjoying the advantages that come with GraphQL.Strongly Typedresponse objects (dynamically created in build time to match your query)Query Validationthat checks your code's queries against the GraphQL server's schema.InstallationSimply install from PyPi:pipinstallgql-nextThen go to your project folder and rungql initQuick Startgqlworks by parsing query files (**/*.graphqlby default) into their own Python module where
an class, named after the operation defined in the file, allows you to make that query and get a typed
response.For example, given the following fileget_film.graphqlfile:query GetFilm($id: ID!) {
  film(id: $id) {
    title
    director
  }
}Aget_film.pywill be created defining aGetFilmclass:# AUTOGENERATED file. Do not Change!fromtypingimportAny,Callable,Mapping,ListfromenumimportEnumfromdataclassesimportdataclassfromdataclasses_jsonimportdataclass_jsonfromgql.clientsimportClient,AsyncIOClient@dataclass_json@dataclassclassGetFilm:@dataclass_json@dataclassclassGetFilmData:@dataclass_json@dataclassclassFilm:title:strdirector:strfilm:Film=Nonedata:GetFilmData=Noneerrors:Any=None@classmethoddefexecute(cls,id:str,on_before_callback:Callable[[Mapping[str,str],Mapping[str,str]],None]=None)->GetFilm:...@classmethodasyncdefexecute_async(cls,id:str,on_before_callback:Callable[[Mapping[str,str],Mapping[str,str]],None]=None)->GetFilm:...Allowing you to make the GraphQL query:from.get_filmimportGetFilmresult=GetFilm.execute('meaning_of_life')film=result.data.filmImportant notes:Operations defined in graphql querymust be namedso that we can name the relevant Python Class which you can then import in your codeHow it worksThegqlclientgql initInitializes a project to use GQL as client - writes a .gql.json configuration file.gql runRun through your project's files and compile GraphQL queries into into Python types.gql watchUseful during development. Listen to file changes in your project's folder and continuously
builds GraphQL queries as they change.
This allows you to:Immediately verify query changes you make are valid.Enjoy your IDE's autocomplete features on GraphQL auto-generated objects while developing
aswatchwill auto-update them as you change queries.Sponsors
Package: gql-py
🌐🐍 gql_py-------*GraphQL Client for Pythonistas*gql_py is a Pythonic interface around graphQL APIs.You've got a graphQL API, and you want to talk to it, right? For those of us who love HTTP standards, GraphQL's use of HTTP is questionable at best. The goal of this library is to remove the fuss of HTTP so you can deal with graphQL directly. Just how graphQL's developers intended... image:: https://img.shields.io/pypi/v/gql_py.svg:target: https://pypi.org/project/gql-py/.. image:: https://img.shields.io/pypi/pyversions/gql_py.svg:target: https://pypi.org/project/gql-py/.. image:: https://img.shields.io/pypi/l/gql_py.svg:target: https://pypi.org/project/gql-py/.. image:: https://img.shields.io/pypi/status/gql_py.svg:target: https://pypi.org/project/gql-py/.. image:: https://circleci.com/gh/phalt/gql_py/tree/master.svg?style=svg:target: https://circleci.com/gh/phalt/gql_py/tree/masterInstalling the project is easy:.. code-block:: bashpip install gql_pyFull blown example:.. code-block:: pythonfrom gql_py import Gqlgql = Gql(api='https://example.com/graphql')query = '''query ($bookId: ID!) {book(id: $bookId) {idtitleauthor}}'''variables = {'book_id': '654'}response = qgl.send(query=query, variables=variables)response.ok>>> Trueresponse.errors>>> Noneresponse.data>>> {'book': {'id': '654', 'title': 'Ursula K. Le Guin', 'title': 'A Wizard of Earthsea'}}You can validate your graphql query string by passing the __validate__ flag in the __send__ method:.. code-block:: pythongpl.send(query=query, validate=True)>>> Traceback (most recent call last):>>>     graphql.error.syntax_error.GraphQLSyntaxError: Syntax Error: Expected Name, found }📖 Features--------- No need to handle the HTTP layer. (You can still set HTTP headers, though!)- Responses come back as named tuples - even errors!- Validate your query strings easily.- Python 3.6+✨ Future goals---------------- Hydrate API responses into custom Python objects.🏗 Status----------gql.py is currently under development.🎥 Credits-----------This package was created with Cookiecutter_.We use `Python Requests`_ for talking HTTP... _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`Python Requests`: https://github.com/audreyr/cookiecutter-pypackage
Package: gql-query-utils
gql-query-utilsPython package with graphql queries utilities.InstallInstall withpip:pip install gql-query-utilsUtilitiesConvert graphql query string into dictionaryfromgql_query_utils.utilsimportquery_to_dictquery_dict=query_to_dict("""query GetThisStuff {viewer {personal(criteria: {name: "PETER",lastName: "SCHMIDT"}) {nameaddress}}}""")print(query_dict)Output:{"query":{"viewer":{"personal":{"__args":{"criteria":{"name":"PETER","lastName":"SCHMIDT"}},"name":true,"address":true}}}}Usagefromgql_query_utils.utilsimportquery_to_dictquery_to_dict(""" ${GQL_QUERY}""")LicenseMIT
Package: gql-relay-result
gql-relayresultgql-relayresult is a simple result datastructure for GraphQL gql queries (https://pypi.org/project/gql/, working with the latest prerelase) which supports pagination so that it's easy to iterate through all pages like this:async for x in result:
    mylist.append(x["node"]["value"])The result must contain pageInfo based onhttps://graphql.org/learn/pagination/ExampleLet's say you have a GraphQL query like this:query = 
    """ 
    query getNumericValues($first: Int, $after: String) {
        numericValues(first: $first, after: $after) {
            pageInfo {
                hasNextPage,
                hasPreviousPage,
                startCursor,
                endCursor
            }
            edges {
                node {
                    value                          
                }
            }
        }
    }
    """Then you simply can execute the query and iterate through the resultset while the following result pages are automatically fetched when needed.from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
from gql_relay_result import GqlRelayResult

transport = AIOHTTPTransport(url=url)
client = Client(transport=self._transport, fetch_schema_from_transport=True)

gqlQuery = gql(query)
params = {"first": first}
data = await client.execute_async(gqlQuery, params)

result = GqlResult(data, gqlQuery, client.execute_async)


#now you can itereate through the result

actual = []
async for x in result:
    actual.append(x["node"]["value"])It's important that you work with query variables as theafterparameter is automatically replaced by theendCursorprovided in thepageInfostructure.All other parameters won't be changed.Providing a factory methodIf you don't want to access the resulting dictionary but create custom instances you can pass in a factory method.# using a lamda to create instances of type 'Data'
result = GqlRelayResult(result, gqlQuery, params, executor, lambda x: Data(x["node"]["value"]))

for x in result:
    self.assertIsInstance(x, Data)Querying child result setsIf your resulting data has child items which can be paged as well you may use the 'SubResult' class to query all remaining children
if you need the complete data at once.Just have a look at the 'test_that_resolve_nested_items_works' UnitTest there is an examplte to get an idea how it works.
Package: gqlrequests
gqlrequests - A Python library for creating GraphQL queries easier!Define GraphQL types in Python as dataclasses, then use them to automatically build queries!Note that these examples show what the end goal is, and that very few of these features have been developed yet!Examples of how it will work:fromdataclassesimportdataclassimportgqlrequests@dataclassclassEpisode:name:strlength:float@dataclassclassCharacter:name:strappearsIn:list[Episode]print(gqlrequests.Schema(Character))# type Character {#     name: String#     appearsIn: [Episode]# }#print(gqlrequests.Query(Character))# {#     name#     appearsIn {#         name#         length#     }# }print(gqlrequests.Query(Character,fields=["name"]))# {#     name# }print(gqlrequests.Query(Character,indents=2))# Default indent is 4# {#   name#   appearsIn {#     name#     length#   }# }print(gqlrequests.QueryMethod("get_character",Character,args={"name":"Luke"}))# get_character(name: "Luke") {#     name#     appearsIn {#         name#         length#     }# }appearsIn=gqlrequests.QueryMethod("appearsIn",Episode,args={"minLength":5})print(gqlrequests.Query(Character,fields=["name",appearsIn]))# {#     name#     appearsIn(minLength: 5) {#         name#         length#     }# }Future possible implementations:importgqlrequestsimportasyncio@dataclassclassEpisode:name:strlength:float@dataclassclassCharacter:name:strappearsIn:list[Episode]gqlclient=gqlrequests.Client(api_endpoint="api.example.com/gql",authorization="abcdefghijklmnopqrstuvwxyz")character=gqlclient.query(gqlrequests.Query(Character))assertisinstance(character,Character)# Asynchronous queriesasyncdefmain():gqlclient=gqlrequests.AsyncClient(api_endpoint="api.example.com/gql",authorization="abcdefghijklmnopqrstuvwxyz")queries=asyncio.gather(gqlclient.query(gqlrequests.Query(Character)),gqlclient.query(gqlrequests.Query(Episode)))character,episode=awaitqueriesassertisinstance(character,Character)assertisinstance(episode,Episode)# Or simply:character=awaitgqlclient.query(gqlrequests.Query(Character))asyncio.run(main())"""Subscribing to a graphql websocket"""importgqlrequestsimportasyncio@dataclassclassLiveViewers:viewers:intmeasurementTimeUnix:intasyncdefmain():gqlclient=gqlrequests.Client(api_endpoint="api.example.com/gql",authorization="abcdefghijklmnopqrstuvwxyz")query=gqlrequests.Query(LiveViewers)asyncwithgqlclient.subscribe(query)assubscription:asyncfordatainsubscription:assertisinstance(data,LiveViewers)print(data.viewers,data.measurementTimeUnix)ifdata.viewers<10:breakasyncio.run(main())
Package: gqltst
gqltstFramework for automatic GraphQL testing. The framework takes url of your GraphQL endpoint, builds schema and generates http queries for testing.Installationpip3 install gqltstUsagePrepare your schemaimportgqltstschema=gqltst.Schema("https://example.com")There're already prepared resolvers for Integer, String, Boolean, DateTime and Float, but you can register own resolver for your scalars.fromgqltst.typesimportBaseResolverclassYourResolver(BaseResolver):defresolve(self,context):yield"Hello world"defescape(self,value):return"\"%s\""%(str(value))defvalidate(self,data):returntype(data)==intschema.register_scalar("Myscalar",YourResolver)Start test with own parameter resolversfromgqltst.resloversimportrange_resolver,depend_resolverfromdatetimeimportdatetime,timedeltafromgqltst.typesimportValidationResultdefdate_resolver(context):now_date=datetime.now()forgenerated_datein[(now_date-timedelta(days=1)).strftime("%Y-%m-%d%H:%M:%S"),(now_date-timedelta(days=2)).strftime("%Y-%m-%d%H:%M:%S")]:yieldgenerated_dateargs={"environment":{"token":range_resolver(["token1","token2"]),"search":{"items":{"name":range_resolver(["name1",None,"name3"]),"surname":depend_resolver("$environment_search_items_name",None,["A","B"],[None]),"dateFrom":date_resolver,"records":{"first":range_resolver([0]),"step":range_resolver([1]),}}}}}deftest_validator(data,node):ifdata=="Paul":return[ValidationResult("It's not our manager",node,data))]else:return[]validators={"environment.items.surname":[test_validator,],}schema.test(args=args,validators=validators)DepensenciesPython HTTP Requests for Humans™ToDoStabilityBetter test result viewRefactoringMutations supportSpecific resolvers
Package: gqltype
DescriptionCurrently EXPERIMENTAL.gqltypeis a GraphQL schema generator from python type annotations.Featuressimple definition of GraphQL schema via python type annotationsbuilds schema based ongraphql-core>=3.0libraryasgi friendlyInstallationUsingpip$pipinstallgqltypeUsingpoetry$poetryaddgqltypeQuick introLet's say we want to model the schema mentioned at the beginning ofhttps://graphql.org/learn/schema/tutorial.fromdataclassesimportdataclassfromenumimportEnumfromtypingimportListimportgqltypeclassEpisode(Enum):"""Codename for the episodes"""NEWHOPE="new hope"EMPIRE="empire"JEDI="jedi"@dataclassclassCharacter:"""An individual person within the Star Wars universe"""name:strappears_in:List[Episode]classLengthUnit(Enum):"""Measure of length"""METER="meter"INCH="inch"@dataclassclassStarship:"""A single transport craft that has hyperdrive capability"""id:strname:strlength:floatdefresolve_length(self,unit:LengthUnit=LengthUnit.METER)->float:ifunit==LengthUnit.INCH:returnself.length/0.0254returnself.lengthdefget_character()->Character:returnCharacter(name="R2D2",appears_in=[Episode.JEDI,Episode.NEWHOPE])asyncdefget_starship()->Starship:returnStarship(id="F1000",name="Millennium Falcon",length=34.75)defadd_character(name:str,appears_in:List[Episode])->Character:returnCharacter(name=name,appears_in=appears_in)schema=gqltype.Schema(queries=[get_character,get_starship],mutations=[add_character])fromgraphql.utilitiesimportprint_schemaprint(print_schema(schema.build()))It'll produce the following outputtypeQuery{getCharacter:Character!getStarship:Starship!}"""AnindividualpersonwithintheStarWarsuniverse"""typeCharacter{appearsIn:[Episode!]!name:String!}"""Codenamefortheepisodes"""enumEpisode{NEWHOPEEMPIREJEDI}"""Asingletransportcraftthathashyperdrivecapability"""typeStarship{length(unit:LengthUnit!=METER):Float!id:ID!name:String!}"""Measureoflength"""enumLengthUnit{METERINCH}typeMutation{addCharacter(name:String!,appearsIn:[Episode!]!):Character!}In order to run server with this schema we can use Starletteif__name__=="__main__":importuvicornfromgqltype.contrib.starletteimportGraphQLAppfromstarlette.applicationsimportStarlettefromstarlette.routingimportRouteapp=Starlette(routes=[Route("/graphql",GraphQLApp(schema=schema))])uvicorn.run(app)Executing{getCharacter{nameappearsIn}getStarship{idnamelength(unit:INCH)}}gives{"data":{"getCharacter":{"name":"R2D2","appearsIn":["JEDI","NEWHOPE"]},"getStarship":{"id":"F1000","name":"Millennium Falcon","length":1368.1102362204724}}}TODOsanity checkswarn if class and resolve method specify different typesgeneric resolvers for certain types?gqltype.F ? -- field definitioncore part and high level partbusiness levelvalidation for input valuesserialization of output values
Package: gqrx-client
Gqrx SDR ClientThis is a small client library which allows you to interface with and remotely control a running instance of theGqrx SDRapplication.Usage# Import the Gqrx Client and some other relevant classesfromgqrx_clientimportGqrxClient,DemodulatorMode,GqrxClientError# Create a Gqrx Client instance and open the connectionclient=GqrxClient()client.open(addr=('127.0.0.1',7356))# Set and then retrieve the current frequencyclient.frequency=137912500print(f"The current frequency is:{client.frequency}")# Get the current demodulator mode + passband width values(mode,passband)=client.demodulator# Turn on the digital signal processing and start recordingclient.dsp=Trueclient.recording=TrueDocumentationView the latest generated documentation here.
Package: gqt
Build and execute GraphQL queries in the terminal.This project is inspired byhttps://graphiql-online.com.Installationpip3 install gqtIt’s recommended to installbatfor pretty output.ControlsPresshor?for help.ExamplesSet default GraphQL endpoint:export GQT_ENDPOINT=https://mys-lang.org/graphqlInteractively create a query and execute it:gqt{"statistics":{"numberOfGraphqlRequests":3}}Repeat last query:gqt -r{"statistics":{"numberOfGraphqlRequests":4}}Print the query (and variables) instead of executing it:gqt -qQuery:queryQuery{statistics{numberOfGraphqlRequests}}Variables:{}YAML output:gqt -ystatistics:numberOfGraphqlRequests:8Name queries:gqt -n stats -ystatistics:numberOfGraphqlRequests:8gqt -n time -ystandardLibrary:package:latestRelease:version:0.20.0gqt -n stats -y -rstatistics:numberOfGraphqlRequests:9gqt -n time -y -rstandardLibrary:package:latestRelease:version:0.20.0List queries:gqt -lEndpoint                      Query name
----------------------------  ------------
https://mys-lang.org/graphql  <default>
https://mys-lang.org/graphql  time
https://mys-lang.org/graphql  statsMake arguments variables by pressingvand give them as-v<name>=<value>on the command line:gqt -v name=time -ystandardLibrary:package:latestRelease:version:0.20.0gqt -r -qqueryQuery($name:String!){standardLibrary{package(name:$name){latestRelease{version}}}}Print the schema:gqt --print-schematypeQuery{standardLibrary:StandardLibrary!statistics:Statistics!activities:[Activity!]!}typeStandardLibrary{package(name:String!):Package!packages:[Package!]numberOfPackages:IntnumberOfDownloads:Int}...Enpoint option and bearer token in HTTP auth header:gqt -e https://api.github.com/graphql -H "Authorization: bearer ghp_<value>"IdeasPresscfor compact view, hiding fields that are not selected.Search:Press/to search for visible fields. Press<Up>and<Down>to move to the previous and next search hit. Highlight
all hits. Press<Enter>to end the search and move the cursor to
the current hit. Press<Esc>to abort the search and restore the
cursor to its pre-search position. Show number of hits.╭─ Query
│ ▼ search
│   ▶ Book
│     ■ title
│   ▶ Author
│     ■ name
│ ▶ film
│ ▶ films

/fil                                                1 of 2 matchesAlias?Pressato create an alias.Pressdto delete an alias.smallPictureandmediumPictureare aliases ofpicture.╭─ Query
│ ▶ Book
│   ▶ picture
│   ▼ smallPicture: picture
│     ■ width: 320
│     ■ height: 240
│   ▼ mediumPicture: picture
│     ■ width: 800
│     ■ height: 600Optionally give schema path on command line. For endpoints that does
not support schema introspection.
Package: gquant
gQuant - Graph Computation ToolkitWhat is gQuant?gQuant is a tool that helps you to organize the workflows.It define a TaskGraph file format.gq.yamlthat describes the workflow. It can be edited easily bygquantlabJupyterLab plugin.Dynamically compute the input-output ports compatibility, dataframe columns names and types, ports types to prevent connection errors.Nodes can have multiple output ports that can be used to generate different output types. E.g. some data loader Node provides bothcudfanddask_cudfoutput ports. The multiple GPUs distributed computation computation is automatically enabled by switching to thedask_cudfoutput port.Provides the standard API to extend your computation Nodes.The composite node can encapsulate the TaskGraph into a single node for easy reuse. The composite node can be exported as a regular gQuant node without any coding.gQuant can be extended by writing a plugin with a set of nodes for a particular domain. Checkpluginsfor examples.These examples can be used as-is or, as they are open source, can be extended to suit your environments.Binary pip installationTo install the gQuant graph computation library, run:pipinstallgquantOr installgquantat the root directory:pipinstall.gQuant node plugins can be registered in two ways:(Recommended)Write a external plugin using 'entry point' to register it. Check theexternaldirectory for detailsRegister the plugin ingquantrcfile. Check theSystem environmentfor detailsSystem environmentThere are a few system environment that the user can overwrite.The custom module files are specified in thegquantrcfile.GQUANT_CONFIGenviroment variable points to the location of this file. By default, it points to$CWD\gquantrc.In the examplegquantrc, system environment variableMODULEPATHis used to point to the paths of the module files.
To start the jupyterlab, please make sureMODULEPATHis set properly.
Package: gquote
GquoteUsing zen.io api this libary is able to generate Quote imagesusing pillow, Detects quote length and adjust text size accordingly.InstallUse pip to installpip install gquoteDepends on:pillowtextwraprequestsInstall using pip:pip install pillow textwrap requestsUsageThis libary was designed to be as customizable as possibleUse proxypass requests proxy format"protocol" : "address"fromgquoteimportgquoteimage=gquote(proxy={"https":"127.0.0.1:8080"}).run()Custom Background with Text ShadowYou can use custom background, Optionally pass Color from your backgroundIt will be used as text shadow, So text can be easily read,Also it will be used to calc background Intensty,Results in Text color From a contrast equationNote that Custom Backround Sizes allowed: 1080x1920, 1080x1350Color Format allowed: HEX, RGBfromgquoteimportgquoteimage=gquote(background="/home/xd/wqfdir.jpg",color="#ff00dd").run()Orfromurllib.requestimporturlretrievefromgquoteimportgquotebackground=urlretrieve('https://i.imgur.com/7pfR6Ua.png')[0]image=gquote(background=background,color=(0,0,0)).run()Change image shape/sizeYou can choose between two shapes portrait, or box sizefromgquoteimportgquoteimage=gquote(shape="box").run()# outputs 1080x1350Orfromgquoteimportgquoteimage=gquote(shape="portrait").run()# outputs 1080x1920Change output path or formatPass output format as name + .png, .jpg, .jpegCheckpillow supported image formats for morefromgquoteimportgquoteimage=gquote(output="/home/xd/cloud/quote.jpg").run()Export to MemoryFor faster output or Saving disk IO usage,you can save to Memory as BytesIO objectOptionally you can choose output formatby passing format var, default format is PNG,Later you can save image to disk bygetbuffer(),Make sure you use same format of the outputfromgquoteimportgquoteimage=gquote(output=False,format="jpg").run()withopen('quote.jpg','wb')asf:# .jpg same formatf.write(image.getbuffer())f.close()Use diffrent APIYou can change the api to your choice,also you can pass headers if api requires Auth.fromgquoteimportgquoteimage=gquote(base="https://yourapiofchoice.io/api/quote",headers={'Content-Type':'application/json','Accept':'*/*','Origin':'https://zenquotes.io','User-Agent':....}).run()Custom FontsYou can pass fonts path of your choice,ttf and otf formats are supported,Checkpillow docs for more supported formats,You have to pass list of two fonts to be used,one for the quote, other for the author text.fromgquoteimportgquoteimage=gquote(fonts=["/home/xd/ubutu-font.ttf","/home/xd/ubutu-font-italic.ttf"]).run()CreditsBig thanks to zenquotes.io for their amazing freeware apiDonationYou can support my work by donating to the following address,XMR -433CbZXrdTBQzESkZReqQp1TKmj7MfUBXbc8FkG1jpVTBFxY9MCk1RXPWSG6CnCbqW7eiMTEGFgbHXj3rx3PxZadPgFD3DXTHANKS KIND SOUL!Find me:xd22.me
Package: gqylpy-cache
gqylpy-cache如其名，gqylpy_cache实现缓存功能，由 GQYLPY 团队研发的一个框架，可缓存某个函数或某个类中定义的所有方法的返回值。你的程序中有一个函数会被多次调用，并且返回值不变，你会怎么做？为提高代码效率，你会先调用一次该函数并把返回值存到一个变量，之后就使用这个变量，而不是重复调用函数。是这样吗？你已经很不错了。但现在，我们要传授你一种比之更简明的方案，使用gqylpy_cache模块直接缓存函数返回值。gqylpy_cache有两种使用方式：当做元类使用，将缓存其元类实例中定义的所有方法的返回值；当做装饰器使用，将缓存被装饰函数的返回值。pip3 install gqylpy_cache缓存类中方法的返回值importgqylpy_cacheclassAlpha(metaclass=gqylpy_cache):...此时，类Alpha中定义的所有方法以及property属性，在被其实例调用一次后，返回值都将被缓存，缓存在__cache_pool__属性中。此后的每次调用，只要参数不变，都是直接从__cache_pool__中取值，不会重复执行相关代码，大幅减少程序功耗并提高代码可读性。上述缓存功能默认只作用于单个实例，每个实例都有自己的__cache_pool__属性，若希望Alpha的所有实例共享同一份缓存，可启用__shared_instance_cache__属性：classAlpha(metaclass=gqylpy_cache):__shared_instance_cache__=True设置类属性__shared_instance_cache__ = True后，属性__cache_pool__将被创建在Alpha类中，而不是Alpha的每个实例中。若希望某个方法或property不被缓存，可将其加入到__not_cache__列表中：classAlpha(metaclass=gqylpy_cache):__not_cache__=[method_obj_or_method_name,...]另外，Alpha的子类也拥有上述缓存功能。缓存函数返回值importgqylpy_cache@gqylpy_cachedefalpha():...此时，函数alpha在被调用一次后，其返回值将被缓存。此后的每次调用，只要参数不变，都是直接从缓存中取值，而不会重复执行alpha函数。装饰器的用法亦可获得单例类，只要实例化参数一致：@gqylpy_cacheclassAlpha:...另外一种兼容编辑器语法提示的用法：fromgqylpy_cacheimportcache@cachedefalpha():...
Package: gqylpy-command
gqylpy-command调用系统命令，它是对内置库 subprocess 的二次封装。在gcmd对象中，提供了多种方案用于判断命令调用结果是否如期。pip3 install gqylpy_command>>>fromgqylpy_commandimportgcmd>>>c=gcmd('hostname')>>>c.status_output(True,'Alpha')