# Paloma.py

Paloma.py is a Python SDK for writing applications that interacts with the Paloma blockchain from Python and provides simple abstractions over core data structures, serialization, key management, and API request generation.

# Get started with Paloma.py

This is an in-depth guide on how to use the Paloma.py SDK.

NOTE: All code starting with a $ is meant to run on your terminal (a bash prompt). All code starting with a >>> is meant to run in a python interpreter, like ipython.

# Prerequisites

The Paloma Python SDK requires Python v3.7+ (opens new window).

Paloma.py can be installed (preferably in a virtual environment (opens new window) from PyPI using pip) as follows:

# Installation

$ pip install -U paloma_sdk

Paloma SDK uses Poetry (opens new window) to manage dependencies. To get set up with all the required dependencies, run:

$ pip install poetry
$ poetry install

# Tests

Paloma.py provides extensive tests for data classes and functions. To run them, after the installing the dependencies.

$ make test

# Code Quality

Paloma SDK uses Black (opens new window), isort (opens new window), and Mypy (opens new window) for checking code quality and maintaining style. To reformat run the following after installing the dependencies.

$ make qa && make format

# Initialize the LCD

Paloma’s LCD or Light Client Daemon allows users to connect to the blockchain, make queries, create wallets, and submit transactions. It's the main workhorse behind Paloma.py. Check the available networks to chose the right chainID.

>>> from paloma_sdk.client.lcd import LCDClient
>>> paloma = LCDClient(chain_id="<paloma chain id>", url="https://lcd.testnet.palomaswap.com")
>>> print(paloma.tendermint.node_info())