- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for Sanic (0.01 sec)
-
docs/en/docs/benchmarks.md
* But it provides you the tools to build simple web applications, with routing based on paths, etc. * If you are comparing Starlette, compare it against Sanic, Flask, Django, etc. Web frameworks (or microframeworks). * **FastAPI**: * The same way that Starlette uses Uvicorn and cannot be faster than it, **FastAPI** uses Starlette, so it cannot be faster than it.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 3.5K bytes - Viewed (0) -
docs/en/docs/alternatives.md
Use Python types to have great editor support. Have a powerful dependency injection system. Find a way to minimize code repetition. /// ### <a href="https://sanic.readthedocs.io/en/latest/" class="external-link" target="_blank">Sanic</a> { #sanic } It was one of the first extremely fast Python frameworks based on `asyncio`. It was made to be very similar to Flask. /// note | Technical Details
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 23.6K bytes - Viewed (0) -
cmd/postpolicyform.go
func toString(val any) string { switch v := val.(type) { case string: return v default: return "" } } // toLowerString - safely convert interface to lower string func toLowerString(val any) string { return strings.ToLower(toString(val)) } // toInteger _ Safely convert interface to integer without causing panic. func toInteger(val any) (int64, error) {
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 12.1K bytes - Viewed (0) -
tests/submodel_test.go
package tests_test import ( "testing" "gorm.io/gorm" ) type Man struct { ID int Age int Name string Detail string } // Panic-safe BeforeUpdate hook that checks for Changed("age") func (m *Man) BeforeUpdate(tx *gorm.DB) (err error) { if !tx.Statement.Changed("age") { return nil } return nil } func TestSubModel(t *testing.T) { man := Man{Age: 18, Name: "random-name"}
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Wed Aug 20 04:51:17 UTC 2025 - 944 bytes - Viewed (0) -
cmd/dynamic-timeouts.go
return dt } // newDynamicTimeout returns a new dynamic timeout initialized with timeout value func newDynamicTimeout(timeout, minimum time.Duration) *dynamicTimeout { if timeout <= 0 || minimum <= 0 { panic("newDynamicTimeout: negative or zero timeout") } if minimum > timeout { minimum = timeout } return &dynamicTimeout{timeout: int64(timeout), minimum: int64(minimum)} }
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 4.5K bytes - Viewed (0) -
cmd/dynamic-timeouts_test.go
for range 100 { for range 100 { timeout.LogSuccess(time.Duration(float64(time.Second) * rng.Float64())) } to := timeout.Timeout() if to < time.Millisecond || to > time.Second { panic(to) } } }() } wg.Wait() } func TestDynamicTimeoutHitMinimum(t *testing.T) { const minimum = 30 * time.Second timeout := newDynamicTimeout(time.Minute, minimum)
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 5.2K bytes - Viewed (0) -
cmd/xl-storage-meta-inline.go
} // serialize will serialize the provided keys and values. // The function will panic if keys/value slices aren't of equal length. // Payload size can give an indication of expected payload size. // If plSize is <= 0 it will be calculated. func (x *xlMetaInlineData) serialize(plSize int, keys [][]byte, vals [][]byte) { if len(keys) != len(vals) { panic(fmt.Errorf("xlMetaInlineData.serialize: keys/value number mismatch")) }
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 9.4K bytes - Viewed (0) -
cmd/data-usage_test.go
} } } // equalAsJSON returns whether the values are equal when encoded as JSON. func equalAsJSON(a, b any) bool { aj, err := json.Marshal(a) if err != nil { panic(err) } bj, err := json.Marshal(b) if err != nil { panic(err) } return bytes.Equal(aj, bj)
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 14.6K bytes - Viewed (0) -
cmd/xl-storage-format_test.go
return xlMeta } func (m *xlMetaV1Object) AddTestObjectCheckSum(partNumber int, algorithm BitrotAlgorithm, hash string) { checksum, err := hex.DecodeString(hash) if err != nil { panic(err) } m.Erasure.Checksums[partNumber-1] = ChecksumInfo{partNumber, algorithm, checksum} } // AddTestObjectPart - add a new object part in order.
Registered: Sun Sep 07 19:28:11 UTC 2025 - Last Modified: Fri Aug 29 02:39:48 UTC 2025 - 17.5K bytes - Viewed (0) -
finisher_api.go
// Make sure to rollback when panic, Block error or Commit error if panicked || err != nil { db.RollbackTo(fmt.Sprintf("sp%d", spID)) } }() } err = fc(db.Session(&Session{NewDB: db.clone == 1})) } else { tx := db.Begin(opts...) if tx.Error != nil { return tx.Error } defer func() { // Make sure to rollback when panic, Block error or Commit error
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Tue Aug 26 06:24:29 UTC 2025 - 22.9K bytes - Viewed (0)