- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for connections (0.25 sec)
-
docs_src/websockets/tutorial003_py39.py
</html> """ class ConnectionManager: def __init__(self): self.active_connections: list[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, websocket: WebSocket):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.5K bytes - Viewed (0) -
docs_src/websockets/tutorial003.py
</html> """ class ConnectionManager: def __init__(self): self.active_connections: List[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket) async def send_personal_message(self, message: str, websocket: WebSocket):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Aug 09 13:52:19 GMT 2020 - 2.5K bytes - Viewed (0) -
docs/en/docs/advanced/websockets.md
``` Client #1596980209979 left the chat ``` !!! tip The app above is a minimal and simple example to demonstrate how to handle and broadcast messages to several WebSocket connections. But keep in mind that, as everything is handled in memory, in a single list, it will only work while the process is running, and will only work with a single process.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 6.2K bytes - Viewed (0) -
docs/en/docs/features.md
* **Automatic validation** even for *path operation* parameters defined in dependencies. * Support for complex user authentication systems, **database connections**, etc. * **No compromise** with databases, frontends, etc. But easy integration with all of them. ### Unlimited "plug-ins" Or in other way, no need for them, import and use the code you need.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.3K bytes - Viewed (0) -
docs/en/docs/how-to/sql-databases-peewee.md
```Python hl_lines="18-20" {!../../../docs_src/sql_databases_peewee/sql_app/main.py!} ``` For the **next request**, as we will reset that context variable again in the `async` dependency `reset_db_state()` and then create a new connection in the `get_db()` dependency, that new request will have its own database state (connection, transactions, etc). !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 16 13:23:25 GMT 2024 - 23.6K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
This is very useful when you need to: * Have shared logic (the same code logic again and again). * Share database connections. * Enforce security, authentication, role requirements, etc. * And many other things... All these, while minimizing code repetition. ## First Steps
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.6K bytes - Viewed (0) -
docs/en/layouts/custom.yml
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # ----------------------------------------------------------------------------- # Configuration
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Mon Jun 26 14:05:43 GMT 2023 - 6.5K bytes - Viewed (0) -
docs/fr/docs/help-fastapi.md
Vous pouvez y sélectionner "Releases only". Ainsi, vous recevrez des notifications (dans votre courrier électronique) chaque fois qu'il y aura une nouvelle version de **FastAPI** avec des corrections de bugs et de nouvelles fonctionnalités. ## Se rapprocher de l'auteur Vous pouvez vous rapprocher de <a href="https://tiangolo.com" class="external-link" target="_blank">moi (Sebastián Ramírez / `tiangolo`)</a>, l'auteur.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Oct 20 08:39:03 GMT 2023 - 5.7K bytes - Viewed (0) -
docs/fr/docs/features.md
* **Validation automatique** même pour les paramètres de *path operation* définis dans les dépendances. * Supporte les systèmes d'authentification d'utilisateurs complexes, les **connexions de base de données**, etc. * **Aucun compromis** avec les bases de données, les frontends, etc. Mais une intégration facile avec n'importe lequel d'entre eux. ### "Plug-ins" illimités
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.1K bytes - Viewed (0) -
tests/test_http_connection_injection.py
app.state.value = 42 async def extract_value_from_http_connection(conn: HTTPConnection): return conn.app.state.value @app.get("/http") async def get_value_by_http(value: int = Depends(extract_value_from_http_connection)): return value @app.websocket("/ws") async def get_value_by_ws( websocket: WebSocket, value: int = Depends(extract_value_from_http_connection) ): await websocket.accept()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Aug 09 13:56:41 GMT 2020 - 972 bytes - Viewed (0)