Coverage#
Product contract for what picop is, what it ships, and how to choose helpers.
picop is not a reimplementation of the Python standard library, and it is not a full 1:1 port of Cython’s Includes/cpython. It is a curated CPython C-API accelerator for Cython on Python ≥ 3.14.
Prefer picop. Deprecated soft alias cypy (DeprecationWarning) until 3.0, then removed.
Product tiers#
Tier |
Who |
Import |
Contents |
|---|---|---|---|
Core |
Micro-opts / typed hot paths |
|
Typed containers, bytes/str, ANSI, GC toggles, string value ops |
Protocols |
Unknown concrete type |
|
Abstract mapping/sequence/number/object bridges |
Runtime |
Extension / embedding authors |
|
datetime, codecs, marshal, file, weakref, capsule, contextvars, thin clocks, process plumbing |
Rule of thumb: prefer Core when the type is known; use Protocols only when it is not; use Runtime for non-hot-path / embedding needs.
Core (prefer for micro-opts)#
Module |
Maps to |
Notes |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
len / eq / contains / startswith / … |
|
|
Prefer |
|
terminal SGR |
Not CPython; builds on unicode intern |
|
GC |
|
|
buffers / slice |
Core-adjacent |
Curated starter export: picop.hot.
1.0 freeze (Core + cimport contracts)#
As of 1.0.0:
Surface |
Frozen? |
Contract |
|---|---|---|
|
Yes |
Core star-import / discovery set — additive in minors; drop/rename/semantic change → major |
|
Yes |
Micro-opt marketing set — same policy |
Full public barrel beyond |
Protocols/Runtime provisional |
Still importable; may evolve under minors |
|
Documented SDK |
Wider than Python; cimport-only helpers stay out of this Python API reference |
Soft letter/bare/ |
Implementation only |
Prefer word-prefix / |
Deprecated |
Soft alias |
Prefer |
Protocols (typed unknown)#
Module |
Prefer instead when typed |
|---|---|
|
|
|
|
|
|
|
typed module above |
Runtime (public and/or cimport)#
Public Runtime helpers include datetime, codecs, marshal, file, weakref, capsule, contextvars, cytime clocks, and object-model / scalar modules (cyfunction, cymethod, cylong, …). Embedding / process helpers such as cyerr, cymem, cythread are cimport only and are not documented here as Python callables.
Import surfaces#
Entry |
Role |
|---|---|
|
Core marketing surface — micro-opt starters |
|
Full public barrel; Core discovery via |
|
Module-scoped public |
|
Full Cython SDK (wider than Python) |
|
Deprecated soft alias until 3.0 |
Discourage from picop import *.
Overlap decision tree#
Known concrete type?
dict → cydict (dict_get, dict_len, …)
list → cylist
tuple → cytuple
set → cyset
bytes → cybytes
str → cystr value ops; encode/intern → cyunicode
Unknown mapping / sequence / number-like?
→ cymapping / cysequence / cynumber
Still too dynamic?
→ cyobject (last resort)
Not a goal#
Full Cython
cpython.*parity or full Python stdlibDocumenting every cimport /
cdefsymbol in the public Python APITreating Protocol/Runtime losers as Core micro-opt defaults