Skip to main content

Type stubs for Celery and its related packages

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

celery-types

Note: This is a (hopefully) temporary fork of celery-types with additional stubs and improvements. The goal is to eventually merge these changes upstream, but since the additions are quite extensive I wanted to test in more realistic use case as a real package. If you're looking for the original package, please visit the upstream repository.

PyPI Downloads PyPI - Types image uv Ruff

Type stubs for celery related projects:

install

pip install celery-types

You'll also need to monkey patch the classes from the example below (you can delete anything you don't intend to use) so generic params can be provided:

from celery import Celery, Signature
from celery.app.task import Task
from celery.contrib.abortable import AbortableAsyncResult, AbortableTask
from celery.contrib.django.task import DjangoTask
from celery.local import class_property
from celery.result import AsyncResult
from celery.utils.objects import FallbackContext

classes = [
    Celery,
    Task,
    DjangoTask,
    AbortableTask,
    AsyncResult,
    AbortableAsyncResult,
    Signature,
    FallbackContext,
    class_property,
]

for cls in classes:
    setattr(  # noqa: B010
        cls,
        "__class_getitem__",
        classmethod(lambda cls, *args, **kwargs: cls),
    )

dev

initial setup

# install uv (https://docs.astral.sh/uv/)
curl -LsSf https://astral.sh/uv/install.sh | sh

regular development

uv sync
# run formatting, linting, and typechecking
s/lint

or

uv run ruff check --fix
uv run ruff format
uv run basedpyright typings tests
uv run mypy tests
# build and publish
uv build && uv publish

pre-commit

The project uses pre-commit for code quality checks:

# install pre-commit hooks
uv run prek install

# run all checks manually
uv run prek run --all-files

tooling

related

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

celery_types_ng-0.25.5.tar.gz (105.2 kB view details)

Uploaded Source

Built Distribution

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

celery_types_ng-0.25.5-py3-none-any.whl (210.0 kB view details)

Uploaded Python 3

File details

Details for the file celery_types_ng-0.25.5.tar.gz.

File metadata

  • Download URL: celery_types_ng-0.25.5.tar.gz
  • Upload date:
  • Size: 105.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for celery_types_ng-0.25.5.tar.gz
Algorithm Hash digest
SHA256 6209b5aa04c449a2be61bc1439985b79dc8e183d9347a2ba7d3439c9e077530d
MD5 a3ca939b4dc3c5d42be84326b4a9104e
BLAKE2b-256 17f1438bee0fe7dd352478d943aa776aa2ee385139339cd85bf9bbb63e41b9fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for celery_types_ng-0.25.5.tar.gz:

Publisher: publish.yml on oliverhaas/celery-types

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file celery_types_ng-0.25.5-py3-none-any.whl.

File metadata

File hashes

Hashes for celery_types_ng-0.25.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c7e996e91c428138f7dba1a1ae733ef55a80e2ce63622fafcf44895350a7b4ed
MD5 02a25900b0c3f2a2a7e2ed869cc7bc53
BLAKE2b-256 7daff1c5d10c06a31d273a610d032ffda3b783bf9acb9183a8318e4f9a4d9ece

See more details on using hashes here.

Provenance

The following attestation bundles were made for celery_types_ng-0.25.5-py3-none-any.whl:

Publisher: publish.yml on oliverhaas/celery-types

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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