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

[do not merge] search wrapper for almdrlib #116

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

msayler
Copy link
Contributor

@msayler msayler commented Nov 10, 2022

Problem

almdrlib can be used to write a client to submit search queries and fetch the results, but this process involves several steps and boilerplate that most users won't care about.

Solution

Extract the logic from a sample client and build something that will enable simpler end-user code:

search = almdrlib.search.Search(session=session)

search.submit(account_id=args.account_id, query_string=args.query,
              timeframe=args.relative, start=args.start, end=args.end)

for result in search.fetch_all():
    pprint.pp(result)

TODO

  • Look into similar interfaces to remote datastores: what's the right interface?
  • Add support for search_stylist formatting, including "standard" CSV
  • "open in console" URL generator for results and individual messages
  • Convenience methods for decoding results
  • Include sample client
  • Come up with some better time handling (Epoch only? With helpers?)

Comments welcome.

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

Successfully merging this pull request may close these issues.

1 participant