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

Uploaded Python 3

File details

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

File metadata

  • Download URL: central_error_codes-0.0.9a0.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.9a0.tar.gz
Algorithm Hash digest
SHA256 c0ec5d99aae9e8eb9e1b354d6e9f618f934dc2ccad1875aac6212ba3444bae5d
MD5 7666621b1e776a9a2696ddbba9453244
BLAKE2b-256 7a99b5b5f0564c77690571ae169ae474b9a81c0bf9bc6f433026572a3557683d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for central_error_codes-0.0.9a0-py3-none-any.whl
Algorithm Hash digest
SHA256 05b76a518cc8024243d381bd24bc14e6bac21e5049ff7c67a66f6321e66e6f70
MD5 fb292244ca098c0576ea30b56e1a1df1
BLAKE2b-256 828d18803db6bf7b06979aea2ddedf7043b9e946b73acd3d6db2bf12ee3eb231

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