Skip to main content

A shared utility library for event management system based on microservices architecture.

Project description

Shared Library Approach in Microservices

📌 Why Use a Shared Library?

In a microservices architecture, multiple services often need common functionalities such as logging, error handling, authentication, and utility functions. Instead of duplicating code across services, we use a shared library to:

✅ Reduce Code Duplication – Avoid repeating the same logic in every service.
✅ Ensure Consistency – Standardized utilities across all services.
✅ Simplify Maintenance – Fix issues or update features in one place.
✅ Improve Scalability – Microservices remain lightweight and focused.
✅ Enhance Deployment – Easier to manage updates and dependencies.

🔧 Installation

To install the shared library in your microservices, run:

pip install shared-utils

Or specify it in your requirements.txt:

shared-utils>=1.0.0

🚀 Usage

Inside any microservice, import and use the shared utilities:

from shared_utils.logging import setup_logger

logger = setup_logger(__name__)
logger.info("Shared utilities are working!")

Updating shared_utils

If a new feature or bug fix is added to shared_utils, follow these steps:

  1. Modify the code: Implement your changes in shared_utils.

  2. Update version: Change the version in setup.py (e.g., 1.0.1 to 1.0.2).

  3. Build the package:

    python setup.py sdist bdist_wheel
    
  4. Publish to PyPI:

    twine upload dist/*
    
  5. Upgrade in services:

    pip install --upgrade shared-utils
    

📌 Versioning

We follow Semantic Versioning (SemVer):

  • MAJOR – Breaking changes.
  • MINOR – New features (backward compatible).
  • PATCH – Bug fixes and improvements.

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

shared_utils_ems-1.0.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

shared_utils_ems-1.0.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file shared_utils_ems-1.0.0.tar.gz.

File metadata

  • Download URL: shared_utils_ems-1.0.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for shared_utils_ems-1.0.0.tar.gz
Algorithm Hash digest
SHA256 afc810ef8b005672e7f48b217556bab48931774556ad52b7836b1462a29be277
MD5 001bf6100bd65127519261c1f4f9eb77
BLAKE2b-256 10da9e6e9e72a5991956ede0c75a38efc70ef3268e8dea51a8bfea77cc9305a1

See more details on using hashes here.

File details

Details for the file shared_utils_ems-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for shared_utils_ems-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d62f0fb8c5fec7521bf7c32e30abcfc87e45fa0fac0a436147e294b379f2f39e
MD5 6e88406abed76e272ad81055533059f5
BLAKE2b-256 78eb99d4daaf63f75177b2d10ffaa1ce5708da8ff8202ae51a5ae81ff82dc52a

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