What's the correct way to use 'import requests as' in Python? or Why do some scripts use 'import requ

20 Replies, 2199 Views

I’m team full-name unless there’s a collision. *import requests* is just clearer, especially in shared code. But if you’re dealing with something like `from module import super_long_name as short`, then aliasing makes sense.

For requests specifically, it’s so common that most devs will recognize "req" instantly. Still, no harm in keeping it explicit.

Messages In This Thread



Users browsing this thread: 1 Guest(s)