foxmask, to random French
@foxmask@framapiaf.org avatar

tiens #GraphQL n'est plus en odeur de sainteté avec #Starlette

https://www.starlette.io/graphql/

scy, to random
@scy@chaos.social avatar

#Starlette (and thus #FastAPI) does self.render() in Response.init() to populate self.body, meaning that for example a JSONResponse will always instantly render its JSON to bytes as soon as it's constructed, not lazily when it's actually about to be sent.

This becomes a bit of an issue when you'd like to modify the original data in a middleware, because you basically have to re-parse the bytes into a Python object, then render them again.

There's also no way to access the original object.

18+ scy, to random
@scy@chaos.social avatar

It is literally one (1) day after having set up dual-boot Linux on the laptop that ran Windows for years, and now the other laptop, that has been my Linux machine for months, does no longer react to its Control key being pressed (and yes, it has only one).

Why does always something have to break?

I've also found out that apparently I have to decide between either being able to share my screen under Sway or have audio without stuttering.

The Linux experience, I guess.

scy,
@scy@chaos.social avatar

Also, #FastAPI / #Starlette middleware should totally have a way to get a reference to the function that handled the request. Make it a property on the Response object.

(Yes, I will open an issue about that and maybe even write a PR, but not tonight. Tonight there's only energy for tootin'.)

mblayman, to python
@mblayman@mastodon.social avatar

🐍 I needed a mock web service to mimic the behavior of a third party service in a large testing environment. This article shows how I created that service using #Starlette in #Python. https://www.mattlayman.com/blog/2019/starlette-mock-service/

paulox, to python
@paulox@fosstodon.org avatar
paulox, to python
@paulox@fosstodon.org avatar
mblayman, to python
@mblayman@mastodon.social avatar

🐍 I needed a mock web service to mimic the behavior of a third party service in a large testing environment. This article shows how I created that service using #Starlette in #Python. https://www.mattlayman.com/blog/2019/starlette-mock-service/

mblayman, to python
@mblayman@mastodon.social avatar

🐍 I needed a mock web service to mimic the behavior of a third party service in a large testing environment. This article shows how I created that service using #Starlette in #Python. https://www.mattlayman.com/blog/2019/starlette-mock-service/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines