cdxcore documentation
This module contains a number of lightweight tools, developed for managing data analytics and machine learning projects.
Install using:
pip install -U cdxcore
Documentation can be found here: https://quantitative-research.de/docs/cdxcore. cdxcore is best used with Python 3.12 and above, but is tested vs Python 3.10 onwards.
Highlights
- Dynamic plotting: simple live/animated plots built on Matplotlib.
- Config management: validated, discoverable configurations with automatic help.
- Versioning & caching: code-versioned I/O and reproducible hashing for pipelines.
- PrettyObject: dictionary-like objects that allow attribute access.
- Utilities: formatting helpers, binary I/O, shared-memory arrays, and more.
Main Functionality
-
cdxcore.dynaplotis a framework for simple dynamic graphs withmatplotlib. It has a simple methodology for animated updates for graphs (e.g. during training runs), and allows generation of plot layouts without knowing upfront the number of plots (e.g. for plotting a list of features). -
cdxcore.configallows robust management of configurations. It automates help, validation checking, and detects misspelled configuration arguments.from cdxcore.config import Config, Int, Float class Network(object): def __init__( self, config ): self.depth = config("depth", 1, Int>0, "Depth of the network") self.width = config("width", 1, Int>0, "Width of the network") self.activation = config("activation", "selu", str, "Activation function") config.done() # see below config = Config() config.network.depth = 10 config.network.width = 100 config.network.activation = 'relu' network = Network(config.network) config.done()
-
cdxcore.subdirwraps various file and directory functions into convenient objects. Useful if files have common extensions.from cdxcore.subdir import SubDir import numpy as np root = SubDir("!") # current temp directory subdir = root("test") # sub-directory 'test' subdir.write("data", np.zeros((10,2))) data = subdir.read("data")
-
Caching:
SubDirsupports code-versioned file i/o which is used by@cdxcore.subdir.SubDir.cachefor an efficient code-versioned caching protocol for functions and objects:
from cdxcore.subdir import SubDir
cache = SubDir("!/.cache;*.bin")
@cache.cache("0.1")
def f(x,y):
return x*y
_ = f(1,2) # function gets computed and the result cached
_ = f(1,2) # restore result from cache
_ = f(2,2) # different parameters: compute and store result
-
Code versioning is implemented in
cdxcore.version:from cdxcore.version import version @version("0.0.1") def f(x): return x print( f.version.full ) # -> 0.0.1
-
Hashing (which is used for caching above) is implemented in
cdxcore.uniquehash:class A(object): def __init__(self, x): self.x = x self._y = x*2 # protected member will not be hashed by default from cdxcore.uniquehash import UniqueHash uniqueHash = UniqueHash(length=12) a = A(2) print( uniqueHash(a) ) # --> "2d1dc3767730"
-
cdxcore.prettyprovides aPrettyObjectclass whose objects operate like dictionaries. This is for users who prefer attribute.notation over item access when building structured output.from cdxcore.pretty import PrettyObject pdct = PrettyObject(z=1) pdct.num_samples = 1000 pdct.num_batches = 100 pdct.method = "signature"
General purpose utilities
-
cdxcore.verboseprovides user-controllable context output for providing progress updates to users. -
cdxcore.utiloffers a number of utility functions such as standard formatting for dates, big numbers, lists, dictionaries etc. -
cdxcore.npioprovides a low level binary i/o interface for numpy files. -
cdxcore.npshmprovides shared memory numpy arrays. -
cdxcore.rollingprovides robust rolling statistics: exponentially weighted location and scale estimators which flag outliers, for regular and irregular time steps.
Metadata
Release files for cdxcore 0.1.97
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cdxcore-0.1.97.tar.gz | 281.6 kB | Without provenance | Details for cdxcore-0.1.97.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cdxcore-0.1.97-py3-none-any.whl | Python 3 | none | any | Details for cdxcore-0.1.97-py3-none-any.whl |
Total release size: 501.6 kB
Release files / cdxcore-0.1.97.tar.gz
| Download URL | cdxcore-0.1.97.tar.gz |
|---|---|
| Size | 281.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dee48fa8aa12b66699ec05ec67d5877793694bbebc9c8b902ca10f76bd91728d
|
|
BLAKE2b-256 checksum How to use checksums |
15e7d4f5e4426788b5635a17572bdd7303631332c601ecd7b4ebd4f0456ddccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Release files / cdxcore-0.1.97-py3-none-any.whl
| Download URL | cdxcore-0.1.97-py3-none-any.whl |
|---|---|
| Size | 220.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e81410b6bd5a68e9de71521c23b69a4dc3b645de89c41af82fd01693e746f6fa
|
|
BLAKE2b-256 checksum How to use checksums |
9ae2a00e6a579c33ee8edfa27befb141eb3d376d433678e4bbc7c6ce33864bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.5
|
Security for cdxcore 0.1.97
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.