Skip to content
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

not overuse "impresso" in Python code #18

Open
simon-clematide opened this issue Oct 18, 2024 · 2 comments
Open

not overuse "impresso" in Python code #18

simon-clematide opened this issue Oct 18, 2024 · 2 comments
Assignees

Comments

@simon-clematide
Copy link
Contributor

simon-clematide commented Oct 18, 2024

I suggest to not shadow the impresso module as in the starter code:

from impresso import connect

impresso = connect()

But rather be clear that it is the client that we create by connecting:

from impresso import connect

client = connect()   # returns impresso.client.ImpressoClient
@danieleguido
Copy link
Contributor

but then we won't have this anymore :)

result = impresso.search.find(
    q="Titanic",
    order_by="date",
)

but

result = client.search.find(
    q="Titanic",
    order_by="date",
)

@flipz357
Copy link
Contributor

Then how about:

from impresso import connect

impresso_session = connect()

A bit more verbose but also more explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants