Installation

Table of contents

  1. Requirements
  2. Install from PyPI
    1. Upgrading
    2. Installing Specific Versions
  3. Install from Source
    1. Clone the Repository
    2. Install in Development Mode
    3. Install with Development Dependencies
  4. Virtual Environment (Recommended)
    1. Using venv
    2. Using conda
  5. Verification
  6. Troubleshooting
    1. Common Issues
      1. ImportError: No module named ‘mimitfuelpy’
      2. Connection Errors
      3. Version Conflicts
    2. Getting Help

Requirements

mimitfuelpy requires Python 3.7 or higher. The library has minimal dependencies:

  • Python: 3.7+
  • requests: 2.25.0+

Install from PyPI

The easiest way to install mimitfuelpy is using pip:

pip install mimitfuelpy

Upgrading

To upgrade to the latest version:

pip install --upgrade mimitfuelpy

Installing Specific Versions

To install a specific version:

pip install mimitfuelpy==0.1.0

Install from Source

If you want to install from source or contribute to the project:

Clone the Repository

git clone https://github.com/fpetranzan/mimitFuelPy.git
cd mimitFuelPy

Install in Development Mode

For development, install in editable mode:

pip install -e .

This allows you to make changes to the source code and have them reflected immediately.

Install with Development Dependencies

To install with all development dependencies (testing, linting, etc.):

pip install -e ".[dev]"

It’s recommended to use a virtual environment to avoid conflicts with other packages:

Using venv

# Create virtual environment
python -m venv mimitfuelpy-env

# Activate on Windows
mimitfuelpy-env\Scripts\activate

# Activate on macOS/Linux
source mimitfuelpy-env/bin/activate

# Install mimitfuelpy
pip install mimitfuelpy

Using conda

# Create environment
conda create -n mimitfuelpy python=3.9

# Activate environment
conda activate mimitfuelpy

# Install mimitfuelpy
pip install mimitfuelpy

Verification

After installation, verify that mimitfuelpy is working correctly:

import mimitfuelpy
print(mimitfuelpy.__version__)

# Test basic functionality
from mimitfuelpy import Client
client = Client()
brands = client.registry.brands()
print(f"Found {len(brands)} fuel brands")

If this runs without errors, you’re ready to use mimitfuelpy!

Troubleshooting

Common Issues

ImportError: No module named ‘mimitfuelpy’

Make sure you’ve installed the package and are using the correct Python environment:

pip list | grep mimitfuelpy

Connection Errors

If you encounter connection errors, check:

  1. Your internet connection
  2. Corporate firewall settings
  3. Proxy configuration (if applicable)

Version Conflicts

If you have dependency conflicts, try creating a fresh virtual environment:

python -m venv fresh-env
# Activate the environment
pip install mimitfuelpy

Getting Help

If you encounter issues:

  1. Check the examples for common use cases
  2. Review API documentation
  3. Search GitHub issues
  4. Create a new issue with details about your problem