Skip to main content

Toolkit for sanic usage

Project description

========================================
Utils for sanic microservice development
========================================

.. image:: https://img.shields.io/pypi/v/sanic-service-utils.svg
:target: https://pypi.python.org/pypi/sanic-service-utils
.. image:: https://img.shields.io/pypi/l/sanic-service-utils.svg
:target: https://pypi.python.org/pypi/sanic-service-utils



:code:`sanic-service-utils` set of utils to use with sanic framework

Installation
------------

:code:`sanic-service-utils` is available as a python library on Pypi. Installation is very simple using pip :

.. code:: bash

$ pip install sanic-service-utils

This will install :code:`sanic-service-utils` as well as external dependency.

Basic usage
-----------

Basically :code:`sanic-service-utils` is just set of blueprints for sanic and additional stuff. You should name you app correctly to use this set.

Blueprints
-----------------


All blueprints can be found in :code:`listeners` module.

:anji_orm_configuration: Basically, setup :code:`register` when you start app and stop it, when you stop app. Blueprint use variables :code:`RETHINKDB_HOST`, :code:`RETHINKDB_PORT`, :code:`RETHINKDB_DATABASE`, :code:`RETHINKDB_USERNAME`, :code:`RETHINKDB_PASS`from configuration to configure register.
:sentry_configuration: Configure sentry for web server, use variable :code:`SENTRY_DSN` from configuration.
:backgroun_task_configuration: Set empty list like variable :code:`tasks_list` to sanic app that will be cancelled on server stop. Please, use listener :code:`after_server_start` to add new tasks.
:aiohttp_session_configuration: Just configure aiohttp settion like :code:`async_session` variable for app.
:jinja_session_configuration: Just configure jinja render system like :code:`jinja` variable for app.
:log_configuration: Just configure logging for app by app name.


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

If you're not sure about the file name format, learn more about wheel file names.

sanic_service_utils-0.1.1-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sanic_service_utils-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sanic_service_utils-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 522dd8672a42543a6e0613edc1dc916af12792034ca0e8773c905e957aa4e620
MD5 841af4f81cbc24e2a274f9c1fab597b6
BLAKE2b-256 974d36c8e8b86442acaadb189a44657ebcdcd3dd512238d537daf209af8fc755

See more details on using hashes here.

Supported by

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