import json


class Session:
    """Provides easier access to session objects sent along with requests"""

    def __init__(self, session_obj):
        self.obj = session_obj

    def __repr__(self):
        return '<Session %s>' % json.dumps(self.obj)

    @property
    def is_new(self):
        """Is this a new session or a previously open one?"""
        return self.obj['new']

    @property
    def session_id(self):
        return self.obj['sessionId']

    @property
    def application_id(self):
        return self.obj['application']['applicationId']

    @property
    def user_id(self):
        return self.obj['user'].get('userId')

    @property
    def user_access_token(self):
        return self.obj['user'].get('accessToken')

    def get(self, attr, default=None):
        """Get an attribute defined by this session"""

        attrs = self.obj.get('attributes') or {}
        return attrs.get(attr, default)

@@ -95,16 +95,127 @@
 requests
+.%0A%0A    The object parsed from the request can be accessed directly%0A    through the :py:attr:%60body%60 member.%0A    
 %22%22%22%0A%0A   
@@ -242,19 +242,20 @@
 session_
-obj
+body
 ):%0A     
@@ -262,19 +262,20 @@
    self.
-obj
+body
  = sessi
@@ -277,19 +277,20 @@
 session_
-obj
+body
 %0A%0A    de
@@ -355,19 +355,20 @@
 ps(self.
-obj
+body
 )%0A%0A    @
@@ -480,19 +480,20 @@
 rn self.
-obj
+body
 %5B'new'%5D%0A
@@ -553,19 +553,20 @@
 rn self.
-obj
+body
 %5B'sessio
@@ -636,19 +636,20 @@
 rn self.
-obj
+body
 %5B'applic
@@ -723,35 +723,36 @@
     return self.
-obj
+body
 %5B'user'%5D.get('us
@@ -826,19 +826,20 @@
 rn self.
-obj
+body
 %5B'user'%5D
@@ -975,19 +975,20 @@
  = self.
-obj
+body
 .get('at

Rename session internal `obj` to `body`