Skip to main content

Foundation for Cooking, Foundation for Life.

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fond-0.0.17-cp314-cp314-macosx_15_0_arm64.whl (214.0 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

fond-0.0.17-cp312-cp312-manylinux_2_35_x86_64.whl (228.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

fond-0.0.17-cp312-cp312-manylinux_2_35_aarch64.whl (228.3 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ ARM64

File details

Details for the file fond-0.0.17-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for fond-0.0.17-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d05b68982c2c55410e8f013c907c3000133829aa54573fd2fb165777e7fff70c
MD5 43ef7a0c90a317fcf174b2e784299b74
BLAKE2b-256 e5695181dec3e26b9d443488ec0e9d2a1592114e3a88bb6eb5d89d1f7453a77d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fond-0.0.17-cp314-cp314-macosx_15_0_arm64.whl:

Publisher: build-wheels.yml on sicksubroutine/bewoo-includes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fond-0.0.17-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for fond-0.0.17-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 16c499b7ad16beccf20d028873494589d2e5917123db11b19b9a5dcf3460c60b
MD5 f3b4469ae05856791f61fa0e87bb3374
BLAKE2b-256 f0a1a18df36737c37a3dc1d83b1ccb2fef245af1db2b9302babc3963ba744e81

See more details on using hashes here.

Provenance

The following attestation bundles were made for fond-0.0.17-cp312-cp312-manylinux_2_35_x86_64.whl:

Publisher: build-wheels.yml on sicksubroutine/bewoo-includes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fond-0.0.17-cp312-cp312-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for fond-0.0.17-cp312-cp312-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 dcd83d69dac6f09912df685970fe49d1f63dd3e71e570ea5a2eabf72a31a8612
MD5 b4a8f4d8ad47d20c623c21d3b278305c
BLAKE2b-256 53b9462dd5ba81f6a07d1a769a2a794afaf9ff0640c6c7408557e5befac5f690

See more details on using hashes here.

Provenance

The following attestation bundles were made for fond-0.0.17-cp312-cp312-manylinux_2_35_aarch64.whl:

Publisher: build-wheels.yml on sicksubroutine/bewoo-includes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page