Skip to main content

A Python package to manage error codes for multiple microservices

Project description

# Centralized Error Codes

## Overview
This repository provides a centralized collection of error codes that can be used across multiple microservices. It is designed to standardize error handling for both Node.js and Python-based applications.

## Publishing a New Node Module
Follow these steps to publish a new version of the module:

1. Install dependencies:
   ```sh
   npm i --save-dev @types/node
  1. Build the project:
    npm run build
    
  2. Package the module:
    npm pack
    
  3. Publish the package to npm (ensure you are logged in):
    npm publish --access public
    
    If not logged in, run:
    npm login
    

Installation

To use this package in a Node.js application, install it via npm:

npm install central-error-codes

Usage in Node.js

Import and use the error codes in your application:

import { ErrorCode } from "central-error-codes";

const ALL_ERROR_CODE = ErrorCode.getAllErrors();
const CMS_ERROR_CODE = ErrorCode.getCMSGatewayError();

Usage in Python

For Python-based applications, usage instructions will be provided in a future update.

Publishing a New Version for Python

To publish a new version of this package to PyPI, follow these steps:

  1. Install the required tools:
    pip install setuptools wheel twine
    
  2. Build the distribution files:
    python3 setup.py sdist bdist_wheel
    
    or alternatively:
    python3 -m build
    
  3. Upload the package to PyPI using Twine:
    twine upload $(find dist -type f -not -path "dist/typescript/*")
    

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

central_error_codes-0.0.11.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

central_error_codes-0.0.11-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file central_error_codes-0.0.11.tar.gz.

File metadata

  • Download URL: central_error_codes-0.0.11.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for central_error_codes-0.0.11.tar.gz
Algorithm Hash digest
SHA256 b3d49439a603e92c1d363633282cde37cc86c3d5bd5eb940a125143456275c3f
MD5 5047bb473f42a0b860c7716bcaa53200
BLAKE2b-256 b0b9e8e93586b8930bcec6fb45ee4a5c89e12919e565bd9c97e1adad2a404dec

See more details on using hashes here.

File details

Details for the file central_error_codes-0.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for central_error_codes-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 07ffacdc390254e82052291b71e5b5cce7b2ed9ca27ab50acce488d64b191f7d
MD5 df62d821f8e1fbf4dcc93e6cdc432ead
BLAKE2b-256 31e49ea3048da3a9135fae94ee041bd7221883565cc7bec72b8f77576b518b69

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