Registry / web-framework / diracx-core

diracx-core

JSON →
library0.3.0pypypi✓ verified 23d ago

DiracX Core Library (diracx-core) provides foundational utilities, data structures, and base classes shared across the DiracX ecosystem. Currently at version 0.0.12, it's in early development, implying a rapid release cadence with potential for frequent API changes.

pip install diracx-core
INSTALL
IMPORT
SIG · DIRACX-CORE
D
diracx-core
web-frameworkpythonv0.3.0
Install
7.4s avg
Import
Disk
69MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.1a17 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 12.3s
py 3.11
✓ —
✓ 6.1s
py 3.12
✓ —
✓ 5.8s
py 3.13
✓ —
✓ 5.6s
py 3.9
✕ build_error
✕ build_error
69MB installed
● package 69MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BaseConfig
from diracx import BaseConfig
from diracx.config import BaseConfig

This quickstart demonstrates how to define and use a configuration class inheriting from `diracx_core.config.BaseConfig`. It showcases field definitions with descriptions and how to integrate environment variables for sensitive data like API keys.

import os from diracx_core.config import BaseConfig from pydantic import Field class AppConfig(BaseConfig): app_name: str = Field('MyDiracXApp', description='Name of the application') api_key: str = Field(os.environ.get('DIRACX_API_KEY', ''), description='API Key for DiracX services') debug_mode: bool = Field(False, description='Enable debug logging') # Example usage # Set an environment variable for testing, e.g., export DIRACX_API_KEY="your_secret" config = AppConfig() print(f"Application Name: {config.app_name}") if config.api_key: print("API Key loaded successfully.") else: print("Warning: DIRACX_API_KEY environment variable not set. API services might not work.") if config.debug_mode: print("Debug mode is ON.")
Debug
Known issues
breakingAs a pre-1.0 version library (currently 0.0.12), diracx-core's API is subject to frequent and significant breaking changes without prior deprecation warnings. Users should pin exact versions and regularly review the GitHub repository for updates.
fix
Pin your `diracx-core` dependency to an exact version (e.g., `diracx-core==0.0.12`) in `requirements.txt` or `pyproject.toml` to prevent unexpected breakages. Regularly check the project's GitHub for breaking changes before upgrading.
affects: <1.0.0
gotchaDiracX Core is primarily designed as a foundational library to be extended by other DiracX packages, not necessarily for standalone complex application development. While it provides utilities, its core strength lies in providing base classes and structures for a larger ecosystem.
fix
Understand that while you can use its components, full application logic might require other DiracX components or custom wrappers. Review the specific use cases in the official DiracX ecosystem if available.
affects: All
gotchaThe `BaseConfig` class, being a Pydantic `BaseModel`, relies on specific mechanisms for configuration loading and overriding (e.g., environment variables, `.env` files, or explicit instantiation). Misunderstanding the priority or source of configuration values can lead to unexpected behavior.
fix
Always explicitly define expected configuration sources (e.g., `os.environ.get`) or ensure `.env` files are loaded correctly if used. When debugging, print the resulting configuration object to verify loaded values.
affects: All
Upgrade
Version history
0.3.0latest on PyPI · released Jul 7, 2026
Audit
Dependencies
pydanticrequiredUsed for data validation and configuration management.
pyyamlrequiredUsed for YAML configuration parsing.
richrequiredUsed for enhanced console output and logging.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
diracx-core — pip install diracx-core · libregistry