# Django Inngest
Missing Django integration for Inngest. This package depends on the [Inngest Python SDK](https://github.com/inngest/inngest-python) ([pypi](https://pypi.org/project/inngest/))
## Installation
```bash
uv add inngest django-inngest
```
## Configuration
Update `urls.py` to include:
```python
from django.contrib import admin
from django.urls import path, include
from django_inngest.urls import inngest_urls
urlpatterns = [
# ...
path("admin", admin.site.urls),
# ...
]
# uses DJANGO_INNGEST_SERVE_PATH from settings.py
urlpatterns += inngest_urls
```
Update `settings.py` to include:
```python
# required for inngest and production
INNGEST_EVENT_KEY = os.environ.get("INNGEST_EVENT_KEY", None)
INNGEST_SIGNING_KEY = os.environ.get("INNGEST_SIGNING_KEY", None)
# configuration
DJANGO_INNGEST_APP_ID = os.environ.get("DJANGO_INNGEST_APP_ID", "my-django-project")
DJANGO_INNGEST_IS_PRODUCTION = not DEBUG
DJANGO_INNGEST_CLIENT_LOGGER = os.environ.get(
"DJANGO_INNGEST_CLIENT_LOGGER", "gunicorn"
)
DJANGO_INNGEST_INACTIVE_FUNCTION_IDS = os.environ.get(
"DJANGO_INNGEST_INACTIVE_FUNCTION_IDS", []
)
DJANGO_INNGEST_AUTO_DISCOVER_FUNCTIONS = os.environ.get(
"DJANGO_INNGEST_AUTO_DISCOVER_FUNCTIONS", True
)
# no trailing slash or leading slash
DJANGO_INNGEST_SERVE_PATH = os.environ.get("DJANGO_INNGEST_SERVE_PATH", "api/inngest")
```
## Usage
Create a new Django app and workflows file:
```
python manage.py startapp myapp
touch myapp/workflows.py
```
Update `INSTALLED_APPS` to include `myapp`.
In `myapp/workflows.py`, create a new Inngest function:
```python
from datetime import timedelta
import inngest
from django_inngest.client import inngest_client
@inngest_client.create_function(
id="myapp/my-function",
trigger=inngest.TriggerEvent(name="my/trigger/event"),
rate_limit=inngest.RateLimit(
limit=1,
period=timedelta(minutes=2, seconds=30),
key="event.data.channel_id",
),
)
def my_function(ctx: inngest.Context):
print(ctx.event.data.get("channel_id"))
# your inngest function logic here
return "OK"
```
Then trigger _anywhere_ in your Django project with:
```python
import inngest
from django_inngest.client import inngest_client
event = inngest.Event(
name="my/trigger/event",
data={"channel_id": "1234567890"},
)
inngest_client.send(event)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "django-inngest",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "background-tasks, django, event-driven, inngest, scheduler",
"author": null,
"author_email": "Justin Mitchel <justin@codingforentrepreneurs.com>",
"download_url": "https://files.pythonhosted.org/packages/de/b5/84ca91127d75118775adcfbd40d80c0d8898d3251ca636597ad3c021c83e/django_inngest-0.0.6.tar.gz",
"platform": null,
"description": "# Django Inngest\n\nMissing Django integration for Inngest. This package depends on the [Inngest Python SDK](https://github.com/inngest/inngest-python) ([pypi](https://pypi.org/project/inngest/))\n\n\n## Installation\n```bash\nuv add inngest django-inngest\n```\n\n## Configuration\n\nUpdate `urls.py` to include:\n\n```python\nfrom django.contrib import admin\nfrom django.urls import path, include\nfrom django_inngest.urls import inngest_urls\n\nurlpatterns = [\n # ...\n path(\"admin\", admin.site.urls),\n # ...\n]\n\n# uses DJANGO_INNGEST_SERVE_PATH from settings.py\nurlpatterns += inngest_urls\n```\n\n\nUpdate `settings.py` to include:\n\n```python\n# required for inngest and production\nINNGEST_EVENT_KEY = os.environ.get(\"INNGEST_EVENT_KEY\", None)\nINNGEST_SIGNING_KEY = os.environ.get(\"INNGEST_SIGNING_KEY\", None)\n\n# configuration\nDJANGO_INNGEST_APP_ID = os.environ.get(\"DJANGO_INNGEST_APP_ID\", \"my-django-project\")\nDJANGO_INNGEST_IS_PRODUCTION = not DEBUG\nDJANGO_INNGEST_CLIENT_LOGGER = os.environ.get(\n \"DJANGO_INNGEST_CLIENT_LOGGER\", \"gunicorn\"\n)\nDJANGO_INNGEST_INACTIVE_FUNCTION_IDS = os.environ.get(\n \"DJANGO_INNGEST_INACTIVE_FUNCTION_IDS\", []\n)\nDJANGO_INNGEST_AUTO_DISCOVER_FUNCTIONS = os.environ.get(\n \"DJANGO_INNGEST_AUTO_DISCOVER_FUNCTIONS\", True\n)\n# no trailing slash or leading slash\nDJANGO_INNGEST_SERVE_PATH = os.environ.get(\"DJANGO_INNGEST_SERVE_PATH\", \"api/inngest\")\n```\n\n## Usage\n\nCreate a new Django app and workflows file:\n```\npython manage.py startapp myapp\ntouch myapp/workflows.py\n```\nUpdate `INSTALLED_APPS` to include `myapp`.\n\nIn `myapp/workflows.py`, create a new Inngest function:\n```python\nfrom datetime import timedelta\n\nimport inngest\nfrom django_inngest.client import inngest_client\n\n\n@inngest_client.create_function(\n id=\"myapp/my-function\",\n trigger=inngest.TriggerEvent(name=\"my/trigger/event\"),\n rate_limit=inngest.RateLimit(\n limit=1,\n period=timedelta(minutes=2, seconds=30),\n key=\"event.data.channel_id\",\n ),\n)\ndef my_function(ctx: inngest.Context):\n print(ctx.event.data.get(\"channel_id\"))\n # your inngest function logic here\n return \"OK\"\n```\n\nThen trigger _anywhere_ in your Django project with:\n\n```python\nimport inngest\nfrom django_inngest.client import inngest_client\n\nevent = inngest.Event(\n name=\"my/trigger/event\",\n data={\"channel_id\": \"1234567890\"},\n)\n\ninngest_client.send(event)\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Missing Django integration for Inngest",
"version": "0.0.6",
"project_urls": {
"Changelog": "https://github.com/jmitchel3/django-inngest",
"Documentation": "https://github.com/jmitchel3/django-inngest",
"Funding": "https://github.com/jmitchel3/django-inngest",
"Repository": "https://github.com/jmitchel3/django-inngest"
},
"split_keywords": [
"background-tasks",
" django",
" event-driven",
" inngest",
" scheduler"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "58a88f78dbe9b6569d407228882b8b8ad99fd22212443957862689e542400317",
"md5": "f365ed0699fb7d9f498a07db239245bb",
"sha256": "549a6df18c3907f14bcd2032b3ee77f5bca87177d365a13535d83225bf34fb0a"
},
"downloads": -1,
"filename": "django_inngest-0.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f365ed0699fb7d9f498a07db239245bb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 6127,
"upload_time": "2025-10-25T05:59:32",
"upload_time_iso_8601": "2025-10-25T05:59:32.797125Z",
"url": "https://files.pythonhosted.org/packages/58/a8/8f78dbe9b6569d407228882b8b8ad99fd22212443957862689e542400317/django_inngest-0.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "deb584ca91127d75118775adcfbd40d80c0d8898d3251ca636597ad3c021c83e",
"md5": "6b6c899fd91ae950f794f89486fc3ce8",
"sha256": "e6c87cbba1ab8f22d16fc54aa4f384230d0eb97f445e4b70d9f0bf3ff7b642d2"
},
"downloads": -1,
"filename": "django_inngest-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "6b6c899fd91ae950f794f89486fc3ce8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 6513,
"upload_time": "2025-10-25T05:59:34",
"upload_time_iso_8601": "2025-10-25T05:59:34.333010Z",
"url": "https://files.pythonhosted.org/packages/de/b5/84ca91127d75118775adcfbd40d80c0d8898d3251ca636597ad3c021c83e/django_inngest-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-25 05:59:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jmitchel3",
"github_project": "django-inngest",
"github_not_found": true,
"lcname": "django-inngest"
}