入门 通过在.ini中设置包含内容或调用config.include('pyramid_celery') : pyramid.includes = pyramid_celery 然后,您只需要告诉pyramid_celery您的[celery]节位于哪个ini文件中即可: config . configure_celery ( 'development.ini' ) 然后,您可以自由使用celery,例如基于类的: from pyramid_celery import celery_app as app class AddTask ( app . Task ): def run ( self , x , y ): print x + y 或基于装饰器: from pyramid_celery import celery_app as app @ ap