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

Uploaded Python 3

File details

Details for the file central_error_codes-0.0.9b0.tar.gz.

File metadata

  • Download URL: central_error_codes-0.0.9b0.tar.gz
  • Upload date:
  • Size: 10.4 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.9b0.tar.gz
Algorithm Hash digest
SHA256 9a4140e2e336b15649ef5461f56550df6d35d986d5ad2d9599dd113809ed1f32
MD5 c3240d6e195652c6bc3a10c39d4822cf
BLAKE2b-256 d52d7ed8652dd01482fc726a7b61328679e088b9661ddead05102a46fbe9264d

See more details on using hashes here.

File details

Details for the file central_error_codes-0.0.9b0-py3-none-any.whl.

File metadata

File hashes

Hashes for central_error_codes-0.0.9b0-py3-none-any.whl
Algorithm Hash digest
SHA256 56a161f7b0b28c5623db450a1db9fb1233a4781c22cb7a3befb1135775586401
MD5 0aaf62dd6b5c9356010791090369f88a
BLAKE2b-256 4e9b657ec653d35d7e4e78f244a35c55b2af6d77772581b74b8708f5e3973467

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