Skip to main content

Type stubs for Celery and its related packages

Project description

celery-types

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-0.25.0.tar.gz (105.7 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-0.25.0-py3-none-any.whl (210.8 kB view details)

Uploaded Python 3

File details

Details for the file celery_types-0.25.0.tar.gz.

File metadata

  • Download URL: celery_types-0.25.0.tar.gz
  • Upload date:
  • Size: 105.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for celery_types-0.25.0.tar.gz
Algorithm Hash digest
SHA256 1752dc736e550f0fa6b4f706162c5460314ebf55314f93a476a87b43cd2e30cc
MD5 e437c38efbc2559bb8a35aefc7e6641e
BLAKE2b-256 e4a5592bd4dcd5349e504fb3c354b74c934d204c08def22416fb9a70a765451d

See more details on using hashes here.

File details

Details for the file celery_types-0.25.0-py3-none-any.whl.

File metadata

  • Download URL: celery_types-0.25.0-py3-none-any.whl
  • Upload date:
  • Size: 210.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for celery_types-0.25.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dab1c1f126f4326db0a235781349d402b1c97fecca30bddae89aa58e0754671e
MD5 145fba10f60607b2d0c9d0627cabf494
BLAKE2b-256 fcae716b2d38c267bf5074fa2b20d17d37e70dd8c16c31ac2f6155365f0245f1

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