Accelerate your web app development | Build fast. Run fast.
MIT License
Bot releases are visible (Hide)
Full Changelog: https://github.com/sanic-org/sanic/compare/v23.12.0...v23.12.1
Published by ahopkins 10 months ago
Current version
websocket.handler.<before/after/exception>
signalsSanic.event()
Request.scheme
for websocket requestsRequest
to a Websockets Request
for handshakesanic
CLItest_fast
when there is only one CPURequest
to WebSocket Request
in websocket_handshake
by @ChihweiLHBird in https://github.com/sanic-org/sanic/pull/2858
Full Changelog: https://github.com/sanic-org/sanic/compare/v23.6.0...v23.12.0
Published by ahopkins about 1 year ago
KEEP_ALIVE_TIMEOUT
default to 120 secondsrequest.client_ip
JSONREsponse
default content typeRequest.get_current
in ASGI modeheaders
argument of ResponseStream
constructor is None
by @liamcoatman in https://github.com/sanic-org/sanic/pull/2729
Full Changelog: https://github.com/sanic-org/sanic/compare/v23.3.0...v23.6.0
Published by ahopkins over 1 year ago
#2545 Standardize init of exceptions for more consistent control of HTTP responses using exceptions
#2606 Decode headers as UTF-8 also in ASGI
#2646 Separate ASGI request and lifespan callables
#2659 Use FALLBACK_ERROR_FORMAT
for handlers that return empty()
#2662 Add basic file browser (HTML page) and auto-index serving
#2667 Nicer traceback formatting (HTML page)
#2668 Smarter error page rendering format selection; more reliant upon header and "common sense" defaults
#2680 Check the status of socket before shutting down with SHUT_RDWR
#2687 Refresh Request.accept
functionality to be more performant and spec-compliant
#2696 Add header accessors as properties
Example-Field: Foo, Bar
Example-Field: Baz
request.headers.example_field == "Foo, Bar,Baz"
#2700 Simpler CLI targets
$ sanic path.to.module:app # global app instance
$ sanic path.to.module:create_app # factory pattern
$ sanic ./path/to/directory/ # simple serve
#2701 API to define a number of workers in managed processes
#2704 Add convenience for dynamic changes to routing
#2706 Add convenience methods for cookie creation and deletion
response = text("...")
response.add_cookie("test", "It worked!", domain=".yummy-yummy-cookie.com")
#2707 Simplified parse_content_header
escaping to be RFC-compliant and remove outdated FF hack
#2710 Stricter charset handling and escaping of request URLs
#2711 Consume body on DELETE
by default
#2719 Allow password
to be passed to TLS context
#2720 Skip middleware on RequestCancelled
#2721 Change access logging format to %s
#2722 Add CertLoader
as application option for directly controlling SSLContext
objects
#2725 Worker sync state tolerance on race condition
file
when using If-Modified-Since
__blueprintname__
property'https'
to create the redirectFull Changelog: https://github.com/sanic-org/sanic/compare/v22.12.0...v23.3.0
Published by ahopkins almost 2 years ago
JSONResponse
class with some convenient methods when updating a response objectuvloop
requirement to >=0.15.0
websockets
v11.0SIGKILL
on subsequent ctrl+c
to force worker exitspawn
for all subprocesses unless specifically set:
from sanic import Sanic
Sanic.start_method = "fork"
priority
to register_middleware
methodunquote
to add_route
methodtext
or bytes
StrEnum
in Python 3.11+signal.extra
--inspect*
commands have been deprecated in favor of inspect ...
commandsdistutils.strtobool
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.9.1...v22.12.0
Published by ahopkins almost 2 years ago
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.9.0...v22.9.1
Published by ahopkins about 2 years ago
WebsocketImplProtocol
async iterablepathlib
for path resolution (for static file serving)path.parts
instead of match
(for static file serving)request.is_safe
request.is_idempotent
request.is_cacheable
_static_request_handler
http.handler.before
http.handler.after
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.6.0...v22.9.0
Published by ahopkins about 2 years ago
#2522 Always show server location in ASGI
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.6.1...v22.6.2
Published by ahopkins about 2 years ago
Resolves #2477 and #2478
See also #2495 and https://github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.6.0...v22.6.1
Published by ahopkins about 2 years ago
Resolves #2477 and #2478
See also #2495 and https://github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6
Full Changelog: https://github.com/sanic-org/sanic/compare/v21.12.1...v21.12.2
Published by ahopkins about 2 years ago
Resolves #2477 and #2478
See also #2495 and https://github.com/sanic-org/sanic/security/advisories/GHSA-8cw9-5hmv-77w6
Full Changelog: https://github.com/sanic-org/sanic/compare/v20.12.6...v20.12.7
Published by ahopkins over 2 years ago
DEBUG
mode
task.cancel
BadRequest
, MethodNotAllowed
, RangeNotSatisfiable
)scope
as a property on the Request
objectfrom sanic import Websocket
Request.get_form
loads
functionRequest.get_current()
pythonw.exe
or places where there is no sys.stdout
http.lifecycle.request
signal in ASGI modeErrorHandler
LOGO
settingsanic.response.stream
AsyncioServer.init
Extend
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.3.1...v22.6.0
Published by ahopkins over 2 years ago
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.3.1...v22.3.2
Published by ahopkins over 2 years ago
Full Changelog: https://github.com/sanic-org/sanic/compare/v22.3.0...v22.3.1
Published by ahopkins over 2 years ago
sanic.worker.GunicornWorker
has been removed. To run Sanic with gunicorn
, you should use it thru uvicorn
as described in their docs.Authorization
header as Request.credentials
Touchup
step in application startupmultidict
v0.6<file:ext>
, <file:ext=jpg>
, <file:ext=jpg|png|gif|svg>
, <file=int:ext>
, <file=int:ext=jpg|png|gif|svg>
, <file=float:ext=tar.gz>
path
type matching, and is being released as a beta feature only.register_pattern
to accept a str
or Pattern
strorempty
pattern type
/<foo>
or /<foo:str>
) would match on any string, including empty strings. It will now only match a non-empty string. To retain the old behavior, you should use the new parameter type: /<foo:strorempty>
.error_logger
on websocketsNone
in task registryhost
values)debug=True
and --debug
do NOT automatically run auto_reload
auto
looks at headers)config
is required for ErrorHandler.finalize
ErrorHandler.lookup
requires two positional argssanic-routing
changesRequest.respond
Published by ahopkins over 2 years ago
Full Changelog: https://github.com/sanic-org/sanic/compare/v20.12.5...v20.12.6
Published by ahopkins almost 3 years ago
#2366 Upgrade websockets
version - SECURITY UPDATE
Published by ahopkins almost 3 years ago
Published by ahopkins almost 3 years ago
uvloop
by configurationget
is no longer 100% determinative. There is now an additional step to loop thru the returned signals for proper matching on the requirements. If signals are being dispatched using app.dispatch
or bp.dispatch
, there is no change.app.run
Enum
websocket_handshake
http.lifecyle.response
from exception handlerSanic
and Blueprint
may no longer have arbitrary properties attached to themSanic
and Blueprint
forced to have compliant names
_
+ -
_
load_env
keyword argument of Sanic
sanic.exceptions.abort
sanic.views.CompositionView
sanic.response.StreamingHTTPResponse
stream()
response method (where you pass a callable streaming function) has been deprecated and will be removed in v22.6. You should upgrade all streaming responses to the new style: https://sanicframework.org/en/guide/advanced/streaming.html#response-streaming
Published by ahopkins almost 3 years ago
Rerelease of v21.9.2 with some cleanup