Installation¶
This guide covers how to install the IFPA API package and verify your installation.
Requirements¶
- Python 3.11 or higher
- pip (Python package installer)
Install from PyPI¶
The simplest way to install the IFPA API package is using pip:
This will install the latest stable version from PyPI.
Verify Installation¶
After installation, verify that the package is installed correctly:
You can also check the installed version using pip:
Install in a Virtual Environment (Recommended)¶
It's recommended to install the package in a virtual environment to avoid dependency conflicts:
Using venv (Standard Library)¶
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On macOS/Linux:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Install the package
pip install ifpa-api
Using Poetry¶
If you're using Poetry for dependency management:
# Add to your project
poetry add ifpa-api
# Or install in a new project
poetry init
poetry add ifpa-api
poetry install
Install from Source¶
To install the latest development version from GitHub:
Or clone the repository and install locally:
Development Installation¶
If you want to contribute to the package, follow the Contributing Guide for development setup instructions.
Quick version:
# Clone the repository
git clone https://github.com/johnsosoka/ifpa-api-python.git
cd ifpa-api-python
# Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies
poetry install
# Install pre-commit hooks
poetry run pre-commit install
Upgrading¶
To upgrade to the latest version:
With Poetry:
Uninstalling¶
To remove the package:
With Poetry:
Dependencies¶
The package has minimal dependencies:
- requests (^2.31.0) - HTTP library for API requests
- pydantic (^2.0.0) - Data validation and settings management
These dependencies will be automatically installed when you install the package.
Python Version Support¶
The package requires Python 3.11 or higher. Support for Python versions follows the official Python release cycle:
- Supported: Python 3.11, 3.12
- Not Supported: Python 3.10 and earlier
Platform Support¶
The package is platform-independent and works on:
- macOS
- Linux
- Windows
Troubleshooting¶
"No module named 'ifpa_api'"¶
If you get this error, ensure:
- The package is installed in the correct environment
- You're using the correct Python interpreter
- The installation completed successfully
# Check which Python you're using
which python3
python3 --version
# Check if package is installed
pip list | grep ifpa-api
Import Errors¶
If you encounter import errors with dependencies:
# Reinstall with --force-reinstall
pip install --force-reinstall ifpa-api
# Or with --no-cache-dir
pip install --no-cache-dir ifpa-api
Permission Denied¶
If you get permission errors during installation:
# Install for current user only
pip install --user ifpa-api
# Or use a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install ifpa-api
Next Steps¶
Now that you have the package installed: