如何将列表转换为 JSON/dictionary - Python

How can I convert a list to JSON/dictionary - Python

我在处理答案时遇到了一些问题。

我想操作字典,因为它对我需要的东西更简单。

为了将其留在上下文中,基本上我要做的是获取与我需要的模块相关的状态。

如你所见returns很多模块的状态,但我只需要几个。

到目前为止,这是我的代码:

url = "http://adl-esbap01.uk.mizuho-sc.com:31800/eodHealthCheck/rest/eodhealthcheck/checkFlowStatusAndStartStoppedFlows?includeRunningFlowsInStatusReport=true&startStoppedFlows=false&outputAsJson=true"


goldenSource_modules = [
    "goldenSource-referenceData",
    "cdw-asset",
    "cdw-counterparty",
    "cdw-issuer",
    "cdw-referenceData",
    "murex-referenceData",
    "murex-referenceData-sa",
    "gloss-referenceData-sa",
]

bbg_modules = ["blbgToms-mhiTrade-sa", "blbgToms-derivativeTrade-sa", "blbgToms-eod"]
ion_FrontArena_Anvil = ["ion-trade-mhi", "frontArena-trade", "anvil-repoTrade"]
murex_modules = [
    "murex-derivativeTrade",
    "murex-debtTrade",
    "murex-equityTrade",
    "murex-feeTrade",
    "murex-repoTrade",
    "murex-fxTrade",
    "murex-derivativeTrade-mhi",
    "murex-derivativeTrade-mhbkldn",
    "murex-feeTrade-mhbkldn",
    "murex-fxTrade-mhbkldn",
    "murex-debtTrade-mhbkldn",
]

r = requests.get(url).text.replace("\n", "")
jsonObj = json.loads(r, strict=False)
# print(type(jsonObj))
#output: <class 'list'>


def check_flows(modules: list):
    flows = []
    for name in modules:
        for i in jsonObj:
            if i.startswith(name):
                values = jsonObj[name]
                flows.append([name[0], values])
                df = pd.DataFrame(flows, columns=["Flow", "Status"])
                df["Status"] = np.where(df["Status"] == "running",colored("running","green"),colored("stopped", "red"),)
    print(df)

响应列表:

[{
    'flowStatusSummary': 'Flows not running',
    'flowStatus': {
        'trax-tradeReporting-sa-Bond Executions Ack Processing Flow': 'stopped',
        'blbgToms-mhiTrade-sa-Bloomberg Trade Feed Consumer Flow': 'recovering',
        'murex-derivativeTrade-MurexOut CbOption Snapshot to BDM Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN Derivative Trade Consumer Flow': 'stopped',
        'blbgToms-eod-Issuer List Download Flow': 'stoppedInError',
        'murex-derivativeTrade-OTC Swap Metadata To Murex Flow': 'stopped',
        'goldenSource-referenceData-EsbGsSOIAdditions Limiting Flow': 'stopped',
        'goldenSource-referenceData-Credit Risk Report Publisher Flow': 'stopped',
        'anvil-repoTrade-EOD Trades Consumer Flow': 'recovering',
        'mhbkldn-trade-MHBK LDN OTC Response ILS Update Flow': 'stopped',
        'markitServ-trade-mhi-MarkitServ Listener Flow': 'stopped',
        'murex-fxTrade-FXSpot CmfTrade to Murex Flow': 'stoppedInError',
        'murex-repoTrade-Pledge MxML Consumer Flow': 'stoppedInError',
        'murex-derivativeTrade-MurexOut CDS Snapshot to BDM Flow': 'stopped',
        'goldenSource-referenceData-Credit Risk Report Consumer Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN ETD Trade Consumer Flow': 'stopped',
        'fidessa-trade-sa-Fidessa ETP FIX Consumer Flow': 'stopped',
        'cdw-trade-IRS Intraday Publisher': 'stopped',
        'cdw-trade-Exchange Traded Future Snapshot Publisher': 'stopped',
        'frontArena-trade-Mhi017 File Download Flow': 'recovering',
        'fidessa-trade-sa-MHSC BDM FIX Consumer Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN ETD Trade Postbook Flow': 'stopped',
        'trax-tradeReporting-sa-Trax Fix Ack Producer Flow': 'stopped',
        'frontArena-trade-Mhi010 Mars File Publisher Flow': 'stopped',
        'trax-tradeReporting-sa-Trax Mheu Fix Ack Consumer Flow': 'stopped',
        'murex-derivativeTrade-FRA To Murex Metadata Flow': 'stopped',
        'cdw-trade-FX Option Intraday Publisher': 'stopped',
        'murex-derivativeTrade-SWAP To Murex Metadata Flow': 'stopped',
        'murex-derivativeTrade-MurexOut Cap Floor Snapshot to BDM Flow': 'stopped',
        'cdw-trade-Fixed Income Bond Intraday Publisher': 'stopped',
        'murex-derivativeTrade-MurexOut FxOption Snapshot to BDM Flow': 'stopped',
        'cdw-trade-FRA Snapshot Publisher': 'stopped',
        'frontArena-trade-Mhi006 File Download Flow': 'recovering',
        'trax-tradeReporting-sa-Bond Quote Ack Email Processing Flow': 'stopped',
        'gloss-cashTrade-Auto Ack Publisher Flow': 'stopped',
        'frontArena-trade-Mhi010 File Download Flow': 'recovering',
        'fidessa-trade-FIX Messages Consumer Flow': 'stopped',
        'cdw-trade-Fixed Income Bond Snapshot Publisher': 'stopped',
        'blbgToms-eod-CMAR File Publisher Flow': 'recovering',
        'murex-fxTrade-FxSpot Transformer to BDM Flow': 'stoppedInError',
        'cdw-trade-Swaption Intraday Publisher': 'stopped',
        'gloss-cashTrade-MoneyMarket Transformer Flow': 'stopped',
        'cdw-trade-FX Spot Intraday Publisher': 'stopped',
        'frontArena-trade-Mhi012 File Download Flow': 'recovering',
        'mhbkldn-trade-MHBK LDN IRS BDM Consumer Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN FRA BDM Consumer Flow': 'stopped',
        'cdw-trade-FX Forward Snapshot Publisher': 'stopped',
        'trax-tradeReporting-sa-Bond Executions Bdm Consumer Flow': 'stoppedInError',
        'blbgToms-eod-Archive File Publisher Flow': 'recovering',
        'mhbkldn-trade-MHBK LDN FX Trade Postbook Flow': 'stopped',
        'trax-tradeReporting-sa-Bond Executions Consumer Flow': 'stopped',
        'trax-tradeReporting-sa-Trax Mhi Fix Ack Consumer Flow': 'stopped',
        'cdw-asset-Bulk Asset Publisher Flow': 'stoppedInError',
        'mhbkldn-trade-MHBK LDN FX Trade Consumer Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN Derivative Trade Publishing Flow': 'stopped',
        'fidessa-trade-BOI FIX Messages Publisher Flow': 'stopped',
        'fidessa-trade-Order Audit FIX Messages Consumer Flow': 'stopped',
        'murex-derivativeTrade-MurexOut TRS Snapshot to BDM Flow': 'stopped',
        'cdw-trade-FRA Intraday Publisher': 'stopped',
        'gloss-cashTrade-ExchTradedFuture Transformer Flow': 'stopped',
        'trax-tradeReporting-sa-Rts23 Trade Stashing Flow': 'stoppedInError',
        'mhbkldn-trade-MHBK LDN Swaption BDM Consumer Flow': 'stopped',
        'frontArena-trade-Mhi005 File Download Flow': 'recovering',
        'goldenSource-referenceData-BlbgHqlaResponseFile Flow': 'stopped',
        'cdw-trade-Swaption Snapshot Publisher': 'stopped',
        'gloss-cashTrade-Trade Export Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN APA FpML Consumer Flow': 'stopped',
        'murex-derivativeTrade-MurexOut Swaption Snapshot to BDM Flow': 'stopped',
        'cdw-trade-FX Forward Intraday Publisher': 'stopped',
        'blbgToms-derivativeTrade-sa-Bloomberg Derivative Feed Swap Messages Consumer Flow': 'recovering',
        'mhbkldn-trade-MHBK LDN SCF BDM Consumer Flow': 'stopped',
        'cdw-trade-Cap Floor Snapshot Publisher': 'stopped',
        'goldenSource-referenceData-Cmi2GsApprovedSecurity Flow': 'stopped',
        'goldenSource-referenceData-EsbGsSOIStatement Flow': 'stopped',
        'murex-repoTrade-RepoLoan MxML Consumer Flow': 'stoppedInError',
        'frontArena-trade-Mhi014 File Download Flow': 'stopped',
        'trax-tradeReporting-sa-JMS To FIX Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN SCF Trade Publishing Flow': 'stopped',
        'cdw-trade-Cap Floor Intraday Publisher': 'stopped',
        'murex-fxTrade-FXForward CmfTrade to Murex Flow': 'stoppedInError',
        'gloss-cashTrade-FxSwap Transformer Flow': 'stopped',
        'mhbkldn-trade-MHBK LDN CapFloor BDM Consumer Flow': 'stopped',
        'cdw-trade-CDS Snapshot Publisher': 'stopped',
        'blbgToms-eod-File Consumer Flow': 'stoppedInError',
        'cdw-trade-FX Spot Snapshot Publisher': 'stopped',
        'frontArena-trade-Mhi007a File Download Flow': 'recovering',
        'murex-derivativeTrade-MurexOut FxSwap Snapshot to BDM Flow': 'stopped',
        'murex-derivativeTrade-VNS To Murex Metadata Flow': 'stopped',
        'frontArena-trade-Mhi007b File Download Flow': 'recovering',
        'trax-tradeReporting-sa-Bond Execution Ack Email Processing Flow': 'stopped',
        'murex-fxTrade-FXSwap Aggregating and Publish To Murex Flow': 'stoppedInError',
        'goldenSource-referenceData-Cmi2GsPreapprovedSecurity Flow': 'stopped',
        'frontArena-trade-Mars Missed File Delivery Notifier Flow': 'stopped',
        'ion-trade-mhi-ION consumer flow': 'stopped',
        'fidessa-trade-Fidessa Download Files Flow': 'stopped',
        'murex-derivativeTrade-MurexOut FxForward Snapshot to BDM Flow': 'stopped',
        'cdw-trade-Exchange Traded Future Intraday Publisher': 'stopped',
        'fidessa-trade-FIX Admin Flow': 'stopped',
        'gloss-cashTrade-FxSpot Transformer Flow': 'stopped',
        'cdw-trade-IRS Snapshot Publisher': 'stopped',
        'murex-referenceData-sa-Murex SOI Consumer Flow': 'stoppedInError',
        'mhbkldn-trade-MHBK LDN APA Reporting Publishing Flow': 'stopped',
        'cdw-trade-FX Option Snapshot Publisher': 'stopped',
        'goldenSource-referenceData-EsbGsSOIAdditions Flow': 'stopped',
        'murex-referenceData-Bulk Approved Asset Consumer Flow': 'stopped',
        'fidessa-trade-sa-Fidessa ETP FIX Publisher Flow': 'stopped',
        'cdw-trade-CDS Intraday Publisher': 'stopped',
        'murex-referenceData-sa-Murex Pool-factor Chunk Preparation Flow': 'stoppedInError'
    }
}, {
    'flowStatusSummary': 'Errors encounters',
    'flowStatus': {
        'markitServ-trade-mhbkldn': '\n<br/>Not able to identify flows status from URL [http://svc-esb04u:30270/markitServ-trade-mhbkldn]',
        'trax-tradeReporting': '\n<br/>Not able to identify flows status from URL [http://svc-eai08u:8080/trax-tradeReporting]'
    }
}, {
    'flowStatusSummary': 'Flows running',
    'flowStatus': {
        'mtn-trade-MTN to Bloomberg Publishing Flow': 'running',
        'murex-derivativeTrade-MurexOut FxOption to BDM Flow': 'running',
        'gloss-cashTrade-FeeTrade Transformer Flow': 'running',
        'blbgToms-mhiTrade-sa-Prebook Bond Inbound Flow': 'running',
        'murex-equityTrade-Equity Order Flow': 'running',
        'goldenSource-referenceData-GsEsbApprovedIssuer Consumer Flow': 'running',
        'markitServ-trade-mhi-MarkitServ Recovery Flow': 'running',
        'murex-debtTrade-mhbkldn-ExchTradedOption Transformer to BDM Flow': 'running',
        'blbgToms-mhiTrade-sa-Master Ticket Housekeeping Flow': 'running',
        'fidessa-trade-FIX Messages Publisher Flow': 'running',
        'murex-derivativeTrade-MurexOut CbOption to BDM Flow': 'running',
        'goldenSource-referenceData-GsEsbApprovedSecurity Transformer Flow': 'running',
        'gloss-cashTrade-Agency Lending Consumer Flow': 'running',
        'ion-trade-mhi-Trade filtering and routing': 'running',
        'blbgToms-mhiTrade-sa-Ack Nack Flow': 'running',
        'trax-tradeReporting-sa-Rts23 Trax Response Consumer Flow': 'running',
        'blbgToms-mhiTrade-sa-Allocations Flow': 'running',
        'frontArena-trade-Cmf Sensitivities Publisher Flow': 'running',
        'anvil-repoTrade-Eod Trades Publisher Flow': 'running',
        'frontArena-trade-Mhi014 File Publisher Flow': 'running',
        'gloss-referenceData-sa-Bulk Asset Pool Factor Publisher Flow': 'running',
        'gloss-referenceData-sa-Asset Transformer Flow': 'running',
        'frontArena-trade-Mhi007a File Publisher Flow': 'running',
        'blbgToms-mhiTrade-sa-Fix Inbound Flow': 'running',
        'gloss-cashTrade-RepoLoan Transformer Flow': 'running',
        'murex-debtTrade-mhbkldn-ExchTradedOption Trade To Murex Flow': 'running',
        'murex-derivativeTrade-XVA Valuations to Murex Flow': 'running',
        'murex-equityTrade-Equity MxML Consumer Flow': 'running',
        'blbgToms-eod-DCM List Download Flow': 'running',
        'frontArena-trade-Mhi012Recs File Publisher Flow': 'running',
        'murex-repoTrade-RepoLoan Transformer to BDM Flow': 'running',
        'frontArena-trade-Mhi007b Murex File Publisher Flow': 'running',
        'gloss-referenceData-sa-Counterparty Secondary Splitter Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut Cap Floor to Intraday Collection Flow': 'running',
        'ion-trade-mhi-Bonds transformation flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut IRS to Intraday Collection Flow': 'running',
        'murex-referenceData-Counterparty Flow': 'running',
        'goldenSource-referenceData-GsEsbApprovedClient Transformer Flow': 'running',
        'murex-debtTrade-Convertible Bond Flow': 'running',
        'gloss-referenceData-sa-SSI Alert Transformer Flow': 'running',
        'murex-repoTrade-Repo Loan Fpml Non Exclusion BD Validation Flow': 'running',
        'frontArena-trade-Mhi010 Email Publisher Flow': 'running',
        'gloss-cashTrade-Equity Transformer Flow': 'running',
        'fidessa-trade-sa-Fidessa ETP Book Stash Housekeeping Flow': 'running',
        'murex-referenceData-Geo Units Flow': 'running',
        'markitServ-trade-mhi-MarkitServ IRS Transformation Flow': 'running',
        'gloss-cashTrade-ETF Transformer Flow': 'running',
        'murex-derivativeTrade-mhi-Vns To Murex Trade Flow': 'running',
        'blbgToms-derivativeTrade-sa-CmfSwap Message Filter Flow': 'running',
        'goldenSource-referenceData-GsEsbApprovedClient Consumer Flow': 'running',
        'murex-derivativeTrade-MurexOut Cap Floor to BDM Flow': 'running',
        'murex-equityTrade-Etf Transformer to BDM Flow': 'running',
        'gloss-referenceData-sa-Asset Pool Factor Publisher Flow': 'running',
        'murex-fxTrade-FXSwap Leg Housekeeping Flow': 'running',
        'murex-derivativeTrade-mhi-Swap To Murex Trade Flow': 'running',
        'gloss-cashTrade-Gloss Transaction Publisher Flow': 'running',
        'murex-feeTrade-mhbkldn-Fee Trade Transformer To BDM Flow': 'running',
        'markitServ-trade-mhi-MarkitServ Deal Retrieval Flow': 'running',
        'murex-derivativeTrade-MurexOut FRA Snapshot to BDM Flow': 'running',
        'blbgToms-mhiTrade-sa-Unordered Trade Capture Flow': 'running',
        'fidessa-trade-sa-MHSA BDM Consumer Flow': 'running',
        'murex-equityTrade-Equity Filter Flow': 'running',
        'markitServ-trade-mhi-MarkitServ Basis Swap Transformation Flow': 'running',
        'murex-derivativeTrade-XVA Valuation Collection Splitter Flow': 'running',
        'blbgToms-derivativeTrade-sa-BBG Message Filter Flow': 'running',
        'anvil-repoTrade-Agency Lending Transformer Flow': 'running',
        'blbgToms-mhiTrade-sa-Ordered Trade Capture Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut FxSwap to BDM Flow': 'running',
        'murex-feeTrade-FeeTrade Transformer to BDM Flow': 'running',
        'cdw-referenceData-GeoUnits Publisher': 'running',
        'blbgToms-mhiTrade-sa-Ack Housekeeping Flow': 'running',
        'gloss-cashTrade-Cash Transformation Flow': 'running',
        'murex-derivativeTrade-MurexOut IRS to BDM Flow': 'running',
        'blbgToms-mhiTrade-sa-Nack Publishing Flow': 'running',
        'gloss-referenceData-sa-Account Transformer Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut Swaption to BDM Flow': 'running',
        'frontArena-trade-Mhi010 File Publisher Flow': 'running',
        'fidessa-trade-sa-OA FIX To XML Transform Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut FRA to Intraday Collection Flow': 'running',
        'cdw-issuer-Issuer Publisher': 'running',
        'markitServ-trade-mhi-MarkitServ Filtering Flow': 'running',
        'murex-referenceData-Issuer Flow': 'running',
        'gloss-referenceData-sa-Bulk Asset Consumer Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut Swaption to Intraday Collection Flow': 'running',
        'goldenSource-referenceData-GsEsbLegalAgreement Transformer Flow': 'running',
        'murex-referenceData-sa-Murex SOI Publisher Flow': 'running',
        'trax-tradeReporting-sa-Rts23 Trax Response Processing Flow': 'running',
        'murex-derivativeTrade-Swap To Murex Trade Flow': 'running',
        'gloss-referenceData-sa-SSI Alert Publisher Flow': 'running',
        'frontArena-trade-Mhi012 File Publisher Flow': 'running',
        'frontArena-trade-Mhi017 Murex File Publisher Flow': 'running',
        'murex-fxTrade-mhbkldn-Fx Swap To Murex Flow': 'running',
        'ion-trade-mhi-Database Cleanup Flow': 'running',
        'goldenSource-referenceData-GsEsbApprovedSecurity Consumer Flow': 'running',
        'gloss-referenceData-sa-Bulk Asset Publisher Flow': 'running',
        'murex-debtTrade-MurexOut FixedIncome to BDM Flow': 'running',
        'cdw-referenceData-LegalAgreement Publisher': 'running',
        'murex-debtTrade-Bond CmfTrade to Murex Flow': 'running',
        'murex-fxTrade-mhbkldn-Fx Spot To Murex Flow': 'running',
        'murex-debtTrade-Future CmfTrade to Murex Flow': 'running',
        'murex-derivativeTrade-MurexOut IRS Snapshot to BDM Flow': 'running',
        'murex-derivativeTrade-mhbkldn-OTC Swap To Murex Flow': 'running',
        'trax-tradeReporting-sa-Rts23 Trax Publisher Flow': 'running',
        'murex-debtTrade-MurexOut ExchTradedFuture to BDM Flow': 'running',
        'goldenSource-referenceData-GsEsbGeoUnits Transformer Flow': 'running',
        'markitServ-trade-mhi-MarkitServ VNS Transformation Flow': 'running',
        'goldenSource-referenceData-Bulk GsEsbApprovedSecurity Consumer Flow': 'running',
        'frontArena-trade-CBOption FIX Flow': 'running',
        'blbgToms-mhiTrade-sa-Prebook Future Inbound Flow': 'running',
        'cdw-asset-Bulk Asset Consumer Flow': 'running',
        'gloss-cashTrade-ConvertibleBond Transformer Flow': 'running',
        'murex-derivativeTrade-mhbkldn-VNS To Murex Trade Flow': 'running',
        'gloss-referenceData-sa-Asset Consumer Flow': 'running',
        'anvil-repoTrade-bdm Publisher Flow': 'running',
        'ion-trade-mhi-Swaps Acks Processing': 'running',
        'murex-equityTrade-Equity Transformer to BDM Flow': 'running',
        'murex-derivativeTrade-XVA Trade to Murex Flow': 'running',
        'frontArena-trade-Mhi007b File Publisher Flow': 'running',
        'trax-tradeReporting-sa-Trax EOD Status Flow': 'running',
        'trax-tradeReporting-sa-Rts23 Housekeeping Flow': 'running',
        'anvil-repoTrade-Repo Trade Transformer Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut FRA to BDM Flow': 'running',
        'goldenSource-referenceData-GsEsbGeoUnits Consumer Flow': 'running',
        'murex-derivativeTrade-OTC Swap To Murex Flow': 'running',
        'murex-derivativeTrade-MurexOut FxSwap to BDM Flow': 'running',
        'cdw-asset-Asset Publisher Flow': 'running',
        'gloss-referenceData-sa-Asset Publisher Flow': 'running',
        'blbgToms-mhiTrade-sa-Fix Outbound Flow': 'running',
        'cdw-referenceData-Calendar Publisher': 'running',
        'murex-referenceData-Asset Approved Publisher Flow': 'running',
        'murex-repoTrade-Pledge Transformer to BDM Flow': 'running',
        'murex-debtTrade-mhbkldn-ExchTradedFuture Transformer to BDM Flow': 'running',
        'murex-derivativeTrade-mhbkldn-Swap To Murex Trade Flow': 'running',
        'blbgToms-eod-CMAR Report Publisher Flow': 'running',
        'murex-debtTrade-mhbkldn-ExchTradedFuture Trade To Murex Flow': 'running',
        'murex-fxTrade-mhbkldn-Fx Forward To Murex Flow': 'running',
        'murex-referenceData-sa-Murex Pool-factor Chunk Download Flow': 'running',
        'trax-tradeReporting-sa-Trax Sla Alert Flow': 'running',
        'gloss-referenceData-sa-Bulk Asset Transformer Flow': 'running',
        'murex-referenceData-Legal Agreement Flow': 'running',
        'murex-derivativeTrade-MurexOut FRA to BDM Flow': 'running',
        'murex-debtTrade-MoneyMarket Transformer to BDM Flow': 'running',
        'gloss-cashTrade-Gloss FinancingTransaction Publisher Flow': 'running',
        'goldenSource-referenceData-GsEsbLegalAgreement Consumer Flow': 'running',
        'murex-debtTrade-ConvertibleBond Transformer to BDM Flow': 'running',
        'murex-derivativeTrade-MurexOut TRS to BDM Flow': 'running',
        'mtn-trade-Bloomberg to MTN Acknowledge Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut Cap Floor to BDM Flow': 'running',
        'murex-debtTrade-MurexOut ExchTradedFuture Snapshot to BDM Flow': 'running',
        'markitServ-trade-mhi-MarkitServ Cross Currency Swap Transformation Flow': 'running',
        'frontArena-trade-Mhi017 File Publisher Flow': 'running',
        'murex-debtTrade-ConvertibleBond MxML Consumer Flow': 'running',
        'blbgToms-mhiTrade-sa-Missing Trades Acks Flow': 'running',
        'ion-trade-mhi-Orphaned Trade Flow': 'running',
        'murex-derivativeTrade-mhi-FRA To Murex Trade Flow': 'running',
        'murex-fxTrade-mhbkldn-FxSpot Transformer to BDM Flow': 'running',
        'murex-feeTrade-mhbkldn-Fee Trade Mxml Transformer To Mongo Intraday Collection Flow': 'running',
        'anvil-repoTrade-Arts Repo Trade Consumer Flow': 'running',
        'ion-trade-mhi-Publishing trades to TOMS flow': 'running',
        'cdw-asset-Asset Consumer Flow': 'running',
        'murex-derivativeTrade-FRA To Murex Trade Flow': 'running',
        'fidessa-trade-FIX Messages Transformation Flow': 'running',
        'frontArena-trade-Mhi010 File To Pojo Flow': 'running',
        'blbgToms-derivativeTrade-sa-Bloomberg Derivative Feed Swap Message Transformation Flow': 'running',
        'ion-trade-mhi-Product to MHI FpML transformation flow': 'running',
        'frontArena-trade-Mhi007a Email Publisher Flow': 'running',
        'frontArena-trade-Mhi005 Email Publisher Flow': 'running',
        'frontArena-trade-Mhi019 File Download Flow': 'running',
        'ion-trade-mhi-Bloomberg TOMS gate flow': 'running',
        'ion-trade-mhi-Swaps transformation flow': 'running',
        'frontArena-trade-Mhi006 File Publisher Flow': 'running',
        'murex-repoTrade-Repo Flow': 'running',
        'murex-referenceData-Bulk Asset Approved Publisher Flow': 'running',
        'gloss-cashTrade-FixedIncome Transformer Flow': 'running',
        'murex-equityTrade-Etf CmfTrade to Murex Flow': 'running',
        'murex-derivativeTrade-MurexOut CDS to BDM Flow': 'running',
        'frontArena-trade-Mhi019 File Publisher Flow': 'running',
        'goldenSource-referenceData-EsbGsSOIAdditions Housekeeping Flow': 'running',
        'frontArena-trade-Mhi005 File Publisher Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut FxForward to BDM Flow': 'running',
        'blbgToms-mhiTrade-sa-Trade Capture Routing Flow': 'running',
        'trax-tradeReporting-sa-Rts23 Report Consumer Flow': 'running',
        'gloss-referenceData-sa-Counterparty Publisher Flow': 'running',
        'markitServ-trade-mhi-MarkitServ Zero Coupon Swap Transformation Flow': 'running',
        'gloss-referenceData-sa-Counterparty Splitter Flow': 'running',
        'murex-equityTrade-Equity Allocation Flow': 'running',
        'blbgToms-mhiTrade-sa-Bloomberg Trade Feed Message Transformation Flow': 'running',
        'trax-tradeReporting-sa-Rts23 Report Scheduler Flow': 'running',
        'goldenSource-referenceData-Bulk GsEsbApprovedSecurity Transformer Flow': 'running',
        'murex-derivativeTrade-mhbkldn-MurexOut IRS to BDM Flow': 'running',
        'murex-derivativeTrade-MurexOut FxForward to BDM Flow': 'running',
        'markitServ-trade-mhi-MarkitServ Fra Transformation Flow': 'running',
        'murex-referenceData-Approved Asset Consumer Flow': 'running',
        'frontArena-trade-CBOption Transformation Flow': 'running',
        'murex-derivativeTrade-mhbkldn-FRA To Murex Trade Flow': 'running',
        'murex-equityTrade-Etf MxML Consumer Flow': 'running',
        'trax-tradeReporting-sa-TRS Trades messages Transformation Flow': 'running',
        'trax-tradeReporting-sa-Bond Quotes Consumer Flow': 'running',
        'cdw-counterparty-Counterparty Publisher': 'running',
        'murex-debtTrade-MurexOut FixedIncome Snapshot to BDM Flow': 'running',
        'goldenSource-referenceData-GsEsbApprovedIssuer Transformer Flow': 'running',
        'gloss-cashTrade-RepoLoan Consumer Flow': 'running',
        'ion-trade-mhi-Product to CmfSwap transformation flow': 'running',
        'murex-derivativeTrade-VNS To Murex Trade Flow': 'running',
        'murex-referenceData-sa-Murex Pool Factor Publisher Flow': 'running',
        'murex-derivativeTrade-MurexOut Swaption to BDM Flow': 'running',
        'gloss-referenceData-sa-SSI Alert Consumer Flow': 'running',
        'goldenSource-referenceData-ESB GS Unvalidated Asset Flow': 'running'
    }
}]

我看到你在列表中有 dict。

所以你可以使用这个

    [new_list] = [['a','b','c','d']]
    print(new_list)

输出:

    ['a','b','c','d']

您可以使用 dict.pop()

从字典中删除键