Skip to main content

abstract_essentials

The lean, dependency-free core carved out of abstract_utilities.

Every symbol here depends only on the Python standard library — no third-party imports, no from .imports import * chains, no submodule fan-out. It imports fast and installs anywhere (desktop, server, Termux/Android phone), which makes it a safe foundation for the rest of the abstract_* tree to build on without dragging in the monolith.

Why this exists

abstract_utilities is imported by nearly every abstract_* package, so its size and entanglement (star-exports across a dozen submodules) ripple everywhere. abstract_essentials is the ~50-function subset that is actually used in practice, extracted as a clean, explicit API.

Install

pip install abstract_essentials

Use

from abstract_essentials import make_list, get_any_value, safe_read_from_json, get_logFile

The public API is whatever is listed in abstract_essentials.__all__ (53 symbols: json/path/file/string/list/type/log helpers).

Migrating off abstract_utilities

abstract_utilities can become a thin compatibility shim that re-exports from here (see abstract_utilities_compat_shim.py shipped alongside this scaffold), so existing from abstract_utilities import X keeps working while new code imports from abstract_essentials.

ML/model MIME hints

MIME_TYPES['machine_learning'] and MEDIA_TYPES['machine_learning'] cover GGUF, safetensors, ONNX, PyTorch, TFLite, Keras and Core ML files, plus shared checkpoint, array and serialization extensions. The application/x-* model labels are local package conventions, not asserted IANA registrations.

from abstract_essentials import get_mime_type, derive_media_type, derive_media_types

get_mime_type('weights.SAFETENSORS')  # 'application/x-safetensors'
derive_media_type('weights.gguf')    # 'machine_learning'
derive_media_types('weights.bin')   # ('executable', 'machine_learning')
derive_media_types('weights.h5')    # ('data_science', 'pandas_data', 'machine_learning')

These functions inspect the filename only and accept paths or dotted extensions. Both category helpers are case-insensitive. The singular helper preserves the first-match order of existing categories; the plural helper retains ambiguity. Generic .bin, .ckpt, .pb, .model, and pickle files keep application/octet-stream: an extension does not establish model contents. JSON configs remain documents; a model directory's supporting files are not automatically models. Directory bundles are not detected by these helpers.

For discovery, use these mappings to shortlist candidates, then inspect content and retain detected format, container MIME, and extension agreement separately. For example, PyTorch checkpoints can use ZIP containers, while safetensors uses a length-prefixed JSON tensor header. A filename MIME hint is not proof that either parser will accept the file, nor permission to unpickle it.

The existing find_utils defaults derive their extension sets from this registry, so new ML extensions also enter its default exclusion set. Pass explicit scan filters when collecting model files.

License

MIT — putkoff / Abstract Endeavors.

Metadata

Release files for abstract-essentials 0.0.0.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abstract-essentials 0.0.0.22
File Size Uploaded Provenance
abstract_essentials-0.0.0.22.tar.gz 27.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for abstract-essentials 0.0.0.22
File Interpreter ABI Platform
abstract_essentials-0.0.0.22-py3-none-any.whl Python 3 none any Details

Total release size: 57.7 kB

Release files / abstract_essentials-0.0.0.22.tar.gz

Download URL abstract_essentials-0.0.0.22.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bf4cfca56f425014ea5d936470578c1e7d17298351c594c1725dc19775170d20
BLAKE2b-256 checksum
How to use checksums
c5941eb694f31d87a468aba85590b8b92d72f70dafd173bc9428a36bd0850fb6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / abstract_essentials-0.0.0.22-py3-none-any.whl

Download URL abstract_essentials-0.0.0.22-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19e715792ff39f8d60cb057e3e0a0398d23de3b6d004dd3b47f591cdc98ac431
BLAKE2b-256 checksum
How to use checksums
5d22c2878d36c19a963309f1c5e2c9c8666983b5c8eb5cb855098646fb2037e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for abstract-essentials 0.0.0.22

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page