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.8.tar.gz (10.3 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.8-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: central_error_codes-0.0.8.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.8rc1

File hashes

Hashes for central_error_codes-0.0.8.tar.gz
Algorithm Hash digest
SHA256 bf2b5c2151a6bcb3c687b7b7f67f76f89986c2320947746540eeb9f50caf9801
MD5 d5b2bb144514c1a668ed10efe6ccdba1
BLAKE2b-256 97a1fe9aabd488625ff1b9e953bcf0cc0f358ab5c8292417a0a168454dfb75da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for central_error_codes-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 07cdba7413b4e1196956717904198587900877b83d0c1ebce3f3fce610a47153
MD5 b9b166ab8241617de7523e7e0542bdca
BLAKE2b-256 530c458328b44e52f4bc8010fc32b0084e28bd312fb3d6c1029f572cf2af3464

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