- Python 3.8 or higher
- pip (Python package installer)
pip install mapflow-co-sdk# Clone the repository
git clone https://github.com/mapflow/sdk-python.git
cd sdk-python
# Install in editable mode
pip install -e .# Navigate to the SDK directory
cd /path/to/sdk-python
# Install
pip install .After installation, verify everything works:
python verify_installation.pyOr test the import:
python3 -c "import mapflow; print('MapFlow SDK version:', mapflow.__version__)"The SDK automatically installs these dependencies:
- requests (>=2.31.0) - HTTP client library
- pydantic (>=2.0.0) - Data validation library
If you need to install dependencies separately:
pip install requests>=2.31.0 pydantic>=2.0.0Using a virtual environment is recommended to avoid dependency conflicts:
# Create virtual environment
python3 -m venv mapflow-env
# Activate (Linux/macOS)
source mapflow-env/bin/activate
# Activate (Windows)
mapflow-env\Scripts\activate
# Install SDK
pip install mapflow-co-sdk
# When done
deactivate# Create environment
conda create -n mapflow python=3.11
# Activate
conda activate mapflow
# Install SDK
pip install mapflow-co-sdk
# When done
conda deactivateSolution:
# Ensure you installed the package
pip install mapflow-co-sdk
# Or if from source
pip install -e .Solution:
# Install dependencies
pip install requests pydantic
# Or reinstall the SDK which should install dependencies
pip install --force-reinstall mapflow-co-sdkSolution:
# Check Python version
python --version
# SDK requires Python 3.8+
# Install Python 3.8 or higher from python.orgSolution:
# Install for current user only
pip install --user mapflow-co-sdk
# Or use virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate
pip install mapflow-co-sdkSolution:
# Update certificates
pip install --upgrade certifi
# Or install with --trusted-host (not recommended for production)
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org mapflow-co-sdkTo upgrade to the latest version:
pip install --upgrade mapflow-co-sdkTo install a specific version:
pip install mapflow-co-sdk==1.0.0To remove the SDK:
pip uninstall mapflow-co-sdk# Use Python 3
python3 -m pip install mapflow-co-sdk# May need to install pip first
sudo apt-get install python3-pip
# Then install SDK
pip3 install mapflow-co-sdk# Use Python launcher
py -m pip install mapflow-co-sdkFor contributors and developers:
# Clone repository
git clone https://github.com/mapflow/sdk-python.git
cd sdk-python
# Install in editable mode with dev dependencies
pip install -e .
pip install pytest pytest-cov black flake8 mypy
# Run tests
python run_tests.py
# Verify
python verify_installation.pyIf using Docker:
FROM python:3.11-slim
WORKDIR /app
# Install SDK
RUN pip install mapflow-co-sdk
# Copy your application
COPY . .
CMD ["python", "your_app.py"]After installation, verify these imports work:
from mapflow import (
MapFlowClient,
CustomerType,
ItemType,
VehicleType,
MapFlowError
)
# Create client
client = MapFlowClient(api_key="your-key")
print("✓ MapFlow SDK installed successfully!")After successful installation:
- Get your API key from https://app.mapflow.co/settings/api-keys
- Read the Quick Start: QUICKSTART.md
- Run examples:
python examples/getting_started.py - Read full docs: README.md
If you encounter issues:
- Check this troubleshooting section
- Run
python verify_installation.py - Check GitHub Issues
- Contact support@mapflow.co
| Requirement | Minimum | Recommended |
|---|---|---|
| Python | 3.8 | 3.11+ |
| RAM | 256 MB | 512 MB |
| Disk | 10 MB | 50 MB |
| Network | HTTPS access | HTTPS access |
You're ready to start using the MapFlow SDK!
from mapflow import MapFlowClient
client = MapFlowClient(api_key="your-api-key")
customers = client.list_customers()
print(f"You have {customers.count} customers")