example-python-marketmaker/1.Installation.md

1.8 KiB

🥭 Mango Explorer

📦 Installation

This section is optional - if you know what you're doing please feel free to ignore it

To get started, clone this repo to a local directory:

git clone https://github.com/blockworks-foundation/example-market-maker/
cd example-market-maker

Next, set up a Python 'virtual environment' in the '.venv' sub-directory:

python3 -m venv .venv

This will keep all dependencies isolated and make sure you're consistently running the proper Python executables and libraries.

Now install all the dependencies. There's really only one dependency - mango-explorer, a Python package on Pypi - but as your project grows you may add more dependencies so it's good to start out the right way.

pip install -r requirements.txt

mango-explorer has a lot of useful commands for interacting with Mango, and it's useful to add them to your $PATH. (The rest of this guide will assume the commands are in your $PATH, so if you don't do this you'll need to adapt the instructions a bit.)

If you have direnv installed (it's very handy!) you need to reload the environment after the .venv directory was created:

direnv reload

OR

if you're not running direnv you can load the '.envrc' file using:

source .envrc

You should now be able to run commands from mango-explorer without having to specify the full path to the executable, e.g.:

mango-explorer-version

🦮 Support

🥭 Mango Markets support is available at: Docs | Discord | Twitter | Github | Email