- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 71 for Rashed (0.18 sec)
-
docs_src/security/tutorial003_an_py39.py
if not user_dict: raise HTTPException(status_code=400, detail="Incorrect username or password") user = UserInDB(**user_dict) hashed_password = fake_hash_password(form_data.password) if not hashed_password == user.hashed_password: raise HTTPException(status_code=400, detail="Incorrect username or password") return {"access_token": user.username, "token_type": "bearer"}
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 2.5K bytes - Viewed (0) -
docs_src/security/tutorial004.py
disabled: Union[bool, None] = None class UserInDB(User): hashed_password: str pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") app = FastAPI() def verify_password(plain_password, hashed_password): return pwd_context.verify(plain_password, hashed_password) def get_password_hash(password):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4K bytes - Viewed (0) -
docs_src/security/tutorial004_an.py
disabled: Union[bool, None] = None class UserInDB(User): hashed_password: str pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") app = FastAPI() def verify_password(plain_password, hashed_password): return pwd_context.verify(plain_password, hashed_password) def get_password_hash(password):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 4.1K bytes - Viewed (0) -
docs/en/docs/tutorial/body-fields.md
You will learn more about adding extra information later in the docs, when learning to declare examples. !!! warning Extra keys passed to `Field` will also be present in the resulting OpenAPI schema for your application.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial005_an.py
assert response.json() == {"detail": "Not authenticated"} assert response.headers["WWW-Authenticate"] == "Bearer" def test_verify_password(): assert verify_password("secret", fake_users_db["johndoe"]["hashed_password"]) def test_get_password_hash(): assert get_password_hash("secretalice") def test_create_access_token(): access_token = create_access_token(data={"data": "foo"}) assert access_token
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Mar 13 19:07:10 GMT 2024 - 15.4K bytes - Viewed (0) -
docs/en/docs/how-to/graphql.md
Depending on your use case, you might prefer to use a different library, but if you asked me, I would probably suggest you try **Strawberry**. Here's a small preview of how you could integrate Strawberry with FastAPI: ```Python hl_lines="3 22 25-26"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 3.4K bytes - Viewed (0) -
docs/en/docs/tutorial/testing.md
Thanks to <a href="https://www.starlette.io/testclient/" class="external-link" target="_blank">Starlette</a>, testing **FastAPI** applications is easy and enjoyable. It is based on <a href="https://www.python-httpx.org" class="external-link" target="_blank">HTTPX</a>, which in turn is designed based on Requests, so it's very familiar and intuitive.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 6.2K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params.md
You can declare path "parameters" or "variables" with the same syntax used by Python format strings: ```Python hl_lines="6-7" {!../../../docs_src/path_params/tutorial001.py!} ``` The value of the path parameter `item_id` will be passed to your function as the argument `item_id`. So, if you run this example and go to <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, you will see a response of:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 9.1K bytes - Viewed (0) -
docs/zh/docs/tutorial/sql-databases.md
```Python hl_lines="18-24 31-36" {!../../../docs_src/sql_databases/sql_app/crud.py!} ``` !!! tip SQLAlchemy 模型`User`包含一个`hashed_password`,它应该是一个包含散列的安全密码。 但由于 API 客户端提供的是原始密码,因此您需要将其提取并在应用程序中生成散列密码。 然后将hashed_password参数与要保存的值一起传递。 !!! warning 此示例不安全,密码未经过哈希处理。 在现实生活中的应用程序中,您需要对密码进行哈希处理,并且永远不要以明文形式保存它们。 有关更多详细信息,请返回教程中的安全部分。
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 27K bytes - Viewed (0) -
docs/ru/docs/deployment/docker.md
# (2) WORKDIR /tmp # (3) RUN pip install poetry # (4) COPY ./pyproject.toml ./poetry.lock* /tmp/ # (5) RUN poetry export -f requirements.txt --output requirements.txt --without-hashes # (6) FROM python:3.9 # (7) WORKDIR /code # (8) COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt # (9)
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 57.5K bytes - Viewed (0)