Skip to main content

Fond — Foundation for Cooking, Foundation for Life

Fond

Foundation for Cooking, Foundation for Life.

pypi version

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::format template 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_DEFINE macro (powered by FOND_FOR_EACH)
  • Packer, Unpacker, Python packer/unpacker variants

Lua (fond/lua/)

  • Lua table serialization with LUA_DEFINE macro (powered by FOND_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)

Table of built distributions (wheels) for fond 0.2.2
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

0.3.2

3 release files

0.3.1

3 release files

0.2.4

12 release files

This release

0.2.2 This release

3 release files

0.1.5

12 release files

0.1.4

12 release files

0.1.3

12 release files

0.1.2

12 release files

0.1.1

12 release files

0.1.0

12 release files

0.0.90

9 release files

0.0.89

9 release files

0.0.88

9 release files

0.0.87

9 release files

0.0.86

9 release files

0.0.85

9 release files

0.0.84

9 release files

0.0.83

9 release files

0.0.82

9 release files

0.0.81

9 release files

0.0.76

9 release files

0.0.75

9 release files

0.0.59

9 release files

0.0.50

9 release files

0.0.49

9 release files

0.0.48

9 release files

0.0.47

9 release files

0.0.46

9 release files

0.0.38

9 release files

0.0.37

9 release files

0.0.36

9 release files

0.0.35

9 release files

0.0.34

9 release files

0.0.33

9 release files

0.0.31

9 release files

0.0.26

9 release files

0.0.14

2 release files

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

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