Packaging & Dependencies
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The flext-oracle-oic project is structured as a specialized Python library designed to provide advanced extensions for the Oracle Integration Cloud (OIC). It utilizes the hatchling build backend and follows a modular architecture that separates core logic, API clients, and CLI interfaces. The packaging system is designed to support modern Python development workflows, specifically targeting Python 3.13 and above.
The project relies heavily on the flext-core and flext-cli ecosystems, serving as a domain-specific extension within the broader FLEXT framework. It employs lazy loading mechanisms for its exports to optimize performance and uses standardized metadata management to ensure consistency across the FLEXT suite.
Sources: pyproject.toml:28-44, README.md:5-9, src/flext_oracle_oic/init.py:8-25
Dependency Management
The project's dependencies are categorized into runtime requirements and development-specific tools. All dependencies are managed through the pyproject.toml file, which serves as the single source of truth for the project environment.
Runtime Dependencies
The core runtime environment is strictly defined to ensure compatibility with enterprise OIC environments. The project enforces a narrow Python version range (>=3.13,<3.14) and includes standard libraries for HTTP communication, data validation, and resilient execution.
| Dependency | Purpose | Version Constraint |
|---|---|---|
flext-cli | Command-line interface framework | Latest |
flext-core | Core FLEXT architectural components | Latest |
httpx | Asynchronous-ready HTTP client | >=0.28.1 |
pydantic | Data validation and settings management | >=2.13.3 |
requests | Synchronous HTTP client | >=2.33.1 |
tenacity | Retry logic for resilient API calls | >=9.1.4 |
urllib3 | Low-level HTTP library | >=2.6.3 |
Sources: pyproject.toml:34-44, pyproject.toml:50-50
Development and Quality Gates
The project maintains a comprehensive list of optional development dependencies to support testing, linting, and documentation. This includes specialized tools for type checking (mypy, pyright), formatting (black, ruff), and automated documentation generation (mkdocs).
Sources: pyproject.toml:55-141, README.md:38-40
Project Architecture & Modularization
The project uses a structured export pattern to manage internal and public access to its components. This is facilitated by a lazy loading system that minimizes startup overhead.
The diagram shows the internal hierarchy of the package, where the __init__.py file acts as the primary gateway, delegating to lazy export maps to resolve specific modules like Services or Models only when needed.
Sources: src/flext_oracle_oic/init.py:8-83, src/flext_oracle_oic/_exports_lazy_part_01.py:1-55
Build System & Metadata
The project is packaged using the hatchling build backend, allowing for sophisticated versioning and metadata extraction directly from the code.
Versioning Implementation
Versioning is handled by the FlextOracleOicVersion class, which inherits from FlextVersion in flext-core. This ensures that package metadata such as the version string, author email, and license are automatically synchronized with the installed package metadata.
# src/flext_oracle_oic/__version__.py
from flext_core.__version__ import FlextVersion
class FlextOracleOicVersion(FlextVersion):
"""flext-oracle-oic version — MRO-derived from FlextVersion."""
_metadata: PackageMetadata = metadata("flext-oracle-oic")
__version__ = FlextOracleOicVersion.__version__
Sources: src/flext_oracle_oic/version.py:18-29, pyproject.toml:8-10
Extension Client Integration
The FlextOracleOicClient leverages external dependencies specifically for Oracle API communication. It integrates with flext-api to manage authenticated requests and session lifecycle.
The client manages the mapping between high-level OIC operations and the underlying flext-api requests, ensuring data normalization and type safety.
Sources: src/flext_oracle_oic/ext_client.py:28-66, src/flext_oracle_oic/ext_client.py:228-268
Conclusion
The packaging and dependency structure of flext-oracle-oic emphasizes enterprise-grade reliability and modularity. By strictly defining runtime constraints and utilizing a lazy-loading architecture, the project provides a performant extension to the OIC ecosystem while maintaining alignment with the broader FLEXT framework standards.
Sources: pyproject.toml:13-25, README.md:29-35