Type stubs for Celery and its related packages
Project description
celery-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
Project details
Release history Release notifications | RSS feed
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.26.0.tar.gz
(106.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
celery_types-0.26.0-py3-none-any.whl
(211.3 kB
view details)
File details
Details for the file celery_types-0.26.0.tar.gz.
File metadata
- Download URL: celery_types-0.26.0.tar.gz
- Upload date:
- Size: 106.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa318136fdad83f83f1531deecd9fe664b5dfffff29f3c31e9120a46b8e3908f
|
|
| MD5 |
c3bfd13f8453d77369f2d2926dbdc525
|
|
| BLAKE2b-256 |
fc38813dd7534e41682684d3a5c2cc4a8710e3acc51b364920b9c4d747c7b18f
|
File details
Details for the file celery_types-0.26.0-py3-none-any.whl.
File metadata
- Download URL: celery_types-0.26.0-py3-none-any.whl
- Upload date:
- Size: 211.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb9da76f461786091970df466ec647d9a27956399852542cb6cab9309970f950
|
|
| MD5 |
f0b09dfcd30c35e4e5a35a23743848f3
|
|
| BLAKE2b-256 |
d9e5c5ec98f7fd7817d077c9a5a5e705d54f74d4ca08ee3f14dee881c93c0511
|