Quick Start

Installation

flync_converter is included in the main flync package. For installation instructions, see Installation Guide.

Python API

from flync_converter import convert
from flync_converter import registry
import logging

# set your desired logging level
logging.basicConfig(level=logging.DEBUG)

# load plugins to get available converters
registry.load_plugins()


# default: convert from FLYNC
convert(
    source="path/to/flync_source",
    destination="path/to/output",
    destination_type="json",
)

# convert FLYNC to DBC
convert(
    source="path/to/flync_source",
    destination="path/to/dbc_output",
    destination_type="dbc",
)

# convert from YAML to FLYNC
convert(
    source="path/to/yaml_folder",
    destination="path/to/flync_output",
    source_type="yaml",
)

Next Steps

Multiple sources and outputs

Repeat source and destination on the same convert command. The sources are merged in order and the result is written to every destination. Sources must come before destinations:

flync-converter convert \
  source -p ./source_a -f flync \
  source -p ./source_b -f yaml \
  destination -p ./merged_json -f json \
  destination -p ./merged_yaml -f yaml

See CLI Reference for the conflict policy and the deprecated flat -s/-o form.