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.6.tar.gz (6.8 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.6-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: central_error_codes-0.0.6.tar.gz
  • Upload date:
  • Size: 6.8 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.6.tar.gz
Algorithm Hash digest
SHA256 916349dfabc56a06db176e86567fcb2ca1ab48f0081d38f214c615bcce17a207
MD5 95aba118242a89c4d86bb90838e71224
BLAKE2b-256 4fe5d89a782263c9eb482a14ca5a8953d7e69a595a68fbc7fde8467135166896

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for central_error_codes-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 700ac0e363a2daea1bdd6588d1c1b9fc9e1808eef1b48432f2edd2822c3c2e61
MD5 46f70d7fc64a0d6f54e5bd2bfb96c3b3
BLAKE2b-256 9dd363496a94140edbfe74db1ae08f84ce33eb42da695daccc967673d1abd936

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