Metadata-Version: 2.4
Name: CANConfigPython
Version: 0.1.0a1
Summary: CAN device configuration CLI using a bundled Qt/WIICAN console backend
Author: CANConfigPython contributors
License: Python wrapper: MIT; bundled Console: GPL-3.0-or-later; other components: see THIRD_PARTY_NOTICES.md
Keywords: can,canconfig,canhub,serial
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
License-File: licenses/GPL-3.0.txt
License-File: licenses/Qt-5.7.1-LICENSE.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.FDL.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.GPL2.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.GPL3-EXCEPT.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.GPL3.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.GPLv3.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.LGPL3.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.LGPLv21.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.LGPLv3.txt
License-File: licenses/Qt-5.7.1-qtbase-LICENSE.PREVIEW.COMMERCIAL.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__angle__LICENSE.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__dxgi_support_data.json.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__load_functions_data.json.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__swizzle_format_data.json.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__texture_format_data.json.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__compiler__LICENSE.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__murmurhash__LICENSE.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__double-conversion__LICENSE.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__easing__easing.cpp.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__easing__legal.qdoc.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd_gcc.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__freebsd__0001-Patch-the-FreeBSD-strto-u-ll-functions-to-work-insid.patch.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoll.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoull.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__freetype__docs__LICENSE.TXT.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__no-copyright.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright-year.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz-ng__COPYING.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz__COPYING.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__libpng__LICENSE.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.cpp.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.cpp.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__pcre__COPYING.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__pcre__LICENCE.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__patches__0001-Fix-compilation-MSVC-warning-in-3rdparty-rfc6234.patch.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha-private.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha224-256.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha384-512.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha1__sha1.cpp.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32-rvk.macros.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32.macros.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-64.macros.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-int-set.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-interface.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32-settings.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64-settings.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-unrolling.macros.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.c.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__sha3__brg_endian.h.txt
License-File: licenses/Qt-5.7.1-qtbase-src__3rdparty__xkbcommon__COPYING.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.FDL.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.GPL2.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.GPL3-EXCEPT.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.GPL3.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.GPLv2.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.GPLv3.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.LGPL3.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.LGPLv21.txt
License-File: licenses/Qt-5.7.1-qtserialport-LICENSE.LGPLv3.txt
License-File: licenses/gcc-COPYING.RUNTIME.txt
License-File: licenses/gcc-COPYING3.LIB.txt
License-File: licenses/gcc-COPYING3.txt
License-File: licenses/linux-libc6-copyright.txt
License-File: licenses/linux-libcap2-copyright.txt
License-File: licenses/linux-libcom-err2-copyright.txt
License-File: licenses/linux-libdouble-conversion3-copyright.txt
License-File: licenses/linux-libgcc-s1-copyright.txt
License-File: licenses/linux-libglib2.0-0t64-copyright.txt
License-File: licenses/linux-libgssapi-krb5-2-copyright.txt
License-File: licenses/linux-libicu74-copyright.txt
License-File: licenses/linux-libk5crypto3-copyright.txt
License-File: licenses/linux-libkeyutils1-copyright.txt
License-File: licenses/linux-libkrb5-3-copyright.txt
License-File: licenses/linux-libkrb5support0-copyright.txt
License-File: licenses/linux-libpcre2-16-0-copyright.txt
License-File: licenses/linux-libpcre2-8-0-copyright.txt
License-File: licenses/linux-libqt5core5t64-copyright.txt
License-File: licenses/linux-libqt5network5t64-copyright.txt
License-File: licenses/linux-libqt5serialport5-copyright.txt
License-File: licenses/linux-libstdc++6-copyright.txt
License-File: licenses/linux-libudev1-copyright.txt
License-File: licenses/linux-libzstd1-copyright.txt
License-File: licenses/linux-packages.json
License-File: licenses/linux-zlib1g-copyright.txt
License-File: licenses/mingw-w64-COPYING.MinGW-w64-runtime.txt.txt
License-File: licenses/mingw-w64-COPYING.MinGW-w64.txt.txt
License-File: licenses/mingw-w64-COPYING.txt
License-File: licenses/qt-source-notices.json
License-File: licenses/winpthreads-COPYING.txt
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: build>=1; extra == "dev"
Requires-Dist: twine>=5; extra == "dev"
Requires-Dist: PyYAML>=6; extra == "dev"
Dynamic: license-file

# CANConfigPython

Python CLI and API for CANHub, CANFB, CANBridge, CANRPT and CANCOM configuration.
The package runs a bundled Qt console subprocess, which uses WIICAN. It does not
require a GUI installation or a separately installed Qt runtime.

**0.1.0a1 is a prerelease.** Windows wheels are tested with Python 3.8 x86 and
Python 3.12 x64; both run the bundled x86 runtime as a separate process.
The Linux x86_64 wheel requires glibc 2.38 or later and was built/tested on
Ubuntu 24.04 with Python 3.12 and Qt 5.15.13. The bundled runtime contains Console,
WIICAN and the required Qt/shared libraries. Consult VALIDATION.md and the release
evidence for installation checks. ARM64, macOS and musl are not supported.

~~~text
canconfig / Python Client
    -> CANConfigConsole.exe + WIICAN.dll           (Windows)
    -> CANConfigConsole + libWIICAN.so.1           (Linux)
~~~

## First use

Until the project is uploaded, install the supplied local wheel:
~~~console
python -m pip install path/to/canconfigpython-0.1.0a1-py3-none-win_amd64.whl
canconfig --version --json
canconfig doctor --json
canconfig docs export --output ./canconfig-docs
canconfig skill export --output ./canconfig-skill
~~~

After publication, use `python -m pip install --pre CANConfigPython`.
`doctor`, `schema`, `validate` and firmware `--dry-run` do not open hardware.
Configuration `info` and `--dry-run` do connect and may change the device run mode.

- [中文使用说明](src/canconfigpython/resources/docs/user-guide.zh-CN.md)
- [English user guide](src/canconfigpython/resources/docs/user-guide.en.md)
- [Agent Skill](src/canconfigpython/resources/skill/canconfig-python/SKILL.md)
- [Build and release](DEVELOPING.md)
- [Validation record](VALIDATION.md)
- [Third-party notices](THIRD_PARTY_NOTICES.md)

## Python API

~~~python
from canconfigpython import Client, ConfigError

client = Client()
try:
    result = client.execute("info", port="COM3")  # Linux: /dev/serial/by-id/...
except ConfigError as error:
    print(error.code, error.message)
else:
    print(result["exit_code"], result["effects"], result["verification"])
~~~

`execute(command, password=..., new_password=..., **options)` uses snake_case options
such as `expect_uid`, `dry_run`, and `timeout_ms`; its command names match the CLI.
Provide passwords from a secret store or prompt, not source code. Backend failures
return the full result; callers must check `ok` and `exit_code`.
Local validation/runtime errors raise `ConfigError`. The wrapper does not retry.

The Python layer uses only the standard library. Python 3.8+ is supported by syntax;
see the validation record for interpreter versions actually tested.

## License

The Python wrapper and project additions are MIT. The bundled Console incorporates
XinLi's GPL-3.0-or-later Ymodem implementation and is distributed under that license.
Its corresponding project source is included in every wheel as
`canconfigpython/resources/docs/native-source.tar.gz` (also exported by `canconfig docs export`).
Qt and compiler runtime components retain their own licenses. Materials and rebuild instructions are in
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). A runtime manifest checks bundle
consistency; it is not a publisher signature.
