dev tools for Sanic
Project description
Build |
|
---|---|
Package |
Dev tools for Sanic.
This tool is highly inspired by aiohttp-devtools, aio-libs.
Installation
pip install sanic-devtools
Quick Start
⋊> ~ sdev --help
Usage: sdev [OPTIONS] COMMAND [ARGS]...
Options:
-V, --version Show the version and exit.
--help Show this message and exit.
Commands:
new Creates a new sanic project with batteries included.
runserver Run a development server for an Sanic app.
Usage
sanic-devtools provides several commands to help you develop Sanic Application easily.
runserver
Provides a simple local server for running your application while you’re developing, it helps you live reload your Sanic application automatically while developing and having any code change.
sdev runserver <app-path>
app-path can be a path to either a directory containing a recognized default file (app.py or main.py) or to a specific file. The --app-factory option can be used to define which method is called from the app path file, if not supplied some default method names are tried (app/app_factory/get_app/create_app).
All runserver arguments can be set via environment variables.
For more details, try:
sdev runserver --help
new
Creates a new sanic project with batteries included in seconds.
sdev new --output-dir <project-output-path>
By default, sdev uses cookiecutter-sanic as default template under the hood. You may override it by passing --template-src option.
For more details, try:
sdev new --help
Also feel free to add any tool/command that helps developing Sanic application smoothly, just create a PR/issue and let us know !
Contributing
sanic-devtools accepts contributions on GitHub, in the form of issues or pull requests.
Run unit tests.
tox -e py36
or
./uranium test
Test command locally.
./uranium
./bin/sdev runserver ./example/app.py
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 Distribution
Built Distribution
Hashes for pytest_sanic-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b0e8336447e9b2d450dc84ae6c4f0ef9b661709c06c236a9142ce82bf083f39 |
|
MD5 | 6714679105fbcbc88e89c89a43c9fbc6 |
|
BLAKE2b-256 | 1a944b04cfcccc82090a822f76d76505205706db5fa16940e77d7f609ad80a76 |