Skip to main content

Provides classes for working with timecodes (as used in the video industry).

Project description

# django-timecode

A python class to store and manipulate timecodes with accompanying Django field.

## Examples

Timecodes can be created using a string representation

>>> from timecode import Timecode
>>> start = Timecode('09:59:50:00', fps=25)
>>> end = Timecode('10:06:05:12', fps=25)

They will print themselves

>>> start
Timecode('09:59:50:00', fps=25)
>>> str(start)
'09:59:50:00'

They can add and subtract

>>> delta = end - start
>>> delta
Timecode('00:06:15:12', fps=25)

Or you can get at the exact frames using the total_frames attribute

>>> delta.total_frames
9387

## In a Django model

### models.py

from timecode.fields import TimecodeField from django.db import models

class TestModel(models.Model):

timecode = TimecodeField()

You can then store the timecode objects in the database.

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-timecode-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file django-timecode-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-timecode-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4344bc86f4342a7bbfb53d1e3b82f3fc0f33fe45dd3c3faf47e2d399c2936e4d
MD5 19fef9ce845178c8af0aae4c18b84704
BLAKE2b-256 bb29534ceb5c5cd3186cab3bd1b24b0d72595daf93c5cfd9fa466ede22cf1ee4

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