A collection of utilities for Sanic (and/or Stellata and/or Webpack) apps.
CLI
Suppose you have a project called foo.
Run database migrations:
tails foo migrate
Build webpack assets:
tails foo build
Run a debug server that reloads on server + asset changes:
tails foo server --watch --build
Run a production server:
tails foo server --production --host=0.0.0.0 --port=9000
Run multiple projects at once:
tails ~/foo/foo ~/bar/bar server --port=9001 --port=9002
Reset to a fresh database with no data:
tails foo reset
Resource
Return JSON or HTML pages:
import foo
import tails.resource
@foo.app.route('/')
async def index():
return tails.resource.html(
title='What a great page',
external_css=['https://fonts.googleapis.com/icon?family=Material+Icons'],
js=['/static/build/js/index.js'],
css['/static/build/css/index.css']
)
@foo.app.route('/api')
async def api():
data = ...
return tails.resource.json({
'data': data
})
Release files for tails 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tails-0.0.1.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tails-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / tails-0.0.1.tar.gz
| Download URL | tails-0.0.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49e89804a62308d97a04cff38489439e60ae62239c23f6bffa9e7ad0df6aea02
|
|
BLAKE2b-256 checksum How to use checksums |
e9a8914f991ac53c91f167cd9f420d487943c5f5fe37dc2bd564c1f0c8109a4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / tails-0.0.1-py3-none-any.whl
| Download URL | tails-0.0.1-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7866e6b6ef78d54b8912d4644928d6965b1ce97a42f83a2474844482d1497c60
|
|
BLAKE2b-256 checksum How to use checksums |
ee61eeada03e6fe80c8cec144607e69cafe268e9ee25b66c7a4ba63dd6e843d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |