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.3.tar.gz
(3.3 kB
view details)
File details
Details for the file django-timecode-0.1.3.tar.gz
.
File metadata
- Download URL: django-timecode-0.1.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79d51f5c399f0291051dff0090089e8bdda7806272e87a66f36eb4c2c0aaa22a |
|
MD5 | ea8968266e9956912b980624eccd88a6 |
|
BLAKE2b-256 | f4cc2a75cfc0f7b7cfbe94e3c3d6834456b21744f5690b29aeaf28408715bf47 |