- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 442 for modAlt (0.07 sec)
-
cmd/data-usage-cache.go
return cycles == 1 } return uint32(xxhash.Sum64String(string(h)))%cycles == cycle%cycles } // modAlt returns true if the hash mod cycles == cycle. // This is out of sync with mod. // If cycles is 0 false is always returned. // If cycles is 1 true is always returned (as expected). func (h dataUsageHash) modAlt(cycle uint32, cycles uint32) bool { if cycles <= 1 { return cycles == 1 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 15:30:50 UTC 2024 - 34.7K bytes - Viewed (0) -
cmd/data-scanner.go
objectName: path.Base(entName), debug: f.dataUsageScannerDebug, lifeCycle: activeLifeCycle, replication: replicationCfg, } item.heal.enabled = thisHash.modAlt(f.oldCache.Info.NextCycle/folder.objectHealProbDiv, f.healObjectSelect/folder.objectHealProbDiv) && f.shouldHeal() item.heal.bitrot = f.scanMode == madmin.HealDeepScan sz, err := f.getSize(item)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 22 21:10:34 UTC 2024 - 48.4K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model/app_pv1.py
from fastapi import Depends, FastAPI from pydantic import BaseModel, validator app = FastAPI() class ModelB(BaseModel): username: str class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None model_b: ModelB @validator("name") def lower_username(cls, name: str, values): if not name.endswith("A"):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 784 bytes - Viewed (0) -
docs/pt/docs/tutorial/body-nested-models.md
## Modelos aninhados Cada atributo de um modelo Pydantic tem um tipo. Mas esse tipo pode ser outro modelo Pydantic. Portanto, você pode declarar "objects" JSON profundamente aninhados com nomes, tipos e validações de atributos específicos. Tudo isso, aninhado arbitrariamente. ### Defina um sub-modelo Por exemplo, nós podemos definir um modelo `Image`: ```Python hl_lines="9-11"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
from pydantic import BaseModel, ValidationInfo, field_validator app = FastAPI() class ModelB(BaseModel): username: str class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None foo: ModelB @field_validator("name") def lower_username(cls, name: str, info: ValidationInfo):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.3K bytes - Viewed (0) -
tests/test_duplicate_models_openapi.py
from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Model(BaseModel): pass class Model2(BaseModel): a: Model class Model3(BaseModel): c: Model d: Model2 @app.get("/", response_model=Model3) def f(): return {"c": {}, "d": {"a": {}}} client = TestClient(app) def test_get_api_route():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.1K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model/test_filter_pydantic_sub_model_pv1.py
return client @needs_pydanticv1 def test_filter_sub_model(client: TestClient): response = client.get("/model/modelA") assert response.status_code == 200, response.text assert response.json() == { "name": "modelA", "description": "model-a-desc", "model_b": {"username": "test-user"}, } @needs_pydanticv1 def test_validator_is_cloned(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/query-param-models.md
Isso permitiria que você **reutilizasse o modelo** em **diversos lugares**, e também declarasse validações e metadados de todos os parâmetros de uma única vez. 😎 /// note | Nota Isso é suportado desde o FastAPI versão `0.115.0`. 🤓 /// ## Parâmetros de Consulta com um Modelo Pydantic
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 15 09:53:14 UTC 2024 - 4.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/extra-models.md
# Modelos Adicionais Continuando com o exemplo anterior, será comum ter mais de um modelo relacionado. Isso é especialmente o caso para modelos de usuários, porque: * O **modelo de entrada** precisa ser capaz de ter uma senha. * O **modelo de saída** não deve ter uma senha. * O **modelo de banco de dados** provavelmente precisaria ter uma senha criptografada. /// danger
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.8K bytes - Viewed (0) -
docs/de/docs/tutorial/extra-models.md
# Extramodelle Fahren wir beim letzten Beispiel fort. Es gibt normalerweise mehrere zusammengehörende Modelle. Insbesondere Benutzermodelle, denn: * Das **hereinkommende Modell** sollte ein Passwort haben können. * Das **herausgehende Modell** sollte kein Passwort haben.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.7K bytes - Viewed (0)