Skip to main content

A Python library for managing temporal intervals in Power BI

Project description

artip

A Python library for managing temporal intervals in Power BI.

Description

The artip library provides a class to produce a scalar representation of time intervals usable in Power BI models. It is designed for use in Python ETL pipelines to build period identifiers, as opposed to using (start date, end date) tuples.

Installation

pip install .

Or with uv:

uv pip install .

Usage

from artip import Artip
from datetime import date

# Create an Artip instance
artip = Artip(min_time=date(2020, 1, 1), max_time=date(2025, 12, 31), granularity='day')

# Generate a period ID
period_id = artip.make_period_id(start=date(2023, 1, 1), end=date(2023, 1, 31))
print(period_id)

# Generate calendar table
calendar = artip.make_calendar_table()
print(calendar)

# Get DAX UDF
dax_udf = artip.get_DAX_UDF()
print(dax_udf)

Features

  • Scalar representation of time intervals
  • Optimized for Power BI Vertipaq engine (fits in 64-bit integer)
  • Lazy Polars DataFrames for performance
  • Modular and typed Python code

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

artip-0.1.0.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

artip-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file artip-0.1.0.tar.gz.

File metadata

  • Download URL: artip-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for artip-0.1.0.tar.gz
Algorithm Hash digest
SHA256 59875415ca5d360db2953adf1a57e7664c4687bd2cf6c82216f75645b9369bd9
MD5 4415b5140aa4311ce66e4ce95aa1b37e
BLAKE2b-256 8b34a62f1addf639945077c379d9966e7eabc40d963eb1595b2056aa3832cf9f

See more details on using hashes here.

File details

Details for the file artip-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: artip-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for artip-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f4a28ff3d0649461635e7cad64af11e5a3541ce2bf398ad726b0919a246dc43
MD5 75afb1153ecce07335fb6ff0865aa9fb
BLAKE2b-256 99722bdd6046adaaad67828fc9d7f22fc67396286e4057e087322eb0d9a5412f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page