Commit Graph

87 Commits

Author SHA1 Message Date
Jordan Speicher 42592d68e5
anyio integration (#1157)
* First whack at anyio integration

* Fix formatting

* Remove debug messages

* mypy fixes

* Update README.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Fix install_requires typo

* move_on_after blocks if deadline is too small

* Linter fixes

* Improve WSGI structured concurrency

* Tests use anyio

* Checkin progress on testclient

* Prep for anyio 3

* Remove debug backend option

* Use anyio 3.0.0rc1

* Remove old style executor from GraphQLApp

* Fix extra import

* Don't cancel task scope early

* Wait for wsgi sender to finish before exiting

* Use memory object streams in websocket tests

* Test on asyncio, asyncio+uvloop, and trio

* Formatting fixes

* run_until_first_complete doesn't need a return

* Fix middleware app call

* Simplify middleware exceptions

* Use anyio for websocket test

* Set STARLETTE_TESTCLIENT_ASYNC_BACKEND in tests

* Pass async backend to portal

* Formatting fixes

* Bump anyio

* Cleanup portals and add TestClient.async_backend

* Use anyio.run_async_from_thread to send from worker thread

* Use websocket_connect as context manager

* Document changes in TestClient

* Formatting fix

* Fix websocket raises coverage

* Update to anyio 3.0.0rc3 and replace aiofiles

* Apply suggestions from code review

Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>

* Bump to require anyio 3.0.0 final

* Remove mention of aiofiles in README.md

* Pin jinja2 to releases before 3 due to DeprecationWarnings

* Add task_group as application attribute

* Remove run_until_first_complete

* Undo jinja pin

* Refactor anyio.sleep into an event

* Use one less task in test_websocket_concurrency_pattern

* Apply review suggestions

* Rename argument

* fix start_task_soon type

* fix BaseHTTPMiddleware when used without Starlette

* Testclient receive() is a non-trapping function if the response is already complete

This allows for a zero deadline when waiting for a disconnect message

* Use variable annotation for async_backend

* Update docs regarding dependency on anyio

* Use CancelScope instead of move_on_after in request.is_disconnected

* Cancel task group after returning middleware response

Add test for https://github.com/encode/starlette/issues/1022

* Add link to anyio backend options in testclient docs

* Add types-dataclasses

* Re-implement starlette.concurrency.run_until_first_complete and add a test

* Fix type on handler callable

* Apply review comments to clarify run_until_first_complete scope

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
Co-authored-by: Alex Grönholm <alex.gronholm@nextday.fi>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2021-06-18 15:48:43 +01:00
Tom Christie 54e6ed38de
Update README.md (#1185)
Drop defunct "community" link, since we're just using GitHub "discussions" now.
2021-05-25 11:35:18 +01:00
Jamie Hewland 99b37781eb
Remove UJSONResponse (#1047)
* Remove UJSONResponse

* Add documentation about custom JSON serialization
2020-11-08 22:49:12 +02:00
Tom Christie 36d4557b48
Update README.md 2020-04-23 16:10:29 +01:00
Tom Christie e2d3c22976
Update README.md 2020-04-23 16:07:13 +01:00
Jeff Triplett 6ddd0523b0 📝 Fixes example typo in README (#717)
Thanks!
2019-11-13 18:56:47 +00:00
Tom Christie 7f8cd04173
Version 0.13 (#704)
* Version 0.13

* Fix misnamed requirement

* Updating routing docs

* Update routing docs

* Update docs

* Simpler Middleware signature

* Update middleware docs

* Update exception docs

* Allow 'None' in middleware lists, for easy disabling of middleware.

* Update README
2019-11-13 12:25:18 +00:00
Tom Christie b2f9f4359b
Merge pull request #561 from rafalp/update-readme-code-example
Update framework example in readme to use ASGI 3
2019-06-24 11:04:29 +01:00
Rafał Pitoń 44417775dc Update framework example in readme 2019-06-24 11:46:46 +02:00
Tom Christie 5604261c03
Update README.md 2019-06-19 12:54:26 +01:00
Tom Christie 7bae09a062
Update README.md 2019-06-19 12:54:13 +01:00
Tom Christie 3fd0dd6190 Update image 2019-05-21 09:50:46 +01:00
Vic Shóstak ed3d4a3d0e Update logo <img> with new logo 2019-05-20 22:02:32 +03:00
Mostafa Aitbrahim 9530470c59 Fix README.md (#438) 2019-03-19 09:17:39 +00:00
Tom Christie 9016e634d4 Docs tweaks 2019-03-11 14:35:30 +00:00
Ahti Kitsik 47207129ec Doc hint about enabling code reload support (#417) 2019-03-04 15:01:16 +00:00
Tom Christie f3b5409dbc Drop SQLAlchemy note, since we don't currently have any components that require it. 2019-02-19 13:45:10 +00:00
Tom Christie 9b57e516cc Docs and version bump 2019-02-18 13:38:04 +00:00
Daniel Hahler 9d0b4c01bd README: minor revisit [ci skip] (#265) 2018-12-11 13:07:16 +00:00
Tom Christie 99921cef70 Fix SQLAlchemy link 2018-12-07 13:07:12 +00:00
Tom Christie ce9556acce
Authentication (#256)
* Authentication

* Fleshing out authentication support

* Version 0.9.6
2018-12-07 13:05:31 +00:00
Taoufik 9fa4b56030 Update broken link (#224)
* Update broken link

* Update broken link
2018-11-18 18:26:47 +00:00
Tom Christie c96eb9a4f7 Add Jinja2 link 2018-11-08 16:36:39 +00:00
Tom Christie 2ef21f49c9
Jinja2 (#198)
* Use jinja2 for a default template configuration

* Add release notes
2018-11-08 16:14:14 +00:00
Tom Christie c2d5813076 Link to example repo 2018-11-08 13:12:37 +00:00
Tom Christie 83ab71dad0 Version 0.7.1 2018-11-05 12:08:34 +00:00
Urchin 5ded82ff0e Update README.md (#174) 2018-11-05 11:49:00 +00:00
Tom Christie ed970c86be Update 'Performance' section 2018-11-01 14:41:55 +00:00
Tom Christie 81c4306a3a
Add OpenAPIResponse, API Schema docs, etc... (#171) 2018-11-01 12:52:03 +00:00
Tom Christie 5488af66d7 Fix linking 2018-10-31 09:42:07 +00:00
Tom Christie 0ae9a7f523 Link out to other projects 2018-10-31 09:39:10 +00:00
Tom Christie 7ab015d8e8 Update README/homepage 2018-10-29 16:49:13 +00:00
Tom Christie 87da226f1c
Session middleware (#157)
* Use isort for consistent import ordering

* Add SessionMmiddleware support

* Add SessionMiddleware support
2018-10-29 16:16:51 +00:00
Tom Christie 315a21be85
GraphQL support (#126)
* GraphQL support

* GraphQL support

* Run GraphQL queries inside a threadpool

* Support AsyncioExecutor

* GraphQL error formatting

* Docs for GraphQL support
2018-10-18 14:45:18 +01:00
gfeun e7a5b22cf2 Fix typo in README example (#117) 2018-10-17 11:08:06 +01:00
Tom Christie 65704a8083 Note zero hard dependencies 2018-10-17 09:00:45 +01:00
Tom Christie b829248e7d Add feature list to README/docs 2018-10-16 16:10:24 +01:00
Tom Christie c43a070eed
Form parsing (#102)
* Work towards MultiPartParser

* Work towards MultiPartParser

* Add test for multipart files

* MultiPart parsing

* Fix for large multipart messages

* Add python-multipart to docs

* Add python-multipart to 'pip install starlette[full]'

* Add FormParser

* Add docs for request.form()

* Drop mypy momentarily
2018-10-12 18:15:04 +01:00
Tom Christie 09ce2c373a Version 0.4.0 2018-10-10 17:12:58 +01:00
Karan Suthar 27fc98b58b unicorn command correction in docs (#97) 2018-10-09 12:41:53 +01:00
Tom Christie 12e4ef60d7
Add link to latest TechEmpower benchmarks (#61) 2018-09-20 10:00:25 +01:00
Tom Christie e6cd2d7e86 Tweak example: access logs on, port 8000 2018-09-05 11:44:54 +01:00
Tom Christie 78d1829758
Version 0.3 (#57)
* Renamings

* Version 0.3.0

* Black formatting

* Update docs for 0.3
2018-09-05 11:39:38 +01:00
Jordan Eremieff f4fe0ec312 Name changes (#55)
* Rename View -> HTTPEndpoint

* Rename views doc file -> endpoints

* Rename request/response files -> requests/responses, update imports, update docs

* Rename WebSocketSession -> WebSocket, rename session -> websocket in docs

* Full module imports in tests and source, removing imports from __init__ file

* Fix name in testclient doc
2018-09-05 10:29:04 +01:00
Tom Christie 4549d625f9 Make docs link more prominent 2018-08-29 11:33:59 +01:00
Tom Christie 6b6b818a00 Move documentation out of README 2018-08-29 11:31:32 +01:00
Tom Christie 779516a5ac Fixes to TestClient websocket docs 2018-08-28 14:45:23 +01:00
Tom Christie 00a972c719
Add App class (#42)
* Add App class

* Black formatting

* Support kwargs in App routes

* Black formatting

* Use protocol based routing in app

* WebSocket close when no route found

* session.send(...), session.receive(...) for test client

* Support app.mount(prefix, app)

* Black formatting

* Black formatting

* Minor tweaks to websocket test client

* Add 'App' to README
2018-08-28 14:34:18 +01:00
Tom Christie 78fae57bc3 Update table of contents 2018-08-27 15:42:05 +01:00
Jeff Buttars 99fd15e380 Add a TOC to the repo README (#40) 2018-08-27 15:38:56 +01:00