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

18 Replies, 1732 Views

It’s 100% preference. I’ve seen *import requests as rs*, *rq*, even *rt* (why tho?). Stick to *req* if you alias—it’s the least confusing.

Fun fact: Some IDEs (like PyCharm) let you hover over aliases to see the original import, so you won’t get lost.

If you’re new, maybe skip aliasing until you’re comfy with the lib itself.

Messages In This Thread



Users browsing this thread: 1 Guest(s)