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
- Build the project:
npm run build
- Package the module:
npm pack - 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:
- Install the required tools:
pip install setuptools wheel twine
- Build the distribution files:
python3 setup.py sdist bdist_wheel
or alternatively:python3 -m build
- Upload the package to PyPI using Twine:
twine upload $(find dist -type f -not -path "dist/typescript/*")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3d49439a603e92c1d363633282cde37cc86c3d5bd5eb940a125143456275c3f
|
|
| MD5 |
5047bb473f42a0b860c7716bcaa53200
|
|
| BLAKE2b-256 |
b0b9e8e93586b8930bcec6fb45ee4a5c89e12919e565bd9c97e1adad2a404dec
|
File details
Details for the file central_error_codes-0.0.11-py3-none-any.whl.
File metadata
- Download URL: central_error_codes-0.0.11-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ffacdc390254e82052291b71e5b5cce7b2ed9ca27ab50acce488d64b191f7d
|
|
| MD5 |
df62d821f8e1fbf4dcc93e6cdc432ead
|
|
| BLAKE2b-256 |
31e49ea3048da3a9135fae94ee041bd7221883565cc7bec72b8f77576b518b69
|