Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions celery-async-tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,28 @@
Example project for integrating Celery and Redis into a Django application.
This repository holds the code for the Real Python [Asynchronous Tasks With Django and Celery](https://realpython.com/asynchronous-tasks-with-django-and-celery/) tutorial.

## Setup (macOS)
## Setup

To try the project, set up a virtual environment and install the listed dependencies:
The project targets Linux and macOS. Celery doesn't support Windows.

To try the project, set up a virtual environment with Python 3.12 or newer and install the listed dependencies:

```sh
$ python -m venv venv
$ source venv/bin/activate
(venv) $ python -m pip install -r requirements.txt
```

You'll also need to install Redis on your system:
You'll also need to install Redis on your system.

On Linux (Debian or Ubuntu):

```sh
$ sudo apt update
$ sudo apt install redis
```

On macOS with [Homebrew](https://brew.sh/):

```sh
$ brew install redis
Expand Down Expand Up @@ -46,4 +57,4 @@ $ redis-server
(venv) $ python -m celery -A django_celery worker -l info
```

When all three processes are running, you can go to `localhost:8000/` and submit a feedback response. Celery will simulate a work-intensive process and send an email at the end of it. You'll see the email message show up in the log stream on the terminal window where the Celery worker is running.
When all three processes are running, you can go to `http://localhost:8000/` and submit a feedback response. Celery will simulate a work-intensive process and send an email at the end of it. You'll see the email message show up in the log stream on the terminal window where the Celery worker is running.
33 changes: 18 additions & 15 deletions celery-async-tasks/source_code_final/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
amqp==5.3.1
asgiref==3.8.1
billiard==4.2.1
celery==5.4.0
click==8.1.7
amqp==5.4.0
asgiref==3.12.1
billiard==4.3.0
celery==5.6.3
click==8.5.0
click-didyoumean==0.3.1
click-plugins==1.1.1
click-repl==0.3.0
Django==5.1.3
kombu==5.4.2
prompt_toolkit==3.0.48
click-plugins==1.1.1.2
click-repl==0.4.0
Django==6.1.1
kombu==5.6.2
packaging==26.3
prompt_toolkit==3.0.53
python-dateutil==2.9.0.post0
redis==5.2.0
six==1.16.0
sqlparse==0.5.2
tzdata==2024.2
redis==8.1.0
six==1.17.0
sqlparse==0.6.0
typing_extensions==4.16.0
tzdata==2026.4
tzlocal==5.4.4
vine==5.1.0
wcwidth==0.2.13
wcwidth==0.9.1
33 changes: 18 additions & 15 deletions celery-async-tasks/source_code_initial/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
amqp==5.3.1
asgiref==3.8.1
billiard==4.2.1
celery==5.4.0
click==8.1.7
amqp==5.4.0
asgiref==3.12.1
billiard==4.3.0
celery==5.6.3
click==8.5.0
click-didyoumean==0.3.1
click-plugins==1.1.1
click-repl==0.3.0
Django==5.1.3
kombu==5.4.2
prompt_toolkit==3.0.48
click-plugins==1.1.1.2
click-repl==0.4.0
Django==6.1.1
kombu==5.6.2
packaging==26.3
prompt_toolkit==3.0.53
python-dateutil==2.9.0.post0
redis==5.2.0
six==1.16.0
sqlparse==0.5.2
tzdata==2024.2
redis==8.1.0
six==1.17.0
sqlparse==0.6.0
typing_extensions==4.16.0
tzdata==2026.4
tzlocal==5.4.4
vine==5.1.0
wcwidth==0.2.13
wcwidth==0.9.1
Loading