Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 108 for url (0.15 sec)

  1. fastapi/security/oauth2.py

            tokenUrl: Annotated[
                str,
                Doc(
                    """
                    The URL to obtain the OAuth2 token.
                    """
                ),
            ],
            refreshUrl: Annotated[
                Optional[str],
                Doc(
                    """
                    The URL to refresh the token and obtain a new one.
                    """
                ),
            ] = None,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  2. docs_src/openapi_callbacks/tutorial001.py

    invoices_callback_router = APIRouter()
    
    
    @invoices_callback_router.post(
        "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived
    )
    def invoice_notification(body: InvoiceEvent):
        pass
    
    
    @app.post("/invoices/", callbacks=invoices_callback_router.routes)
    def create_invoice(invoice: Invoice, callback_url: Union[HttpUrl, None] = None):
        """
        Create an invoice.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  3. docs_src/sql_databases/sql_app_py39/tests/test_sql_app.py

    from sqlalchemy import create_engine
    from sqlalchemy.orm import sessionmaker
    
    from ..database import Base
    from ..main import app, get_db
    
    SQLALCHEMY_DATABASE_URL = "sqlite:///./test.db"
    
    engine = create_engine(
        SQLALCHEMY_DATABASE_URL, connect_args={"check_same_thread": False}
    )
    TestingSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
    
    
    Base.metadata.create_all(bind=engine)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_model/test_tutorial004.py

                    "description": None,
                    "price": 50.2,
                    "tax": 10.5,
                    "tags": [],
                },
            ),
        ],
    )
    def test_get(url, data):
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 04 20:47:07 GMT 2023
    - 5K bytes
    - Viewed (0)
  5. docs/sts/client_grants/__init__.py

                query_string = '&'.join(query_components)
                sts_ep_url = self.sts_ep
                if query_string:
                    sts_ep_url = self.sts_ep + '?' + query_string
    
                response = self._http.urlopen(
                    'POST', sts_ep_url, preload_content=True)
                if response.status != 200:
                    message = "Credential refresh failed, response: %s"
    Python
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 23 18:58:53 GMT 2021
    - 4.6K bytes
    - Viewed (1)
  6. tests/test_tutorial/test_metadata/test_tutorial001.py

                "contact": {
                    "name": "Deadpoolio the Amazing",
                    "url": "http://x-force.example.com/contact/",
                    "email": "******@****.***",
                },
                "license": {
                    "name": "Apache 2.0",
                    "url": "https://www.apache.org/licenses/LICENSE-2.0.html",
                },
                "version": "0.0.1",
            },
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  7. tests/test_include_router_defaults_overrides.py

        url = ""
        content_type_level = "0"
        if override1:
            url += "/level1"
            content_type_level = "1"
        if override2:
            url += "/level2"
            content_type_level = "2"
        if override3:
            url += "/override3"
            content_type_level = "3"
        else:
            url += "/default3"
        url += "?level3=foo"
        response = client.get(url)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 358.6K bytes
    - Viewed (0)
  8. docs_src/async_tests/test_main.py

    import pytest
    from httpx import AsyncClient
    
    from .main import app
    
    
    @pytest.mark.anyio
    async def test_root():
        async with AsyncClient(app=app, base_url="http://test") as ac:
            response = await ac.get("/")
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 06 15:32:11 GMT 2021
    - 306 bytes
    - Viewed (0)
  9. tests/test_webhooks_security.py

    def new_subscription(
        body: Subscription, token: Annotated[str, Security(bearer_scheme)]
    ):
        """
        When a new user subscribes to your service we'll send you a POST request with this
        data to the URL that you register for the event `new-subscription` in the dashboard.
        """
    
    
    client = TestClient(app)
    
    
    def test_dummy_webhook():
        # Just for coverage
        new_subscription(body={}, token="Bearer 123")
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Oct 20 09:00:44 GMT 2023
    - 4.6K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_advanced_middleware/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.advanced_middleware.tutorial001 import app
    
    
    def test_middleware():
        client = TestClient(app, base_url="https://testserver")
        response = client.get("/")
        assert response.status_code == 200, response.text
    
        client = TestClient(app)
        response = client.get("/", follow_redirects=False)
        assert response.status_code == 307, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 13 14:26:09 GMT 2022
    - 474 bytes
    - Viewed (0)
Back to top