Skip to content

Installation

Requirements

  • Python 3.13 or higher
  • pip or uv package manager

Using pip

Install the latest version from PyPI:

pip install njleg_api

uv is a fast Python package installer:

uv pip install njleg_api

Development Installation

For development or to get the latest unreleased features:

# Clone the repository
git clone https://github.com/mcala/nj_legislative_api.git
cd nj_legislative_api

# Install with development dependencies using uv
uv sync --dev

# Or using pip
pip install -e ".[dev]"

Verify Installation

import njleg_api
print(njleg_api.__version__)

Optional Dependencies

The package includes optional development dependencies for:

  • Testing: pytest, pytest-cov
  • Documentation: mkdocs, mkdocstrings
  • Code quality: ruff, pyright, ty
  • Release management: python-semantic-release

Install development dependencies:

uv sync --dev
# or
pip install njleg_api[dev]

Environment Setup

API Key (Optional)

While not required, an API key provides better rate limits:

export NJ_LEG_API_KEY="your_api_key_here"

Cache Directory

By default, caching uses XDG Base Directory specification. Override if needed:

export NJ_LEG_CACHE_DIR="/path/to/cache"

Next Steps

After installation, proceed to the Quick Start Guide to learn how to use the library.