- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for isoformat (0.16 sec)
-
tests/test_serialize_response_dataclass.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 26 13:56:47 UTC 2022 - 4.9K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
instance = MyModel(dt_field=safe_datetime.now()) encoded_instance = jsonable_encoder( instance, custom_encoder={safe_datetime: lambda o: o.isoformat()} ) assert encoded_instance["dt_field"] == instance.dt_field.isoformat() def test_custom_enum_encoders(): def custom_enum_encoder(v: Enum): return v.value.lower() class MyEnum(Enum):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 21:56:59 UTC 2024 - 9K bytes - Viewed (0) -
tests/test_datetime_custom_encoder.py
dt_field: datetime @field_serializer("dt_field") def serialize_datetime(self, dt_field: datetime): return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat() app = FastAPI() model = ModelWithDatetimeField(dt_field=datetime(2019, 1, 1, 8)) @app.get("/model", response_model=ModelWithDatetimeField) def get_model(): return model
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.6K bytes - Viewed (0) -
docs/sts/client_grants/__init__.py
secret_key=creds.get_child_text('SecretAccessKey'), token=creds.get_child_text('SessionToken'), expiry_time=parse(creds.get_child_text('Expiration')).isoformat())
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 4.6K bytes - Viewed (0) -
istioctl/pkg/util/formatting/formatter.go
"istio.io/istio/pkg/config/analysis/diag" "istio.io/istio/pkg/env" ) // Formatting options for Messages const ( LogFormat = "log" JSONFormat = "json" YAMLFormat = "yaml" ) var ( MsgOutputFormatKeys = []string{LogFormat, JSONFormat, YAMLFormat} MsgOutputFormats = make(map[string]bool) termEnvVar = env.Register("TERM", "", "Specifies terminal type. Use 'dumb' to suppress color output") )
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Tue Jul 11 02:41:45 UTC 2023 - 3.1K bytes - Viewed (0) -
istioctl/pkg/util/formatting/formatter_test.go
diag.NewMessageType(diag.Warning, "C1", "Collapse danger: %v"), diag.MockResource("GrandCastle"), "the castle is too old", ) msgs := diag.Messages{firstMsg, secondMsg} output, _ := Print(msgs, JSONFormat, false) expectedOutput := `[ { "code": "B1", "documentationUrl": "` + url.ConfigAnalysis + `/b1/", "level": "Error", "message": "Explosion accident: the bubble is too big", "origin": "SoapBubble"
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 4.1K bytes - Viewed (0) -
istioctl/pkg/util/constants.go
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Mon Jul 22 15:40:30 UTC 2024 - 1.4K bytes - Viewed (0) -
istioctl/pkg/tag/tag_test.go
} for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { var out bytes.Buffer client := fake.NewClientset(tc.webhooks.DeepCopyObject(), tc.namespaces.DeepCopyObject()) outputFormat = util.JSONFormat err := listTags(context.Background(), client, &out) if tc.error == "" && err != nil { t.Fatalf("expected no error, got %v", err) } if tc.error != "" { if err == nil {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Oct 09 16:05:45 UTC 2024 - 8.5K bytes - Viewed (0)