Skip to main content

EVREX - EV Resource eXchange

Tests DOI Downloads

A Python library for electric vehicle fleet electrification assessment, adoption modeling, V2G potential analysis, battery degradation modeling, and grid impact assessment.

Installation

pip install evrex

With optional dependencies:

pip install evrex[fetch]   # OSM, World Bank, IMF data fetchers
pip install evrex[viz]     # Matplotlib visualization
pip install evrex[all]     # Everything

Quick Start

from evrex import (
    TransportContext,
    EVMacroData,
    run_ev_bass_diffusion,
    run_ev_tco_parity,
    generate_charging_profiles,
    compute_v2g_potential,
    compute_battery_degradation,
    assess_grid_impact,
)

# Define transport context
transport = TransportContext(
    fleet_by_category={"light": 5000, "medium": 800, "heavy": 200, "buses": 100},
    charging_stations=120,
    population=500_000,
)

# Run Bass diffusion adoption model
curve = run_ev_bass_diffusion(transport, base_year=2025, target_year=2050)
print(f"EV penetration by 2050: {curve.penetration[-1]:.1%}")
print(f"Peak charging demand: {curve.peak_charging_mw[-1]:.1f} MW")

# Battery degradation analysis
deg = compute_battery_degradation(v2g_cycles_per_day=0.5, chemistry="LFP")
print(f"Degradation: {deg.total_degradation_pct_per_year:.2f}%/year")
print(f"Break-even V2G rate: ${deg.breakeven_compensation:.0f}/MWh")

Adoption Models

Four methods for projecting EV fleet evolution:

Method Function Key Drivers
Logistic run_ev_logistic_adoption() GDP, fuel price, EV cost, infrastructure
Bass Diffusion run_ev_bass_diffusion() Innovation (p) and imitation (q)
TCO-Parity run_ev_tco_parity() Total cost of ownership comparison
Policy-Driven run_ev_policy_driven() ICE bans, emission targets, scrappage

Modules

  • evrex.core - Adoption models, charging profiles, V2G, degradation, grid impact
  • evrex.data - OSM, World Bank, IMF, IEA (bundled), BNEF (bundled) data

License

MIT

Metadata

Release files for evrex 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evrex 0.1.1
File Size Uploaded Provenance Actions
evrex-0.1.1.tar.gz 29.5 kB With provenance Details for evrex-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evrex 0.1.1
File Interpreter ABI Platform Actions
evrex-0.1.1-py3-none-any.whl Python 3 none any Details for evrex-0.1.1-py3-none-any.whl

Total release size: 57.0 kB

Release files / evrex-0.1.1.tar.gz

Download URL evrex-0.1.1.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1820ec68e655363366903f7ad4dd6be39d0d96dcda63fe2fdb373ba951fbf0a4
BLAKE2b-256 checksum
How to use checksums
ec1810d6752603368f13496b24ed8c02f36f2a447115322712056e3a9e7594de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

Release files / evrex-0.1.1-py3-none-any.whl

Download URL evrex-0.1.1-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c70cc71e228e8b2a33d0b2fda26a2d1cd619acd58ac17c460d8219764d476b89
BLAKE2b-256 checksum
How to use checksums
79a712eec951f00c385779830e5cade3d3e30094ff6cbbf1c26dd038dbbf51c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

Security for evrex 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for evrex-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page