Installation

Requirements

  • Python 3.8 or higher

  • pip or Poetry package manager

Standard Installation

Using pip

pip install trc20-monitor

Using Poetry

poetry add trc20-monitor

Installation with Optional Dependencies

SQLAlchemy Support

For advanced database backends (PostgreSQL, MySQL):

pip install trc20-monitor[sqlalchemy]

Full Feature Set

Install with all optional dependencies:

pip install trc20-monitor[full]

Development Installation

Clone the Repository

git clone https://github.com/kun-g/trc20-monitor.git
cd trc20-monitor

Install in Development Mode

Using pip:

pip install -e ".[dev]"

Using Poetry:

poetry install --with dev

Run Tests

pytest

Code Quality Checks

# Format code
black trc20_monitor tests

# Sort imports
isort trc20_monitor tests

# Type checking
mypy trc20_monitor

# Linting
flake8 trc20_monitor tests

Docker Installation

Using Pre-built Image

FROM python:3.11-slim

RUN pip install trc20-monitor

COPY your_script.py /app/
WORKDIR /app

CMD ["python", "your_script.py"]

Building from Source

FROM python:3.11-slim

WORKDIR /app

COPY . .
RUN pip install .

CMD ["trc20-monitor", "--help"]

Verifying Installation

After installation, verify everything is working:

import trc20_monitor
print(trc20_monitor.__version__)

Or use the CLI:

trc20-monitor --version

Troubleshooting

Import Errors

If you encounter import errors, ensure all dependencies are installed:

pip install --upgrade trc20-monitor

SSL Certificate Issues

On some systems, you might need to install certificates:

pip install --upgrade certifi

Permission Errors

On Linux/macOS, you might need to use sudo or a virtual environment:

# Using virtual environment (recommended)
python -m venv venv
source venv/bin/activate  # On Windows: venv\\Scripts\\activate
pip install trc20-monitor

# Or using user installation
pip install --user trc20-monitor

Uninstallation

To remove the package:

pip uninstall trc20-monitor