Skip to main content

Converter to extract data out of DCC (.xml) files, exporting it as a python dict or a .json file.

Project description

Dcc-Json Toolkit

This package is a rework of dccXMLJSONConv.

DccJsonToolkit offers a set of tools for both users and developers.

pipeline status coverage Docs

User Tools

File conversion DCC —> JSON

dcc2json <INPUT_FILE> [-o <OUTPUT>] [--no-cache]

File conversion JSON —> DCC

json2dcc <INPUT_FILE> [-o <OUTPUT>] [--no-cache]

DCC Validation (schematron)

dcc-validate <DCC_FILE> [-v VERSION] [--ignore-cache]

Cache Manager

dcc-cache [<VERSION>] <--show | --add | --update | --clean>

Developer Tools

If you plan to integrate some of the functionality onto your own code, all functionalities can be recreated with the use of DccSchema.

from dcc_json_toolkit import DccSchema

schema = DccSchema("3.3.0")

After initializing a schema, you can convert any DCC file into a dictionary:

dcc_path = "./path/to/dcc.xml"
dcc_as_dict = schema.to_dict(dcc_path)

Or you can scan all errors within a specific file:

if not schema.is_valid(dcc_path):
    errors_in_dcc = schema.validate_dcc(dcc_path, concise=True)
    print("Errors found at the DCC:")
    print("\t* " + "\n\t* ".join(errors_in_dcc))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dcc_json_toolkit-1.0.0rc0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcc_json_toolkit-1.0.0rc0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file dcc_json_toolkit-1.0.0rc0.tar.gz.

File metadata

  • Download URL: dcc_json_toolkit-1.0.0rc0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for dcc_json_toolkit-1.0.0rc0.tar.gz
Algorithm Hash digest
SHA256 fb3da6f30cd6befa0bcac006108459a5070ee59b9df5bb103de7775d2bcde9c9
MD5 ce5ec9f18bc598e04ead2573a0513b5d
BLAKE2b-256 1f3f0adb6400047d5fe54d3a9aeb4f6570a63c07733e9f8c950fe9e8655c1723

See more details on using hashes here.

File details

Details for the file dcc_json_toolkit-1.0.0rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for dcc_json_toolkit-1.0.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ef00d6ece062c123759d75c12aad30d08cc549f4951fbcbabe847fbd88ba6de
MD5 8273ba39637c6e441f66748384a800c7
BLAKE2b-256 9c026752f806c570638580fe48c32eb4501dcd612f283354b0831207c0705379

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page