Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agrausem/britney-cookies
Cookie based session as a middleware for britney SPORE client
https://github.com/agrausem/britney-cookies
Last synced: 8 days ago
JSON representation
Cookie based session as a middleware for britney SPORE client
- Host: GitHub
- URL: https://github.com/agrausem/britney-cookies
- Owner: agrausem
- License: bsd-2-clause
- Created: 2014-11-04T14:41:53.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-17T19:32:08.000Z (over 8 years ago)
- Last Synced: 2023-03-22T19:01:53.719Z (over 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
britney-cookies
===============Cookie based session as a middleware for britney SPORE client
How to use it
-------------::
import britneymy_client = britney.new('my_description.json')
credentials = {'username': 'my_login', 'password': 'my_pass'}
my_client.enable('Cookie', auth_func=my_client.auth_func, **credentials)response = my_client.get_info()
That's it !
`auth_func` is a method on the generated client that logges the client in and brings back a session-based cookie.
The cookie middleware will persist and use it on next submitted requests.