- Sort Score
- Result 10 results
- Languages All
Results 691 - 700 of 1,427 for appends (0.08 sec)
-
docs_src/background_tasks/tutorial002_py310.py
from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: str | None = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q @app.post("/send-notification/{email}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 643 bytes - Viewed (0) -
istioctl/pkg/injector/injector-list.go
filtered := make([]corev1.Namespace, 0) for _, ns := range nss { if inject.IgnoredNamespaces.Contains(ns.Name) || ns.Name == istioNamespace { continue } filtered = append(filtered, ns) } return filtered } func getNamespaces(ctx context.Context, client kube.CLIClient, istioNamespace string) ([]corev1.Namespace, error) {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Oct 18 11:39:52 UTC 2024 - 10.6K bytes - Viewed (0) -
src/main/webapp/js/admin/plugins/form-validator/jquery.form-validator.min.js
>")))})}i||0===d.length&&k.length>0?k.hide():d.length>0&&0===k.length?(k=a("<div></div>").css(f.css).appendTo("body"),b.addClass("suggestions-"+j),k.attr("data-suggest-container",j).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+j)):d.length>0&&!k.is(":visible")&&k.show(),d.length>0&&e.length!==d[0].length&&(g(k,c),k.html(""),a.each(d,function(b,d){a("<div></div>").append(d).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-...
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Mon Jan 01 05:12:47 UTC 2018 - 32.8K bytes - Viewed (0) -
tests/test_security_openid_connect.py
from fastapi import Depends, FastAPI, Security from fastapi.security.open_id_connect_url import OpenIdConnect from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() oid = OpenIdConnect(openIdConnectUrl="/openid") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(oid)): user = User(username=oauth_header) return user
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
tests/test_security_openid_connect_description.py
from fastapi import Depends, FastAPI, Security from fastapi.security.open_id_connect_url import OpenIdConnect from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() oid = OpenIdConnect( openIdConnectUrl="/openid", description="OpenIdConnect security scheme" ) class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(oid)):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.4K bytes - Viewed (0) -
fastapi/encoders.py
return encoder(obj) try: data = dict(obj) except Exception as e: errors: List[Exception] = [] errors.append(e) try: data = vars(obj) except Exception as e: errors.append(e) raise ValueError(errors) from e return jsonable_encoder( data, include=include, exclude=exclude,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 10.8K bytes - Viewed (0) -
internal/config/dns/etcd_dns.go
records, err := c.list(key+etcdPathSeparator, true) if err != nil { return srvRecords, err } for _, record := range records { if record.Key == "" { continue } srvRecords[record.Key] = append(srvRecords[record.Key], record) } } return srvRecords, nil } // Get - Retrieves DNS records for a bucket. func (c *CoreDNS) Get(bucket string) ([]SrvRecord, error) { var srvRecords []SrvRecord
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 26 15:03:08 UTC 2024 - 8K bytes - Viewed (0) -
docs_src/dependencies/tutorial008d_an_py39.py
from fastapi import Depends, FastAPI, HTTPException app = FastAPI() class InternalError(Exception): pass def get_username(): try: yield "Rick" except InternalError: print("We don't swallow the internal error here, we raise again 😎") raise @app.get("/items/{item_id}") def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 734 bytes - Viewed (0) -
internal/logger/config.go
for _, k := range envs { target := strings.TrimPrefix(k, legacyEnvLoggerHTTPEndpoint+config.Default) if target == legacyEnvLoggerHTTPEndpoint { target = config.Default } loggerTargets = append(loggerTargets, target) } // Load HTTP logger from the environment if found for _, target := range loggerTargets { endpoint := getCfgVal(legacyEnvLoggerHTTPEndpoint, target, "") if endpoint == "" {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 20 16:02:50 UTC 2024 - 18.3K bytes - Viewed (0) -
cmd/iam.go
if err != nil { collectedErrors = append(collectedErrors, fmt.Errorf("could not validate `%s` exists in LDAP directory: %w", k, err)) continue } if validatedDN == nil || !underBaseDN { skipped = append(skipped, k) continue } if validatedDN.NormDN != k { normalizedDNKeysMap[validatedDN.NormDN] = append(normalizedDNKeysMap[validatedDN.NormDN], k) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0)