{"id":23744,"library":"flask-celeryext","title":"Flask-CeleryExt","description":"Flask-CeleryExt provides a simple integration layer between Celery and Flask, offering a Flask extension for configuring Celery applications. Current version is 0.5.0 (requires Python >=3.6), with a maintenance-level release cadence.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/inveniosoftware/flask-celeryext","tags":["flask","celery","extension","integration","task queue"],"install":[{"cmd":"pip install flask-celeryext","lang":"bash","label":"pip"}],"dependencies":[],"imports":[{"note":"Correct import path","symbol":"FlaskCeleryExt","correct":"from flask_celeryext import FlaskCeleryExt"},{"note":"Helper function to create Celery app","symbol":"create_celery_app","correct":"from flask_celeryext import create_celery_app"}],"quickstart":{"code":"from flask import Flask\nfrom flask_celeryext import FlaskCeleryExt\n\napp = Flask(__name__)\napp.config['CELERY_BROKER_URL'] = 'redis://localhost:6379/0'\napp.config['CELERY_RESULT_BACKEND'] = 'redis://localhost:6379/0'\next = FlaskCeleryExt(app)\ncelery = ext.celery\n\n@celery.task\ndef add(x, y):\n    return x + y\n\nif __name__ == '__main__':\n    app.run()","lang":"python","description":"Minimal Flask app with Celery task using Flask-CeleryExt."},"warnings":[{"fix":"Set config keys with 'CELERY_' prefix, e.g., app.config['CELERY_BROKER_URL'] = '...'.","message":"Flask-CeleryExt expects Celery configuration keys like 'CELERY_BROKER_URL' (uppercase with CELERY_ prefix). Using lowercase or missing prefix will silently default to localhost.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace app.config['BROKER_URL'] with app.config['CELERY_BROKER_URL'].","message":"The 'BROKER_URL' configuration key (without CELERY_ prefix) is deprecated as of v0.4.2. Use 'CELERY_BROKER_URL' instead.","severity":"deprecated","affected_versions":">=0.4.2"},{"fix":"Use the provided 'create_celery_app' function or ensure tasks are defined after the extension is initialized with the app.","message":"Flask-CeleryExt does not automatically handle Flask application context for Celery tasks. You must use the @celery.task decorator within an application context or use the create_celery_app helper to avoid context issues.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Upgrade to flask-celeryext>=0.4.0: pip install --upgrade flask-celeryext","cause":"Importing directly from 'flask_celeryext' without upgrading to a version that includes create_celery_app (added in 0.4.0).","error":"AttributeError: module 'flask_celeryext' has no attribute 'create_celery_app'"},{"fix":"Ensure app.config['CELERY_BROKER_URL'] is set to a valid broker URL (e.g., 'redis://localhost:6379/0')","cause":"Forgetting to set 'CELERY_BROKER_URL' in Flask app config, or setting it with wrong key name.","error":"celery.exceptions.ImproperlyConfigured: No broker configured"},{"fix":"Initialize Celery using FlaskCeleryExt(app) or use 'with app.app_context():' when executing tasks outside request context.","cause":"Using Celery tasks outside of Flask application context without proper setup.","error":"RuntimeError: Working outside of application context"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}