Skip to main content

Shared chassis (logging, etc.) for Sabu services

Project description

sabu-chassis

sabu-chassis is a shared Sabu library that provides reusable utilities for multiple services.

It is designed for cross-cutting concerns that should be imported directly by services (for example: logging setup and shared runtime conventions), instead of being exposed as a standalone service.

Why this package exists

In Sabu, some capabilities are best delivered as code dependencies rather than API calls.

Using sabu-chassis as a dependency makes it easier to:

  • Reuse the same behavior across services.
  • Keep service internals consistent.
  • Ship functionality (not inter-service data exchange) in a versioned Python package.

Current scope

At the moment, the primary implemented utility is logging configuration.

The logging setup is currently tuned for one service context. As the microservices chassis effort progresses, this will be normalized so all Sabu services can use a common logging standard in later versions.

Installation

Dockerizing and using in services independently

pip install sabu-chassis

Installing as a dependency (e.g., inside Dockerized services)

cd libs/sabu_chassis
pip install .

Developing locally (cloning the repository)

from sabu_chassis.logging import configure_logging, get_logger, set_request_id

configure_logging()
set_request_id('req-123')

logger = get_logger(__name__)
logger.info('service_started')

Libraries should use get_logger(__name__) and leave configure_logging() to the application or workflow entry point.

Optional environment variables commonly used by the logging module include:

  • LOG_LEVEL
  • WERKZEUG_LEVEL
  • LOG_SERVICE
  • LOG_ENV
  • LOG_DIR_BASE

Sabu

Sabu is a sector-based carbon-emission evaluation framework built with a microservices architecture.

Each module runs as an independent service. Current services focus on building life-cycle assessment and city-scale geospatial cleaning/validation workflows. Alongside services, Sabu also includes shared Python libraries such as sabu-chassis to provide reusable internal functionality.

Roadmap note

sabu-chassis will continue to grow as a shared library for Sabu services, with future versions expanding beyond logging into additional standardized service utilities.

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

sabu_chassis-0.1.1.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sabu_chassis-0.1.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file sabu_chassis-0.1.1.tar.gz.

File metadata

  • Download URL: sabu_chassis-0.1.1.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.19

File hashes

Hashes for sabu_chassis-0.1.1.tar.gz
Algorithm Hash digest
SHA256 087b4ae75e83a056f0d1967c49aa205f915f63e1b4adacf43bf7ebbdf25c1ed7
MD5 903375d8b32144af93b0d0942468e4bc
BLAKE2b-256 71e585910ab1e1fbebde57efc2116c5a852a10333de442f01329150f44534c3d

See more details on using hashes here.

File details

Details for the file sabu_chassis-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sabu_chassis-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.19

File hashes

Hashes for sabu_chassis-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3dd73dd42381313cf6209e09a4d32df6a4028aa66d68e1662372f8fe5590a5d4
MD5 d706d73db0f7bebf8dea99fbe1a4e1d2
BLAKE2b-256 ad58366a47199ed6ecc9a6b193b9e5a83f50c0540772c02d5af68b4495237812

See more details on using hashes here.

Supported by

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