Cookie based Sessions for Apistar.
apistar_session_cookie.init_cookie_session(cookie: http.Header, response_headers: http.ResponseHeaders) -> Generator[http.Session, None, None]
Description: Apistar Component, initializes a SessionStore that works with Cookies (This Code was Donated by the original Author Vlad Zolotoy to Juan Carlos the maintainer and packager).
Arguments:
cookie
An standard web browser cookie to work with, required, defaults toapistar.http.Header
.response_headers
Apistar HTTP Headers, required, defaults toapistar.http.ResponseHeaders
.
Keyword Arguments: None.
Returns: apistar.interfaces.SessionStore
.
Source Code file: https://github.com/juancarlospaco/apistar-session-cookie/blob/master/apistar_session_cookie.py
State | OS | Description |
---|---|---|
✅ | Linux | Works Ok |
✅ | Os X | Works Ok |
✅ | Windows | Works Ok |
Usage Example: See example.py
apistar_session_cookie.CookieSessionStore()
Description: SessionStore
subclass extended and adapted to work with Cookies to provide a SessionStore for Apistar
(This Code was Donated by the original Author Vlad Zolotoy to Juan Carlos the maintainer and packager).
Arguments: None.
Keyword Arguments: None.
Returns: apistar.http.Session
.
Base Class: apistar.interfaces.SessionStore
.
Source Code file: https://github.com/juancarlospaco/apistar-session-cookie/blob/master/apistar_session_cookie.py
State | OS | Description |
---|---|---|
✅ | Linux | Works Ok |
✅ | Os X | Works Ok |
✅ | Windows | Works Ok |
Usage Example: N/A, should normally be used via apistar_session_cookie.init_cookie_session()
, not directly.
Run it executing on the terminal command line: apistar run
.
http://127.0.0.1:8080/ Writes and Reads Session data.
http://127.0.0.1:8080/logout/ Deletes Session data.
pip install apistar_session_cookie
- Apistar
- Cryptography
- Pull requests to improve tests are welcome!!!.
python -m unittest --verbose --locals tests.TestCookieSessions
# OR
python -m unittest
# OR
pytest
- Please Star this Repo on Github !, it helps to show up faster on searchs.
- Help and more Help and Interactive Quick Git Tutorial.
- English is the primary default spoken language, unless explicitly stated otherwise (eg. Dont send Translation Pull Request)
- Pull Requests for working passing unittests welcomed.
- GNU GPL Latest Version and GNU LGPL Latest Version and any Licence YOU Request via Bug Report.
- Religions is not allowed. Contributing means you agree with the COC.