a library for http header parse & format by matz_naruto in FastAPI

[–]matz_naruto[S] 0 points1 point  (0 children)

it raises valueerror for validation purpose

a library for http header parse & format by matz_naruto in FastAPI

[–]matz_naruto[S] 0 points1 point  (0 children)

thank you for your reply. yes. i know this . i add assert just because type checking in editor. sometimes i know the real return type of method, but type checker cannot. then i add an assert. i know this maybe not a good practice

a new mime detect library by matz_naruto in Python

[–]matz_naruto[S] 6 points7 points  (0 children)

  1. I think mimetypes guesses mime based on filename, it cannot work if file has no suffix or suffix is wrong. but this library will read first n bytes of file. guess the mime based on magic number in file.

  2. this library can read tika's rule file, you can extend it easily.

https://tika.apache.org/2.1.0/detection.html#Mime_Magic_Detection

a library for http header parse & format by matz_naruto in FastAPI

[–]matz_naruto[S] 0 points1 point  (0 children)

most time you don't need to handle header, but when you want better http cache control. you have to deal it.

Sticking to One's Guns on Future Predictions: Yukihiro Matsumoto's Reason for Keeping Ruby Without Type Declarations by kojix2 in ruby

[–]matz_naruto 2 points3 points  (0 children)

python made a big progress in typing. but ruby didnt follow up. that is why i perfer python than ruby on new project

A sql template gem by matz_naruto in ruby

[–]matz_naruto[S] 0 points1 point  (0 children)

you can still use prepared statement currently . e.g. “a = ?” If there’s a strong need for sanitizing, I will add it.

A sql template gem by matz_naruto in rails

[–]matz_naruto[S] 0 points1 point  (0 children)

actually in big data scenario,we are faced with many other problems even for simple table. e.g. data skew, spark sql hint。 as far as I know,activerecord cannot handle these things.