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.4.tar.gz (104.9 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.4-py3-none-any.whl (209.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: celery_types_ng-0.25.4.tar.gz
  • Upload date:
  • Size: 104.9 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.4.tar.gz
Algorithm Hash digest
SHA256 39317eb7cb6a0ab83d6de3de9e0f709092bf9aed156589c0941d0556618dbecb
MD5 b6c5bab1ade39a6a576eb88a50b4e889
BLAKE2b-256 db77941d781bd77f4ed0c4c5c0b15ad891f2a47e6d2165e8e2bca2a951f79659

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for celery_types_ng-0.25.4-py3-none-any.whl
Algorithm Hash digest
SHA256 33396d93bc808ec6a6813801c1c97378429b75f33b6e2d6e9d77dff04e245d24
MD5 386a034ab60e2afcc3b81ba33ee5e6fd
BLAKE2b-256 df9ec5eb146fc6ea31332952b6f854e3b89a5fe7d1e8e0b5f92e4a4b635f7d6b

See more details on using hashes here.

Provenance

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