Skip to main content

Standalone ax_utils package with C/C++ extensions for high-performance utilities

Project description

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.

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 ax_utils

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

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

MIT License

Project details


Download files

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

Source Distribution

axiros_utils-3.0.2.tar.gz (33.7 kB view details)

Uploaded Source

Built Distribution

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

axiros_utils-3.0.2-cp312-cp312-macosx_11_0_arm64.whl (62.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file axiros_utils-3.0.2.tar.gz.

File metadata

  • Download URL: axiros_utils-3.0.2.tar.gz
  • Upload date:
  • Size: 33.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for axiros_utils-3.0.2.tar.gz
Algorithm Hash digest
SHA256 b063d7243a6151688d91032959362904f7064045a41134190b9fb29a1bbb5749
MD5 2c7b9de8d761cad0e630e80a47b3560a
BLAKE2b-256 d84366c3a3d514a1f434813bed966baa7cd8af7488545ce7f7d0eb8e3b203f34

See more details on using hashes here.

File details

Details for the file axiros_utils-3.0.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for axiros_utils-3.0.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76ce571c3505f257e688282e48f18641bfdf9e47b63eb7379aed059bd0a1c5da
MD5 2ee0740a4ad3b5eb7603a1ed5d4e4922
BLAKE2b-256 340ba81d4a1aa87e0cab316d6e4bcf7db0ad7ce41850f756d8b9316a1d99f0c6

See more details on using hashes here.

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