Skip to main content

This project contains common elements for different projects. Unlike `core-mixins`, this project requires external dependencies...

Project description

core-extensions

This project contains common elements for different projects. Unlike core-mixins, this project requires external dependencies…


Python Versions License Pipeline Status Docs Status Security

Installation

Install from PyPI using pip:

pip install core-extensions
uv pip install core-extensions  # Or using UV...

Features

This library provides a collection of utilities and extensions for projects:

Retry Decorator Advanced retry mechanism based on the tenacity library with exponential backoff, custom exception handling, and detailed logging.

from core_extensions.decorators.retry import SimpleRetry

retry_handler = SimpleRetry(max_attempts=3, base_delay=1.0)

@retry_handler.create_decorator((ConnectionError, TimeoutError))
def fetch_data():
    return api.get_data()

Aliased CLI Group Click extension that allows defining command aliases for better user experience and backward compatibility in CLI applications.

from core_extensions.cli import AliasedGroup

cli = AliasedGroup()

@cli.command("deploy", aliases=["release", "publish"])
def deploy_command():
    """Deploy the application"""
    print("Deploying...")

Quick Start

Installation

Install the package:

pip install core-extensions
uv pip install core-extensions  # Or using UV...
pip install -e ".[dev]"    # For development...

Setting Up Environment

  1. Install required libraries:

pip install --upgrade pip
pip install virtualenv
  1. Create Python virtual environment:

virtualenv --python=python3.12 .venv
  1. Activate the virtual environment:

source .venv/bin/activate

Install packages

pip install .
pip install -e ".[dev]"

Check tests and coverage

python manager.py run-tests
python manager.py run-coverage

Contributing

Contributions are welcome! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Write tests for new functionality

  4. Ensure all tests pass: pytest -n auto

  5. Run linting: pylint core_extensions

  6. Run security checks: bandit -r core_extensions

  7. Submit a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For questions or support, please open an issue on GitLab or contact the maintainers.

Authors

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

core_extensions-1.0.2.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

core_extensions-1.0.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file core_extensions-1.0.2.tar.gz.

File metadata

  • Download URL: core_extensions-1.0.2.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for core_extensions-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4e30c664480f46007da33ef980fc1ce0543154bd2c75a9d397dd6596381be3cf
MD5 88db43b1084df0eea1310601df607624
BLAKE2b-256 b3d42ae13a57346186675808c08941dd2925a38c1b5da016d591c60269ad75f7

See more details on using hashes here.

File details

Details for the file core_extensions-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for core_extensions-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e0f34d6c21d018414958401fca45b5d8278456d131974e376600042859c4a27
MD5 a097ffad00c73850b3d65b7a8ee012cb
BLAKE2b-256 fe17d4184096556d96984b1b39e0bae8af7ab31c5bbd27dc9fecbf0182007fb5

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