Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Add API for SessionStore #159

Closed
wants to merge 1 commit into from
Closed

Add API for SessionStore #159

wants to merge 1 commit into from

Conversation

sethmlarson
Copy link
Contributor

Creates the SessionStore interface which I believe should be covered by unasync so we can have both an asynchronous SessionStore for async sessions and sync for sync sessions. If anyone thinks this can be handled without having two flavors that'd be great. :)

Originally I had a more funneled get() and set() scheme but the parameter and return types were completely different for every case so I went the route of having separate functions, would like some feedback on that.

The way I'm imagining SessionStore's being created in-general is via strings / pathlib.Path objects similar to how sqlite3.connect() can take ":memory:" and you get an in-memory SQLite database. That way users don't have to make sure they're passing the correctly-flavored session store to their session, they automatically either get the sync or async variety. :)

comparing the host to a preloaded list of domains or if the
'Strict-Transport-Security' header was sent on a previous response.
"""
async def get_tls_session_tickets(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should change this to singular to match the interface.

@sethmlarson sethmlarson changed the title Create initial SessionStore interface Add API for SessionStore Nov 27, 2019
@njsmith
Copy link
Member

njsmith commented Dec 1, 2019

I started to comment on this, then realized my comment was not really specific to any of the code in this PR, so I posted it here instead: #141 (comment)

@sethmlarson
Copy link
Contributor Author

Closing these API PRs in favor of a scratch branch.

@sethmlarson sethmlarson closed this Dec 3, 2019
@sethmlarson sethmlarson deleted the session-store branch December 4, 2019 18:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants