Skip to content

juancarlospaco/apistar-session-cookie

 
 

Repository files navigation

apistar-session-cookie

Cookie based Sessions for Apistar. Build Status

screenshot

GPL License LGPL License Python Version

Documentation

init_cookie_session

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 to apistar.http.Header.
  • response_headers Apistar HTTP Headers, required, defaults to apistar.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

CookieSessionStore

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.

Example

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.

Install:

pip install apistar_session_cookie

Requisites:

Tests

  • Pull requests to improve tests are welcome!!!.
python -m unittest --verbose --locals tests.TestCookieSessions
# OR
python -m unittest
# OR
pytest

Contributors:

  • 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.

Licence:

  • GNU GPL Latest Version and GNU LGPL Latest Version and any Licence YOU Request via Bug Report.

Ethics and Humanism Policy:

  • Religions is not allowed. Contributing means you agree with the COC.

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%