Skip to main content

Nameko extension exposing a structlog dependency injector

Project description

Structlog as nameko extension

  • Free software: Apache Software License 2.0

Extension for nameko that replaces python logging module with structlog.


To install nameko-structlog, simply use pip.

pip install nameko-structlog
# to enable coloring during development
pip install nameko-structlog[colors]


Add Structlog log level to your nameko config file:

# config.yml


Include the StructlogDependency dependency in your service class:

from nameko.rpc import rpc

from nameko_structlog import StructlogDependency

class MyService(object):
   name = 'demo'

   log = StructlogDependency()

   def my_method(self, name):'Your name is '.format(name))

Run your service, providing the config file:

$ nameko run service --config config.yaml


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.


0.1.1 (2018-10-29)

  • First release on PyPI.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

nameko_structlog-0.1.1-py2.py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page