Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for safe_load (0.05 seconds)

  1. docs_src/path_operation_advanced_configuration/tutorial007_py310.py

                "required": True,
            },
        },
    )
    async def create_item(request: Request):
        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.model_validate(data)
        except ValidationError as e:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 797 bytes
    - Click Count (0)
  2. scripts/translate.py

    general_prompt = general_prompt_path.read_text(encoding="utf-8")
    
    app = typer.Typer()
    
    
    @lru_cache
    def get_langs() -> dict[str, str]:
        return yaml.safe_load(Path("docs/language_names.yml").read_text(encoding="utf-8"))
    
    
    def generate_lang_path(*, lang: str, path: Path) -> Path:
        en_docs_path = Path("docs/en/docs")
        assert str(path).startswith(str(en_docs_path)), (
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:37:41 GMT 2026
    - 15.8K bytes
    - Click Count (0)
Back to Top