Installationο
Important
This package is not yet published on PyPI. Please use the development installation method below. Once the package is stable, it will be released on PyPI for easier installation.
Requirementsο
Python 3.12 or higher
uv (recommended) or pip (Python package installer)
Git (for cloning the repository)
Note
We recommend using uv, a fast Python package installer and resolver written in Rust. Itβs significantly faster than pip and provides better dependency resolution.
Development Installation (Current Method)ο
Since the package is not yet on PyPI, you must clone the repository and install locally.
Clone the Repository
git clone https://github.com/DataArtifex/dataverse-toolkit.git cd dataverse-toolkit
Install in Editable Mode
Using uv (recommended):
# Install uv if you haven't already curl -LsSf https://astral.sh/uv/install.sh | sh # Sync the project environment (replaces editable install) uv sync
Using pip:
pip install -e . # Or with development dependencies pip install -e ".[dev]"
Using Hatch (Recommended for Development)ο
This project uses Hatch for development. Hatch will automatically use uv if available:
# Install Hatch (will use uv if available)
uv tool install hatch
# Or using pip
pip install hatch
# Create and activate default environment
hatch shell
# Run tests
hatch run test
# Run tests with coverage
hatch run cov
# Type checking
hatch run types:check
Dependenciesο
Core Dependenciesο
pydantic (>=2.0.0) - Data validation using Python type annotations
requests (>=2.31.0) - HTTP library for Python
requests-cache (>=1.0.0) - Persistent cache for requests
Optional Dependenciesο
Development Tools ([dev])ο
pytest (>=7.0) - Testing framework
coverage (>=6.5) - Code coverage measurement
mypy (>=1.0.0) - Static type checker
ruff (>=0.1.0) - Fast Python linter and formatter
Documentation Tools ([docs])ο
sphinx (>=7.0) - Documentation generator
sphinx-rtd-theme (>=2.0) - Read the Docs theme for Sphinx
Installing with Optional Dependenciesο
For development installation (current method), use editable mode with optional dependencies:
Using uv (recommended):
# Install development tools
uv sync --group dev
# Install documentation tools
uv sync --group docs
# Install all optional dependencies
uv sync --all-groups
Using pip:
# Install with development tools
pip install -e ".[dev]"
# Install with documentation tools
pip install -e ".[docs]"
# Install with all optional dependencies
pip install -e ".[dev,docs]"
Future PyPI Installationο
Once the package is stable and officially released on PyPI, you will be able to install it with:
Using uv (Recommended)ο
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install the package
uv pip install dartfx-dataverse
# With optional dependencies
uv pip install dartfx-dataverse[dev,docs]
Using pipο
pip install dartfx-dataverse
# With optional dependencies
pip install dartfx-dataverse[dev,docs]
Verifying Installationο
To verify that the package is installed correctly:
import dartfx.dataverse
from dartfx.dataverse.__about__ import __version__
print(f"dartfx-dataverse version: {__version__}")
You should see the version number printed without any errors.
Troubleshootingο
Import Errorsο
If you encounter import errors, ensure that:
You have Python 3.12 or higher installed
The package is installed in the correct Python environment
Your
PYTHONPATHis set correctly if using a development installation
SSL Certificate Errorsο
If you encounter SSL certificate errors when connecting to Dataverse servers:
from dartfx.dataverse import DataverseServer
# Disable SSL verification (not recommended for production)
server = DataverseServer(
server=installation,
ssl_verify=False
)
Warning
Disabling SSL verification should only be done in development environments or when absolutely necessary. It makes your connection vulnerable to man-in-the-middle attacks.
Upgradingο
To upgrade to the latest version:
Using uv (recommended):
uv pip install --upgrade dartfx-dataverse
Using pip:
pip install --upgrade dartfx-dataverse
To upgrade to a specific version:
uv pip install dartfx-dataverse==X.Y.Z
Uninstallingο
To uninstall the package:
uv pip uninstall dartfx-dataverse
# Or using pip
pip uninstall dartfx-dataverse