Skip to content

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