Skip to main content

ax_utils - High-Performance Python Utilities

Tests Python versions PyPI version License Code style: Ruff

A standalone Python package providing high-performance utilities with C/C++ extensions, converted from the original ax.utils namespace package.

Author: Stephan Bentheimer

Features

  • AXQueue: High-performance thread-safe queue implementation with C++ backend
  • AXTree: Fast tree data structure with C extensions for efficient nested data manipulation
  • Simple Deepcopy: Optimized deep copy implementation
  • Props to Tree: Convert flat property notation to nested tree structures
  • Unicode Utils: Fast Unicode processing utilities
  • Gevent Integration: Seamless integration with gevent for async applications

Installation

pip install axiros-utils

The package includes C/C++ extensions that will be compiled during installation, providing significant performance improvements over pure Python implementations.

Troubleshoot Installation

Problem: Compile fail on darwin.

[stderr]
      ax_utils/ax_queue/_ax_queue.cpp:4:10: fatal error: 'exception' file
      not found
          4 | #include <exception>
            |          ^~~
      1 error generated.
      error: command '/usr/bin/clang++' failed with exit code 1

With Python 3.11.13 (main, Jun 3 2025, 18:38:25) [Clang 17.0.0 (clang-1700.0.13.3)] on darwin

Solution: Refresh your compiler tools. E.g. xcode-select --install.

The tests contain a few tests on osx.

Quick Start

from ax_utils.ax_queue import AXQueue
from ax_utils.ax_tree import AXTree
from ax_utils.simple_deepcopy import deepcopy
from ax_utils.props_to_tree import props_to_tree

# High-performance queue
queue = AXQueue()
queue.put("hello")
print(queue.get())  # "hello"

# Tree data structure with dot notation
tree = AXTree()
tree['user.profile.name'] = 'John'
print(tree['user']['profile']['name'])  # 'John'

# Fast deep copy
data = {'complex': [1, 2, {'nested': 'value'}]}
copied = deepcopy(data)

# Convert flat properties to tree
props = {'app.database.host': 'localhost', 'app.database.port': 5432}
tree_data = props_to_tree(props)

Performance

All core operations are implemented in C/C++ for maximum performance:

  • AXQueue: C++ implementation with std::mutex for thread safety
  • AXTree: C implementation for fast tree operations
  • Unicode processing: C implementations for encoding/decoding operations
  • Deep copy: Optimized C implementation

Compatibility

  • Python 3.9+
  • Linux and macOS
  • Automatic compilation during pip install

Migration from ax.utils

If you're migrating from the original ax.utils namespace package:

# Old imports
from ax.utils.ax_queue import AXQueue
from ax.utils.ax_tree import AXTree

# New imports
from ax_utils.ax_queue import AXQueue
from ax_utils.ax_tree import AXTree

Development

The package uses modern Python packaging with pyproject.toml and supports development installation:

# Clone and install in development mode
git clone <repository>
cd ax_utils
pip install -e .

License

BSD-3-Clause license (incl. Axiros attribution obligation).

Metadata

Release files for axiros-utils 3.1.0

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

Source distribution (sdist)

Source distribution for axiros-utils 3.1.0
File Size Uploaded
axiros_utils-3.1.0.tar.gz 34.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for axiros-utils 3.1.0
File
axiros_utils-3.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
axiros_utils-3.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
axiros_utils-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
axiros_utils-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details

Total release size: 813.6 kB

Release files / axiros_utils-3.1.0.tar.gz

Download URL axiros_utils-3.1.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4f6fa11251d55ef614fe508fdede0a0480606a1fb63b2664470865185d0c56fa
BLAKE2b-256 checksum
How to use checksums
db001c45393534264659a7e8f9a82f360fd4e68ae9d5ea871b30a5c222cbbe4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / axiros_utils-3.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL axiros_utils-3.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 195.3 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ff191e0dd17faa3adcce7988337d47f009d5593ae00e1d74a99f6539212608ae
BLAKE2b-256 checksum
How to use checksums
c1989d2d23b64549829cc8ad5641a84b7e40f065066b7616e59d53792da88d35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / axiros_utils-3.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL axiros_utils-3.1.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 197.7 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
7c3da24113ba681a2919df9904085d49c0c9fb8d047076097b2cce73475029c5
BLAKE2b-256 checksum
How to use checksums
23ec039a7adea062f64745d2a5aec03c00db82ae7cd910dd620f42ab331c4b1a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / axiros_utils-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL axiros_utils-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 191.5 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
74903e1886e0bd16bad942dcb2946d71d97fa6edfc079dee3cc9c5c099a9a2c1
BLAKE2b-256 checksum
How to use checksums
048ee5ccaa63f4a6232f69b0da5153a7df420da0ab1294b07830832f28987340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / axiros_utils-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL axiros_utils-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 194.6 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
d483c757e44fd779a6e844f8a716ebd9c5e737230512a4e2870751a0ad651a32
BLAKE2b-256 checksum
How to use checksums
0d4003246a60dafb8d0183ae442d3342320d9e4d0cf410e7c4e668ba63d6956b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

3.1.0 This release

5 release files

3.0.2

2 release files

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