This is the Python SDK for the FinRope project. It provides a set of tools and utilities to work with the FinRope schema and perform various operations related to financial risk patterns.
This project code can be executed with Docker or local Python/
- Docker - you can install docker and then check the Get Started page if you aren't familiar.
OR
- Python 3 - you can download Anaconda Python here: https://www.anaconda.com/download
Supported operating systems:
- Mac OS X
- Ubuntu Linux
- Windows
The code for working with the schema is in the python/ directory.
If you're building software and want to experiment and explore this code and its dependencies, you can load the code in Visual Studio Code or another editor.
We use a Python virtual environment to run the code in this repository in a local environment. This will help you avoid conflicts with other Python projects you may have on your system.
If you are using Anaconda Python, create a new conda environment named finrope
using the following command:
conda create -n finrope python=3.11 -y
Then activate the environment:
conda activate finrope
To deactivate the environment:
conda deactivate
You can use a Python venv environment to run the code in this repository. To create a new virtual environment named finrope
, use the following command:
python3 -m venv finrope
Then activate the environment:
source finrope/bin/activate
The project uses Python Poetry for package management.
To install Poetry (see install docs), you can use pipx or curl
a script.
To install using curl
, just run:
curl -sSL https://install.python-poetry.org | python3 -
To first install pipx
, on Mac OS X run:
brew install pipx
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions with --global argument
On Ubuntu Linux, run:
sudo apt update
sudo apt install pipx
pipx ensurepath
sudo pipx ensurepath --global # optional to allow pipx actions with --global argument
Then install Poetry using pipx
:
pipx install poetry
It will now be outside your virtual environment and available to all your Python projects.
Now we can use poetry
to install our Python dependencies. Run the following command:
poetry install