Skip to content

Compatibility with Sanic #915

Answered by dantownsend
georges-g asked this question in Q&A
Discussion options

You must be logged in to vote

@georges-g Yeah, Piccolo should work fine with Sanic.

The reason we don't have a built-in template for Sanic is because I'm not sure if it allows you to mount ASGI apps within it.

Piccolo Admin is an ASGI application, and we usually mount it at /admin/ within the main application. If this isn't possible with Sanic, it's not the end of the world, because Piccolo Admin can just be run as a separate application.

Usually we create a connection pool when the application starts. Here's an example with FastAPI - I'm sure something similar is possible with Sanic's life cycle hooks:

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by georges-g
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@sinisaos
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants