Skip to main content

carlee-tools

Core utilities, types, and plotting for atmospheric science.

Overview

carlee-tools provides shared utilities and type definitions that are used across the carlee ecosystem of atmospheric modeling and visualization packages. This package serves as a common dependency for other carlee packages.

Features

  • Type Definitions: Common type aliases for paths and configurations
  • Datetime Utilities: Functions for parsing and formatting datetime objects
  • File I/O: Convenient file reading/writing functions for common scientific data formats (NetCDF, CSV, pickle, NumPy)
  • Data Utilities: Helper functions for working with arrays, key-value pairs, and data structures
  • Plotting Utilities: Matplotlib helpers for creating publication-quality atmospheric science figures

Installation

Install from PyPI:

pip install carlee-tools

Or install from source:

pip install -e /path/to/carlee-tools

Usage

import carlee_tools
from carlee_tools import PathLike, dt_to_str, read_file, TwoWayDict
from carlee_tools.utils import current_dt_str
from carlee_tools.types_carlee_tools import ConfigDict
from carlee_tools.plotting import clean_legend, get_cmap

# Use datetime utilities
timestamp = current_dt_str()

# Read scientific data files
data = read_file("data.nc")  # Automatically uses xarray for .nc files

# Work with nested dictionaries
nested = TwoWayDict({'a': {'x': 1, 'y': 2}, 'b': {'x': 3, 'y': 4}})

# Create clean matplotlib legends
clean_legend()

Type Definitions

  • PathLike: Union of str and Path for file paths
  • NumpyNumeric: Union of NumPy integer and floating types

Key Utilities

Datetime Functions

  • dt_to_str(): Convert datetime-like objects to formatted strings
  • str_to_dt(): Parse datetime strings with flexible format detection
  • current_dt_str(): Get current time as formatted string

File I/O

  • read_file(): Automatically detect file type and read with appropriate library
  • write_file(): Write data with format detection

Data Structures

  • TwoWayDict: Dictionary accessor that allows indexing by outer or inner keys

Dependencies

Core dependencies:

  • numpy
  • matplotlib>=3.0
  • xarray
  • metpy
  • tqdm
  • imageio
  • typing-extensions (Python < 3.10)

Optional dependencies:

  • pandas (for enhanced CSV support)
  • netcdf4 (for NetCDF file writing)

License

MIT License

Metadata

Release files for carlee-tools 2.0.0

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

Source distribution (sdist)

Source distribution for carlee-tools 2.0.0
File Size Uploaded Provenance
carlee_tools-2.0.0.tar.gz 34.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for carlee-tools 2.0.0
File Interpreter ABI Platform
carlee_tools-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 67.3 kB

Release files / carlee_tools-2.0.0.tar.gz

Download URL carlee_tools-2.0.0.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1ebe277f18f1c6b2855ae8a2a0b6cd68ff096628dffa1fcd47b694ff750ee3d7
BLAKE2b-256 checksum
How to use checksums
474d4fa868068bdbd77fa50074065b82b734669fb2bced7ef5dd5f063a8ad3e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / carlee_tools-2.0.0-py3-none-any.whl

Download URL carlee_tools-2.0.0-py3-none-any.whl
Size 33.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ff4d9ac1e817ee31c2b520fd9711ce3519a17008e442035254abc6b8e974f04
BLAKE2b-256 checksum
How to use checksums
8040599e8ecfecff011488ad781a36d6f7e54c0bf348a61bf4757e3620b26f70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for carlee-tools 2.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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