celery-types
v0.26.0Type stubs for Celery and its related packages
206 KB Python 3.10+ py3-none-anyApache-2.01 deps
$ uv add celery-typescelery-types
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
- ruff — formatting and linting
- basedpyright — type checking
- mypy — type checking
related
Details
- Version
- 0.26.0
- License
- Apache-2.0
- Python
- <4,>=3.10
- Maintainer
- Steve Dignam
Links
Release Cadence
3
releases in the past year
avg 55 days between releases
Maintainers
- Steve Dignam · [email protected]