Fond
Foundation for Cooking, Foundation for Life.
Experimental: This package is under active development. APIs may change without notice.
C++ header-only utilities distributed via PyPI as a build-time dependency. Your end users never need to install it.
Installation
pip install fond
Usage
As a build dependency
[build-system]
requires = [
"fond>=0.1.0",
"build-cub",
"pybind11",
]
Getting include paths
import fond
fond.get_include() # Root include path
fond.get_libs() # Binding source files
In your C++ code
#include <fond/collections/maps.hpp>
#include <fond/logger/logger.hpp>
#include <fond/colors/palette.hpp>
#include <fond/msgpack/packer.hpp>
Available Headers
Collections (fond/collections/)
Policy-based data structures with compile-time Ordered/Frozen variants:
- Set — unordered, ordered, frozen, frozen-ordered (policy-based)
- Map — same four variants via policies
- List / Tuple — mutable list + frozen tuple
- BloomFilter / BloomSet — probabilistic fast-negative-lookup set
- LRUCache — simpoo version wrapping Map
- RingBuffer — fixed-size circular buffer, compile-time sized
- Trie — prefix tree for string lookup and autocomplete
- BitFlag — type-safe enum-keyed bitset wrapper
- Arena — bump allocator for bulk allocation
- Pool — fixed-size typed object pool with freelist
- SparseSet — O(1) add/remove/contains with dense iteration
- DynStack — dynamic LIFO stack, doubles as a freelist
Collections Core (fond/collections/core/)
Composable low-level building blocks for high-performance data structures:
- OpenMap — open-addressing hash map with tombstones, node pool, intrusive LRU list
- IntrusiveList — doubly-linked list that doesn't own nodes
- NodePool — pre-allocated typed pool for ListNode-derived types
- HashUtils — probing, power-of-2 masking, hash mixing, load factor math
High-Performance (fond/collections/)
- FastLRU — LRU cache built on OpenMap (zero allocations per get/put)
Colors (fond/colors/)
- Color — RGBA color struct with conversions to ANSI, ImGui, uint32
- Palette — named color constants (single source of truth)
- ANSI — terminal color constants (constexpr, zero allocation)
- ImGui — ImVec4/ImU32 color constants (generated from palette)
Logger (fond/logger/)
- Compile-time configurable logging with function pointer dispatch
- ANSI color support, file output with rotation, buffer mode, callbacks
std::formattemplate overloads on all log methods
Info (fond/info/)
- ProjectInfo — version, exit codes, project metadata with pybind11 bindings
- VersionHelpers — version bump/parse utilities
MsgPack (fond/msgpack/)
- Binary serialization with
MSGPACK_DEFINEmacro (powered byFOND_FOR_EACH) - Packer, Unpacker, Python packer/unpacker variants
Lua (fond/lua/)
- Lua table serialization with
LUA_DEFINEmacro (powered byFOND_FOR_EACH)
Macros (fond/macros/)
- FOND_FOR_EACH — preprocessor for-each over variadic args (generated, up to 100 args)
Tools
- ByteBuffer — unified read/write byte buffer
- Timer — scoped timer with auto unit selection, lap times,
time_it()lambda - EpochTimestamp — configurable timestamp formatting
- KeyStore — file-backed key/value store using MsgPack
- Locking — mutex helpers (C and C++ variants)
Metadata
Release files for fond 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fond-0.2.2-cp314-cp314-macosx_15_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 15.0+ ARM64 | Details |
| fond-0.2.2-cp313-cp313-macosx_15_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 15.0+ ARM64 | Details |
| fond-0.2.2-cp312-cp312-macosx_15_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 15.0+ ARM64 | Details |
Total release size: 2.1 MB
Release files / fond-0.2.2-cp314-cp314-macosx_15_0_arm64.whl
| Download URL | fond-0.2.2-cp314-cp314-macosx_15_0_arm64.whl |
|---|---|
| Size | 696.9 kB |
| Tags | CPython 3.14 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
71eb63ec2a8064a64d2b818ada55de597878020782c6c1c016f25e24698904ac
|
|
BLAKE2b-256 checksum How to use checksums |
5589dce7e0c85324e47a57de2911b66832f2a82b2cce25ee7db587eb03d867ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fond-0.2.2-cp313-cp313-macosx_15_0_arm64.whl
| Download URL | fond-0.2.2-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 696.7 kB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7fc4376c8523942c0a21eb353c10a110715831aa107075a42686bad2a69f166c
|
|
BLAKE2b-256 checksum How to use checksums |
52e179c6e283d8bac49deeb2cea45d713085bc6c5aa66e5dc9b29a38abe580e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fond-0.2.2-cp312-cp312-macosx_15_0_arm64.whl
| Download URL | fond-0.2.2-cp312-cp312-macosx_15_0_arm64.whl |
|---|---|
| Size | 696.6 kB |
| Tags | CPython 3.12 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
85eac2d3e22cc21d47c38f8525a31316a108e48659639fe1a4bb95625339dadf
|
|
BLAKE2b-256 checksum How to use checksums |
4f7eb77c8573a93d0ab7748a82b24a49f647046b708919364a18e14c1d571d21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|