Skip to main content

base-api-utils

DRF common utilities

Virtual Env

$ python3 -m venv env

$ source env/bin/activate

python setup

sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get -y -f install python3.7 python3-pip python3.7-dev python3.7-venv libpython3.7-dev python3-setuptools
sudo -H pip3 --default-timeout=50 install --upgrade pip
sudo -H pip3 install virtualenv

Install reqs

pip install -r requirements.txt

Development dependencies

To install dev dependencies (e.g. pytest):

pip install -e ".[dev]"

Packaging

Create ~/.pypirc:

[distutils]
index-servers =
    pypi

[pypi]
username = __token__
password = pypi-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
python3 -m pip install --upgrade build
python3 -m build

Uploading

python3 -m pip install --upgrade twine

Test Py Pi

python3 -m twine upload --repository testpypi dist/*

Production PyPi

python3 -m twine upload dist/*

Install from testPyPi.Org

pip install -i https://test.pypi.org/simple/ base-api-utils --no-deps

Install from GitHub

pip install git+https://github.com/fntechgit/base-api-utils

Failed Celery Async Tasks Management

For a deep dive into the technical implementation, CLI usage, and troubleshooting steps, please refer to the dedicated management guide:

Management & Recovery Deep Dive: /docs/celery-management.md

Celery worker defaults

base_api_utils.celery_worker.apply_worker_defaults makes a worker acknowledge a task once it ends, so a task whose worker dies is delivered again, and bounds each task and pool child:

Late acknowledgement, time limits and memory per child: /docs/celery-worker.md

Logging and the OTLP log bridge

base_api_utils.logging_config.build_logging builds a service's settings.LOGGING, and base_api_utils.otel_logging.configure_otel_logging ships its log records over OTLP:

Logging and the OTLP log bridge: /docs/logging.md

Traces

base_api_utils.otel_instrumentation, base_api_utils.tracing and base_api_utils.otel_celery give a service its traces, a root span for jobs and consumers, and the Celery worker hooks:

Traces, root spans and the Celery worker hooks: /docs/tracing.md

Metadata

Release files for base-api-utils 1.1.127

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

Source distribution (sdist)

Source distribution for base-api-utils 1.1.127
File Size Uploaded Provenance Actions
base_api_utils-1.1.127.tar.gz 146.2 kB Without provenance Details for base_api_utils-1.1.127.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for base-api-utils 1.1.127
File Interpreter ABI Platform Actions
base_api_utils-1.1.127-py3-none-any.whl Python 3 none any Details for base_api_utils-1.1.127-py3-none-any.whl

Total release size: 265.3 kB

Release files / base_api_utils-1.1.127.tar.gz

Download URL base_api_utils-1.1.127.tar.gz
Size 146.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5e36d5d1a6d67286e5c4ed31638a4bf7e9513b396593303907a1ffa5720656c9
BLAKE2b-256 checksum
How to use checksums
d2a1a269aea76a62e6a45d6c7ef12a099a3b2d6ec4ad4e627e10bc8cb8c2ff20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / base_api_utils-1.1.127-py3-none-any.whl

Download URL base_api_utils-1.1.127-py3-none-any.whl
Size 119.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd7686dc6dcfb36fd00c5ca6641e599921583a4024446a338e6f0906aea07604
BLAKE2b-256 checksum
How to use checksums
e663feead5741e3f56743348859a8e52a99e1ca84324872d0991c230a009a1a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for base-api-utils 1.1.127

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.127 This release

2 release files No provenance

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