Skip to main content

Forked from and based on https://github.com/Relrin/sanic-base-extension (sanic-base-extension) Extensions were forked and modified to keep the code updated with the latest version of dependecnies and to add additional functionality

sanic-ext-base

Flask-like extension support for Sanic framework

Features

  • Flask-like style initializing and using with Sanic applications

  • Easy to write a new extension and use it later

Installation

This package should be installed using pip:

pip install sanic-ext-base

Example

from sanic import Sanic
from sanic_ext import BaseExtension


class CustomExtension(BaseExtension):
    extension_name = app_attribute = 'custom'

    def hello(self, user):
        print("Hello, {}!".format(user))


app = Sanic(__name__)
CustomExtension()  # available via `app.custom` or `app.extensions['custom']`
app.custom.hello('world')  # Hello, world!

License

The sanic-ext-base is published under BSD license. For more details read LICENSE file.

Metadata

Release files for sanic-ext-base 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sanic-ext-base 0.1.0
File Size Uploaded Provenance Actions
sanic-ext-base-0.1.0.tar.gz 2.6 kB Without provenance Details for sanic-ext-base-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sanic-ext-base 0.1.0
File Interpreter ABI Platform Actions
sanic_ext_base-0.1.0-py3-none-any.whl Python 3 none any Details for sanic_ext_base-0.1.0-py3-none-any.whl

Total release size: 5.9 kB

Release files / sanic-ext-base-0.1.0.tar.gz

Download URL sanic-ext-base-0.1.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fc111f8b5f8f48beb20c76b3bff480aec86624ae164330c23104bab25a71df40
BLAKE2b-256 checksum
How to use checksums
695e6bc1c760f01cd31cdb97b5c836d7a276089715e8800474dcd4bee95d70aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Release files / sanic_ext_base-0.1.0-py3-none-any.whl

Download URL sanic_ext_base-0.1.0-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed4d3a21b8d2eb58409eeac54101b71cb4bad1c991e43f6ebffd812571253c09
BLAKE2b-256 checksum
How to use checksums
bf1094191ec152592013f512a55ea9bc7d6bb3ac3de4dd780d25d226137d6554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Security for sanic-ext-base 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page