Skip to main content

An application base for all stores

Project description

Canonical Webteam Store-base

About

This is the base application for all stores. Each store is registered as a blueprint when the app is initialized, other configs and blueprints that are store-specific are also registered on the app. This allows for uniformity of certain endpoints and functionalities across all stores and also allows for extension and customization of endpoints and features that are store specific. See Usage section for example.

How to Install

To install this extension as a requirement in your project, you can use PIP: pip install canonicalwebteam.store-base

Development

The package leverages poetry for dependency management.

Testing

All tests can be run with poetry run python3 -m unittest discover tests.

Note: You might have to do poetry install before running the command above.

Usage

from canonicalwebteam.store_base.app import create_app

import store-specific blueprint
import store-specific utility processor

app = create_app(
    "app_name",
    store_bp=store-specific blueprint,
    utility_processor=store-specific utility_processor,
)

app.static_folder=app_static_folder
app.template_folder=app_template_folder
app.static_url_path=app_static_url_path

all other store blueprints and configurations should be registered here

Project details


Download files

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

Source Distribution

canonicalwebteam_store_base-1.2.0.tar.gz (25.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file canonicalwebteam_store_base-1.2.0.tar.gz.

File metadata

File hashes

Hashes for canonicalwebteam_store_base-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ba28c8061b65c29341ab21a14e907e7ac56cfa4b5586e50f182354c52dc6d714
MD5 560a614a9b2063ee47a54cccd9fac50b
BLAKE2b-256 a5b59e452c35148ebb1ad24722b4d24a2312b04baf42ebd4b05005e5a3912e95

See more details on using hashes here.

File details

Details for the file canonicalwebteam_store_base-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for canonicalwebteam_store_base-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24be643b30004f39a6f3ad163819a2d248e68299b604ea676e8c982aa17bcdc1
MD5 1a773f186b521e6cc9ba51f80cdec7db
BLAKE2b-256 9512fd94baecdcf8e328a981b2a3cc217df7d2c637879a6fa3028595f227cd88

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page