title: Python(Flask RESTful API) Modifying Objects
body: <p>I am having an issue with an object (configuration object) that I want both the python program and external API users to modify. If I use the API and PUT new data, the data is saved. If I have the Python program try modifying the object, I cannot observe that change when doing a GET.As you can see, I change config.encoding to "test", but when doing a GET, I do not observe the change. I still see encoding set to "ASCII". I am relatively new to Python and may be overlooking something simple.</p>
  
  <p>Thanks.</p>
  
  <pre><code>config = util.Config()
  
  class api_Config(Resource):
      def get(self, id):
          return [{"id": config.id,
                   "capture": config.capture,
                   "controller": config.controller,
                   "gateway_ip_address": config.gateway_ip_address,
                   "port": config.port,
                   "interval_rate": config.interval_rate,
                   "encoding": config.encoding}], 200
      def put(self, id):
          parser = reqparse.RequestParser()
          parser.add_argument("capture")
          parser.add_argument("controller")
          parser.add_argument("gateway_ip_address")
          parser.add_argument("port")
          parser.add_argument("interval_rate")
          parser.add_argument("encoding")
          args = parser.parse_args()
          config.capture = args["capture"]
          config.controller = args["controller"]
          config.gateway_ip_address = args["gateway_ip_address"]
          config.port = args["port"]
          config.interval_rate = args["interval_rate"]
          config.encoding = args["encoding"]
          return [{"id": config.id,
                   "capture": config.capture,
                   "controller": config.controller,
                   "gateway_ip_address": config.gateway_ip_address,
                   "port": config.port,
                   "interval_rate": config.interval_rate,
                   "encoding": config.encoding}], 200
  
  if __name__== "__main__":
          app = Flask(__name__)
          api = Api(app)
          config = util.Config()
          api.add_resource(api_Config, '/&lt;string:id&gt;')
          app.run(debug=True)
          print config.encoding
          config.encoding = "test"
  </code></pre>