Today, you have to create a WaybackClient instance in order to do anything with this library. We should add convenience functions that mirror the search() and get_memento() methods on clients (and whatever other methods might be added to WaybackClient in the future) so you can just call methods without needing to instantiate a client or session:
from datetime import datetime
import wayback
wayback.get_memento('https://nasa.gov/', datetime(2016, 12, 31))
I think these would use ideally use some sort of shared client or session under the hood rather than each call creating and destroying a whole client, although that might cause some issues with leaving some connections open/hanging — needs investigation.
Today, you have to create a
WaybackClient
instance in order to do anything with this library. We should add convenience functions that mirror thesearch()
andget_memento()
methods on clients (and whatever other methods might be added toWaybackClient
in the future) so you can just call methods without needing to instantiate a client or session:I think these would use ideally use some sort of shared client or session under the hood rather than each call creating and destroying a whole client, although that might cause some issues with leaving some connections open/hanging — needs investigation.
Depends on getting thread safety first in #58.