CkPython vs. Chilkat2-Python
Chilkat provides two Python modules. Both are the same Chilkat library underneath — the same classes, methods, and properties, released together with the same version number — but they present that library to Python in two different styles. This page explains the difference and which one to choose.
pip install chilkat2,
import chilkat2). It has a natural Python API: properties are Python properties,
methods return values directly, and binary data is handled with standard Python bytes-like objects.
CkPython (pip install chilkat, import chilkat) is the original
module. It remains fully supported and receives every new class and method, so an existing CkPython
application does not need to be converted.
Where they came from
CkPython is the original Chilkat module for Python. It was produced for many years with
SWIG, which wraps the Chilkat C++ classes more or less as-is,
so the API has a C++ flavor: properties are accessed through get_Xxx() and
put_Xxx() methods, and a method that returns a string has two forms — one that
fills a CkString argument and returns a bool, and a lower-case-initial one that returns
the Python str.
Chilkat2-Python was introduced later as a fresh, hand-designed Python API for the same library. It has never used SWIG: it is generated directly from the Chilkat API definition by Chilkat's own generator.
As of Chilkat v11.6.1, CkPython no longer uses SWIG. It is now produced by the same kind of in-house generator as Chilkat2-Python. Its API was kept exactly the same, so this changed nothing for existing code, but the two modules are now built the same way and have the same platform and Python-version coverage (see the table below).
The difference in code
CkPython (import chilkat)
import chilkat
imap = chilkat.CkImap()
imap.put_Ssl(True)
imap.put_Port(993)
success = imap.Connect("imap.example.com")
if not success:
print(imap.lastErrorText())
Chilkat2-Python (import chilkat2)
import chilkat2
imap = chilkat2.Imap()
imap.Ssl = True
imap.Port = 993
success = imap.Connect("imap.example.com")
if not success:
print(imap.LastErrorText)
The class, method, and property names are the same in both modules, and both follow the Chilkat reference documentation. What differs is the Python spelling:
| CkPython | Chilkat2-Python | |
|---|---|---|
| Import | import chilkat | import chilkat2 |
| Class names | chilkat.CkHttp, chilkat.CkZip, chilkat.CkBinData |
chilkat2.Http, chilkat2.Zip, chilkat2.BinData |
| Properties | obj.get_Port(), obj.put_Port(993), obj.lastErrorText() |
obj.Port, obj.Port = 993, obj.LastErrorText |
| Methods returning a string | Two forms: ok = http.QuickGetStr(url, ckStr) fills a CkString;
s = http.quickGetStr(url) returns str |
One form: s = http.QuickGetStr(url) returns str (an empty string on failure; check
LastMethodSuccess) |
| Binary data | bytes in and out: bd.AppendData(b, len(b)), bd.GetData()
returns bytes; older code also uses CkByteData.
See Passing binary data between Chilkat and CkPython. |
Any bytes-like object in (bytes, bytearray, memoryview);
a read-only memoryview out — bytes(bd.GetBinary()) to copy it.
See Passing binary data between Chilkat and Python
and Explaining the Python memoryview. |
| Method failures | Neither module raises Python exceptions for a Chilkat method that fails; the method returns
False / an empty result and LastErrorText explains why. Exceptions are raised only for
Python-level misuse (wrong argument type or count). | |
| Asynchronous calls | task = http.QuickGetStrAsync(url), chilkat.CkTask |
task = http.QuickGetStrAsync(url), chilkat2.Task |
| Progress-event callbacks | Yes — subclass e.g. chilkat.CkHttpProgress and pass it to
put_EventCallbackObject(); the progress, abort-check, and task-completed events are delivered to your Python
methods. |
Not available. Use the Async methods and poll the Task
(PercentDone, Finished, Cancel()) instead. |
| Examples | example-code.com/python | example-code.com/chilkat2-python |
Requirements, downloads, and installation
Since v11.6.1 (September 2026) the two modules have identical requirements. Both target the CPython stable ABI, so there is one binary per operating system and processor that works with every Python from 3.7 onward — including Python versions released after the module was built. Python 3.6 and earlier (and Python 2) are no longer supported by either module; the last per-version builds remain available on the Chilkat2 Python older versions page.
| CkPython | Chilkat2-Python | |
|---|---|---|
| Python versions | CPython 3.7 and later (one build for all of them) | |
| Platforms | Windows x64, win32, and ARM64 · Linux x86_64, arm64, and armv7l · Alpine Linux x86_64 and arm64 · macOS Apple silicon and Intel | |
| pip | pip install chilkat | pip install chilkat2 |
| What the download contains | chilkat.py plus the extension _chilkat.so
(_chilkat.pyd on Windows); both go in site-packages |
Just the extension chilkat2.so (chilkat2.pyd on Windows) |
| Download pages | Chilkat Module for Python (CkPython) | Chilkat2 Module for Python |
Can both be installed at the same time?
Yes. The modules have different names (chilkat and chilkat2) and different
files, so they coexist in the same site-packages directory and can even be imported into the same
program. Objects cannot be passed between them, however: a chilkat.CkCert is not a
chilkat2.Cert.
Moving from CkPython to Chilkat2-Python
There is no automatic converter, but the changes are mechanical: drop the Ck prefix from
class names, turn get_X()/put_X(v) into obj.X/obj.X = v,
replace the lower-case-initial string methods (quickGetStr, lastErrorText,
…) with the capitalized names that now return the value directly, and replace
CkString/CkByteData out-arguments with the returned str or
memoryview. Every example on
example-code.com exists in both flavors, which makes a
side-by-side comparison easy.