Skip to main content

Toolkit for sanic usage

Project description

sanic-service-utils set of utils to use with sanic framework

Installation

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

$ pip install sanic-service-utils

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

Basic usage

Basically 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 listeners module.

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

Project details


Release history Release notifications

This version
History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
sanic_service_utils-0.2.5-py2.py3-none-any.whl (8.2 kB) Copy SHA256 hash SHA256 Wheel py2.py3 May 18, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page