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.6.tar.gz (106.0 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.6-py3-none-any.whl (211.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: celery_types_ng-0.25.6.tar.gz
  • Upload date:
  • Size: 106.0 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.6.tar.gz
Algorithm Hash digest
SHA256 d0968145ef7af423939e8da90dc8683e5596a02ffe3b19fa1fa970f35b93fdb2
MD5 447123552048f6551104c1780c323d3f
BLAKE2b-256 19fa79065f1b88db4b1abd6e7f24ca7a841c4c141b795c4678e54c18f87ac5df

See more details on using hashes here.

Provenance

The following attestation bundles were made for celery_types_ng-0.25.6.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.6-py3-none-any.whl.

File metadata

File hashes

Hashes for celery_types_ng-0.25.6-py3-none-any.whl
Algorithm Hash digest
SHA256 660bc355581437e32cf4be551b554243150346b35dbf1dc03bb7d84b6146eb0f
MD5 c947d92e847de38c7c625d809e4199bd
BLAKE2b-256 0c1c97ee7043d4c20ea39937930cdf5b9c989b4de3d1d21c88f76813c10a998d

See more details on using hashes here.

Provenance

The following attestation bundles were made for celery_types_ng-0.25.6-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