Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for from (0.14 sec)

  1. fastapi/__init__.py

    from .param_functions import File as File
    from .param_functions import Form as Form
    from .param_functions import Header as Header
    from .param_functions import Path as Path
    from .param_functions import Query as Query
    from .param_functions import Security as Security
    from .requests import Request as Request
    from .responses import Response as Response
    from .routing import APIRouter as APIRouter
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:50:18 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  2. pdm_build.py

    import os
    from typing import Any, Dict, List
    
    from pdm.backend.hooks import Context
    
    TIANGOLO_BUILD_PACKAGE = os.getenv("TIANGOLO_BUILD_PACKAGE", "fastapi")
    
    
    def pdm_build_initialize(context: Context) -> None:
        metadata = context.config.metadata
        # Get custom config for the current package, from the env var
        config: Dict[str, Any] = context.config.data["tool"]["tiangolo"][
            "_internal-slim-build"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 30 06:38:13 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  3. docs/en/docs/features.md

    You write standard Python with types:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declare a variable as a str
    # and get editor support inside the function
    def main(user_id: str):
        return user_id
    
    
    # A Pydantic model
    class User(BaseModel):
    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)
  4. docs/en/docs/advanced/openapi-callbacks.md

        "paid": true
    }
    ```
    
    and it would expect a response from that *external API* with a JSON body like:
    
    ```JSON
    {
        "ok": true
    }
    ```
    
    !!! tip
        Notice how the callback URL used contains the URL received as a query parameter in `callback_url` (`https://www.external.org/events`) and also the invoice `id` from inside of the JSON body (`2expen51ve`).
    
    ### Add the callback router
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  5. api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelResolver.java

    import org.apache.maven.api.Session;
    import org.apache.maven.api.annotations.Nonnull;
    import org.apache.maven.api.model.Dependency;
    import org.apache.maven.api.model.Parent;
    
    /**
     * Resolves a POM from its coordinates.
     */
    public interface ModelResolver extends Service {
    
        /**
         * Tries to resolve the POM for the specified parent coordinates possibly updating {@code parent}.
         *
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu May 02 15:10:38 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/wsgi.md

    ```txt
    Hello, World from Flask!
    ```
    
    And if you go to <a href="http://localhost:8000/v2" class="external-link" target="_blank">http://localhost:8000/v2</a> you will see the response from FastAPI:
    
    ```JSON
    {
        "message": "Hello World"
    }
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu May 02 22:37:31 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  7. cmd/erasure-common.go

    	for _, i := range r.Perm(len(disks)) {
    		if disks[i] != nil && disks[i].IsLocal() {
    			newDisks = append(newDisks, disks[i])
    		}
    	}
    	return newDisks
    }
    
    // readMultipleFiles Reads raw data from all specified files from all disks.
    func readMultipleFiles(ctx context.Context, disks []StorageAPI, req ReadMultipleReq, readQuorum int) ([]ReadMultipleResp, error) {
    	resps := make([]chan ReadMultipleResp, len(disks))
    	for i := range resps {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 28 17:53:50 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  8. docs/en/docs/advanced/websockets.md

    ```Python hl_lines="1  46-47"
    {!../../../docs_src/websockets/tutorial001.py!}
    ```
    
    !!! note "Technical Details"
        You could also use `from starlette.websockets import WebSocket`.
    
        **FastAPI** provides the same `WebSocket` directly just as a convenience for you, the developer. But it comes directly from Starlette.
    
    ## Await for messages and send messages
    
    In your WebSocket route you can `await` for messages and send messages.
    
    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)
  9. cni/pkg/nodeagent/server.go

    	if err != nil {
    		log.Errorf("failed to remove pod from mesh: %v", err)
    		return err
    	}
    	log.Debug("removing annotation from pod")
    	err = util.AnnotateUnenrollPod(s.kubeClient, &pod.ObjectMeta)
    	if err != nil {
    		log.Errorf("failed to annotate pod unenrollment: %v", err)
    	}
    	return err
    }
    
    // Delete pod from mesh: pod is deleted. iptables rules will die with it, we just need to update ztunnel
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  10. cni/pkg/ipset/nldeps_linux.go

    	err := netlink.IpsetDel(name, &netlink.IPSetEntry{
    		IP:       net.IP(ip.AsSlice()),
    		Protocol: &ipProto,
    	})
    	if err != nil {
    		return fmt.Errorf("failed to delete IP %s with and proto %d from ipset %s: %w", ip, ipProto, name, err)
    	}
    	return nil
    }
    
    func (m *realDeps) flush(name string) error {
    	err := netlink.IpsetFlush(name)
    	if err != nil {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Apr 30 22:24:38 GMT 2024
    - 3.9K bytes
    - Viewed (0)
Back to top