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.0rc1.tar.gz (22.9 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.0rc1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dcc_json_toolkit-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 836687ef83b42094a6b528163be59ac36a9117b00573a6677abffa3326583e1f
MD5 d3fe9da582d6ffc8dd064f8174b5b96a
BLAKE2b-256 cf3fd81febd58fdfb735e53bbcb965b2ab7dfa62b6cc6dcb819c8fd295b94cde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dcc_json_toolkit-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d7f42650ffcbeeadcc9fec5ce83d3c02f46ea3fb08ba84f704ace0df2894a36
MD5 e8e8fa55ffafa86bed9aed95c7151d51
BLAKE2b-256 3a5008d302da9cfe3df5d40fcd4b442f487466dd5d9a886ad4b343b8765481ea

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