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
registerwhen you start app and stop it, when you stop app. Blueprint use variablesANJI_ORM_CONNECTION_STRINGfrom configuration to configure register.- sentry_configuration:
Configure sentry for web server, use variable
SENTRY_DSNfrom configuration.- backgroun_task_configuration:
Set empty list like variable
tasks_listto sanic app that will be cancelled on server stop. Please, use listenerafter_server_startto add new tasks.- aiohttp_session_configuration:
Just configure aiohttp settion like
async_sessionvariable for app.- jinja_session_configuration:
Just configure jinja render system like
jinjavariable for app.- log_configuration:
Just configure logging for app by app name.
- sanic_session_configuration:
Configure sanic session plugin, you should add variable
session_interfacewith SessionIntreface object to sanic app object.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sanic_service_utils-0.6.3-py2.py3-none-any.whl.
File metadata
- Download URL: sanic_service_utils-0.6.3-py2.py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1000bc02cbeefbd585ca9858170bdee4452c540ffc712bcd647ede59c4af3590
|
|
| MD5 |
5fb04310183ce836c142a439b9112e90
|
|
| BLAKE2b-256 |
ee176a64ea4d400601b2fe622eb8655b41dadbd86595fddce934ffc13899390a
|