Registry / serialization / cint
library1.0.0pypypi✓ verified 24d ago

cint provides Python 2.7 aliases for `ctypes` integer types, aiming to simplify their use. It wraps C integer types (e.g., `int8`, `uint32`) directly from the `ctypes` module. The library is currently at version 1.0.0, with no active development since 2017, indicating an abandoned status.

pip install cint
INSTALL
IMPORT
SIG · CINT
C
cint
serializationpythonv1.0.0
Install
1.8s avg
Import
16ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.006s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.020s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cint
from cint import Cint
from cint import int8
I8
from cint import I8
from cint import int8
U32
from cint import U32
from cint import int8

Demonstrates the creation and inspection of C integer types using `cint`'s aliases. Note that `cint` effectively provides direct aliases to `ctypes` types.

# This example is intended for Python 2.7. # The `cint` library provides convenient aliases for ctypes integer types. # For Python 3, it's recommended to use `ctypes` directly. from cint import int32, uint16 # Create a signed 32-bit integer using cint's alias my_signed_int = int32(-100) print "Value:", my_signed_int.value print "Python type of value:", type(my_signed_int.value) print "Actual ctypes type:", type(my_signed_int) # This will show the actual ctypes type # Create an unsigned 16-bit integer my_unsigned_int = uint16(65530) print "Value:", my_unsigned_int.value print "Python type of value:", type(my_unsigned_int.value) print "Actual ctypes type:", type(my_unsigned_int)
Debug
Known issues
breakingThis library is primarily designed for and tested with Python 2.7. While its PyPI metadata indicates compatibility with Python 3.4+, the codebase uses Python 2.7 print syntax and other idioms that will cause syntax errors or runtime issues in Python 3. It will not work correctly without significant manual porting.
fix
Do not use `cint` for Python 3 projects. Instead, use the built-in `ctypes` module directly (e.g., `from ctypes import c_int32, c_uint16`).
affects: 1.0.0
gotchaThe `cint` project has been abandoned since 2017. There will be no further updates, bug fixes, or security patches. It is not recommended for new projects.
fix
For new projects, especially in Python 3, prefer direct usage of `ctypes` or consider alternative libraries if `ctypes` is too low-level for your needs.
affects: 1.0.0
gotcha`cint` essentially provides aliases to `ctypes` types. For example, `cint.int8` is `ctypes.c_byte`. Its primary value was syntactic sugar for Python 2.7 users. Modern Python code can easily use `ctypes` directly without this wrapper.
fix
If migrating from `cint`, simply replace `from cint import int32` with `from ctypes import c_int32` and adjust names accordingly (e.g., `int32` becomes `c_int32`).
affects: 1.0.0
Upgrade
Version history
1.0.0latest on PyPI · released Mar 19, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
Amazon
1
OpenAI (training)
1
Resources
cint — pip install cint · libregistry