Installation#

Prerequisites

  • Python 3.8+ - Varunayan supports Python 3.8 and higher

  • CDS API Token - Registration required (free)

Quick Install#

Basic Installation#

pip install varunayan

With Documentation Tools#

pip install varunayan[docs-build]

For Development#

pip install varunayan[dev,quality,test]

Installation Options#

End Users#

Basic Package
pip install varunayan

Core functionality only

With Notebook Support
pip install varunayan[docs-build]

Includes Jupyter notebook tools

Developers & Contributors#

Development
pip install varunayan[dev,quality,test]

Testing, linting, type checking

Documentation
pip install varunayan[docs,docs-serve]

Full documentation tools

Building
pip install varunayan[build]

Package building tools

Everything
pip install varunayan[all]

All optional dependencies

Development Installation#

For development work, clone the repository and install in editable mode:

git clone https://github.com/saketlab/varunayan.git
cd varunayan
pip install -e .[dev,quality,test]

This includes:

  • Testing: pytest, pytest-cov, pytest-xdist

  • Code Quality: black, isort, flake8, mypy

  • Security: bandit, safety

  • Pre-commit hooks: Automated code quality checks

CDS API Setup#

Required for Data Download

Varunayan requires access to the Copernicus Climate Data Store (CDS) API to download ERA5 data.

Step 1: Register for CDS Access#

  1. Go to CDS Website

  2. Create a free account

Step 2: Get Your API Token#

  1. Log in to CDS

  2. Go to your Profile

  3. Copy your API Token

Step 3: Configure API Access#

varunayan will automatically handle the API configuration. No need to manually create or edit the .cdsapirc file! Just run the package and provide your API token when prompted.

Security Note

The API token you provide is only used to generate the .cdsapirc file for configuring access to the CDS API.
varunayan does not store, transmit, or use your token for anything else.

Verify Installation#

Test that everything is working correctly:

Command Line#

# Check version
varunayan --help

# Test CLI functionality  
varunayan --version

Python#

# Test import
import varunayan
print(f"Varunayan version: {varunayan.__version__}")

# Test function availability
print("Available functions:")
for func in ['era5ify_geojson', 'era5ify_bbox', 'era5ify_point']:
    if hasattr(varunayan, func):
        print(f"  ✓ {func}")
    else:
        print(f"  ✗ {func}")

Troubleshooting#

Common Issues

Import errors: Install missing dependencies with pip install varunayan[all]

CDS API errors: Check your ~/.cdsapirc file and credentials

Permission errors: Use --user flag: pip install --user varunayan

Version conflicts: Create a virtual environment:

python -m venv varunayan-env
source varunayan-env/bin/activate  # On Windows: varunayan-env\Scripts\activate
pip install varunayan

Next Steps#

Once installed, check out:


Need help? Open an issue on GitHub!