Skip to content

eHanlin/msm_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

msm-api

Use base64 encoder on memcached server.

You able to see https://github.com/eHanlin/memcached-session-manager/tree/1.8.3-base64 project.

And python project with java project uses the same memcached server to share session.

Dependency

Install

sudo python setup.py install

Usage

Load a MemorySessionAPI class.

from msm_api import MemorySessionAPI

Create a instance.

mem_session_api = MemorySessionAPI( ["memcache.domain.com"] )

Get session data.

session_id = "BE88B3F619A52C6C256E89755C2EB6D7"

print mem_session_api.get_user_data( session_id )

print mem_session_api.get_data( session_id )

Update user data.

mem_session_api.get_user_data( session_id )

user_data["test"] = "hello world!"

mem_session_api.update_user_data( session_id, user_data )

MemorySessionAPI Method

get_data( session_id )

Get a complete data from memcached server

get_user_data( session_id )

Get a user data

update_user_data( session_id, user_data )

Update a user data

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages