Skip to main content

Frequently used functions and constants about datetime in Django projects

Project description

django-datetime-helpers

Build Status codecov PyPI version License: MIT

Frequently used functions and constants about datetime in Django projects

Installing

pip install django-datetime-helpers

Examples

# Quering all Users who join today
users = User.objects.filter(
    created_at__date=today()
)

# Quering all Users who join in last 12 hours
users = User.objects.filter(
    created_at__gte=secons_ago(12 * HOUR)
)

# Declaring constanst
USER_SOMETHING_TIMEOUT = 5 * MINUTE

# Waiting for something
time.sleep(MINUTE)

For more examples see source code.

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

django_datetime_helpers-0.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

django_datetime_helpers-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file django_datetime_helpers-0.0.1.tar.gz.

File metadata

  • Download URL: django_datetime_helpers-0.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10

File hashes

Hashes for django_datetime_helpers-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9cb515665da36086f08a60512a5de716d3b37bf58feed228ae31ac18005e8ad8
MD5 cde3ac7dd2ec05db297030e3b04c2726
BLAKE2b-256 997f9c26ecbc7cc9d6777bdc273c68188760ed88ac32ccc69417f4083610ecf7

See more details on using hashes here.

File details

Details for the file django_datetime_helpers-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: django_datetime_helpers-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10

File hashes

Hashes for django_datetime_helpers-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f878386a093d749732e427a91264d81fb1a95f570613bec7d36b85558baf24f
MD5 02feb18875cc2816f7bfab06ea27a7e3
BLAKE2b-256 0d08f4c6a862dd55c57bcbd71cd748a992fa77c23fa25cf99d01bc62762f5500

See more details on using hashes here.

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