Installation & Setup


Fork and Clone Repository

For the repository using GitHub

  1. 1.
    To fork the Credmark Models repository, first go to the credmark-models-py repository in Github.
Note: credmark-models-py is publically available, so anyone can see it, fork it, and contribute to it.
  1. 2.
    Fork the repository by clicking on Fork
You will be directed to Create a new Fork page
Give a name to your Repository and click on Create Fork.

Clone the new form using the CLI

git clone<owner>/credmark-models-py.git

Virtual Environment Setup

Setting up a virtual environment for your work isn't required but we highly recommend it. Following are instructions for both Conda and venv. Use the one you prefer.


  • Install Conda.
  • Create an environment named "cmf" with the system's default using the system's default version of Python:
conda create -y --name "cmf"
  • create it specifying a particular version of Python:
conda create -y --name "cmk" python="3.10"*
  • Install pip and other support packages in the Conda environment:
conda install -y --name cmk ipython jupyterlab nb_conda_kernels jupyterlab_code_formatter ipywidgetsNow, the credmarksdk has all the packages and programs that are required to create the correct Model according to the Credmark set of rules, so it is important that you call the credmarksdk before starting working on your Model.
  • Activate the environment and follow the CMK installation instructions below:
conda activate cmk


The best place to create your venv environment is in the project directory you cloned.
Assuming your cwd is the one above the repository you've just cloned, create and activate your virtual environment:
cd credmark-models-py
python3 -m venv venv
source venv/bin/activate

Install Dependencies

pip install -r requirements.txt
For development, you should also run:
pip install -r requirements-dev.txt

Test your Setup

credmark-dev run chain.get-latest-block -j
Your output should look something like:
2022-10-14 22:49:32,092 - credmark.cmf.engine.context - INFO - Using latest block number 15746805
"slug": "chain.get-latest-block",
"version": "0.1",
"chainId": 1,
"blockNumber": 15746805,
"output": {
"blockNumber": 15747036,
"timestamp": 1665758807
"dependencies": {
"chain.get-latest-block": {
"0.1": 1