I have a helper class manages my database connection, but it is independent
of my nameko services. I would like to access the nameko configuration
from within that class, but I'm not sure how to do this. The closest I can
get is to use the Config DependencyProvider, but I can't access the
ConfigDependency unless I'm within a nameko service.
The flask equivalent of what I'm looking for would be
from flask import current_app
class DBConnection():
def __init__(self):
config = current_app.config
On Thursday, April 13, 2017 at 11:50:32 PM UTC+1, di...@clearmetal.com wrote:
I have a helper class manages my database connection, but it is
independent of my nameko services. I would like to access the nameko
configuration from within that class, but I'm not sure how to do this. The
closest I can get is to use the Config DependencyProvider, but I can't
access the ConfigDependency unless I'm within a nameko service.
The flask equivalent of what I'm looking for would be
from flask import current_app
class DBConnection():
def __init__(self):
config = current_app.config
On Thursday, April 13, 2017 at 11:50:32 PM UTC+1, di...@clearmetal.com > wrote:
I have a helper class manages my database connection, but it is
independent of my nameko services. I would like to access the nameko
configuration from within that class, but I'm not sure how to do this. The
closest I can get is to use the Config DependencyProvider, but I can't
access the ConfigDependency unless I'm within a nameko service.
The flask equivalent of what I'm looking for would be
from flask import current_app
class DBConnection():
def __init__(self):
config = current_app.config