Skip to main content

A calendar unit length utility library.

Project description

pyduration

Tests

A calendar unit length utility library for Python.

Installation

With poetry:

poetry add pyduration

Or with pip:

pip3 install pyduration

Usage

Have a look at the documentation.

Basic usage:

from pyduration import Duration

days = Duration('1d')
for day in days.iterate(['2020-01-01', '2020-01-31']):
    print(f'{day[0]} - {day[1]}')

Development

Updating Documentation

The module pdoc3 is used to automatically generate documentation. To update the documentation:

  1. Install pdoc3 if needed with pip3 install pdoc3.
  2. Navigate to project root and install dependencies: poetry install.
  3. Generate documetation files with: pdoc3 -o docs --html pyduration.
  4. The new files will be in docs/pyduration. Move them to docs/ and replace existing files.

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

pyduration-0.1.0.tar.gz (9.8 kB view hashes)

Uploaded Source

Built Distribution

pyduration-0.1.0-py3-none-any.whl (10.1 kB view hashes)

Uploaded Python 3

Supported by

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