-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add query-string construction helpers #84
Conversation
4e09d3d
to
6c07450
Compare
@mhils don't feel obligated to review my code, but my work here reminded me of your comments about project structure on #68. This PR adds another module ( |
It looks like you want to publicly expose your entire API on the top-level https://github.com/encode/httpx/blob/master/httpx/__init__.py There really is no super well-established convention here though, it boils down to personal preference a lot. I guess the only thing I would avoid is |
@mhils yes, that makes sense––thanks for the input!
Yeah, that's about right! With one complication: if possible, I want to avoid breaking the original If I were writing this package from scratch, I'd use named submodules:
The problem is that the current organization encourages I'm inclined to only allow explicit imports, but there are two issues:
I suppose I could move the API logic into an |
Oh, looks like I jumped to conclusions! I can turn I'll think more about this. |
Move README contents to package __init__: this is the index.
Update some tests to use the new import style
94ef239
to
ab29349
Compare
Closing: stale. |
Description
Operator methods are capitalized because
def and()
anddef or()
are invalid Python: the tokens clash with Python's boolean operators. Considered_and
,_or
, but these have additional semantic meaning.Breaking changes
Expands, but doesn't break, the API.
query
module.category
module.Relevant issues
Fix #30
Checklist
README.md
example usage has been updated. Should think about whether to add examples; the README is a somewhat unwieldy way to manage documentation.