Skip to main content

A module to handle error codes loaded from JSON files

Project description

central-error-codes

Setup Instructions

Prerequisites

  • Ensure you have Node.js and Python 3 installed on your system.
  • Install npm and pip for managing dependencies.

Installation

Clone the Repository

 git clone <repo-url>
 cd central-error-codes

Setup Node.js Module

cd src/typescript
npm install
npm run build

Setup Python Module

cd src/python
pip install -r requirements.txt
python3 setup.py install

Usage

Using Node.js Module in Another Project

npm install /path/to/central-error-codes

Import in your project:

import ErrorCode from 'central-error-codes';
ErrorCode.getGenericError();

Using Python Module in Another Project

pip install /path/to/central-error-codes/dist/python_package.tar.gz

Import in your Python script:

from cagent_errorcode import ErrorCode
ErrorCode.get_generic_error()

Building Both Modules in One Command

npm run build

Ensure that package.json has:

"scripts": {
  "build": "npm run build && python3 setup.py sdist"
}

Troubleshooting

  • If you face ModuleNotFoundError: No module named 'setuptools', install it using:
    pip install setuptools
    
  • If tsc is not found, install TypeScript globally:
    npm install -g typescript
    

For any issues, feel free to raise a GitHub issue in the repository!

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_coedes-1.0.1.tar.gz (2.0 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_coedes-1.0.1-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file central_error_coedes-1.0.1.tar.gz.

File metadata

  • Download URL: central_error_coedes-1.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for central_error_coedes-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4d8db6345b0eb4f9aad1b530b468c54439dac67c27b5f52d3e001975118953e6
MD5 29c44275fd2f6821a47e5a5b09cd9e23
BLAKE2b-256 d15af7c83e6b83b2906f3e3ccb390baf2f7a060f2d4a187200f4eb36f447b64d

See more details on using hashes here.

File details

Details for the file central_error_coedes-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for central_error_coedes-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0eb2e6b136230d4f8cc57ef529c006ece1a079d1f0516f8ec43b8e21650d86b0
MD5 c9ad8ee2e44f6830fa62f8a796ede259
BLAKE2b-256 b7ef1adb678cdd740afeb1aa4763254364d98da33ceabcb44a9b61f440d822a1

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