Skip to content
#

asyncio

Here are 1,888 public repositories matching this topic...

fastapi
tiangolo
tiangolo commented Jun 12, 2020

First check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the FastAPI documentation, with the integrated search.
  • I already searched in Google "How to X in FastAPI" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answ
asvetlov
asvetlov commented Nov 23, 2020

The library has many constant definitions that are declared as NAME = 'val', e.g. https://github.com/aio-libs/aiohttp/blob/master/aiohttp/client.py#L161

We need to add Final type hint to let users know that these constants should be considered as immutable (this hint doesn't prevent the actual modification and fully backward compatible).

from typing_extensions import Final  # suppor
usernein
usernein commented May 29, 2020

Example of usage:

users = await User.filter(first_name__ilike="c%r")

I know this can be done with startswith and endswith, but there are cases where using the LIKE operator is better:

users = await User.filter(first_name__ilike="j_r%")

This would be used to match Jeremy, Jorge, Jordan...

Improve this page

Add a description, image, and links to the asyncio topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the asyncio topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.