Skip to main content

Python Versions Version Downloads License

Seconds is a utility package to transform seconds to minutes, hours, etc. and vice versa quickly, easily, understandable by humans and without external dependencies so its performance is excellent and it's extremely lightweight!


Why use Seconds?

Since Seconds doesn't contain external dependencies, it's extremely lightweight (only 12kB!) and very fast, it becomes the perfect tool to manage and transform time!


Quick start

Installation

Seconds requires Python 3.x and can be installed through pip with the following command.

pip3 install -U seconds

# Or from github's latest commit
# Available branches:
#   • master
pip3 install -U git+https://github.com/NTBBloodbath/Seconds@branch

Usage example

This is a brief example of Secs.

# Lets import Secs class from Seconds Package
from seconds import Secs

# Lets pass 5 minutes to seconds and seconds to 10 minutes
Secs("5m") # => 300
Secs(600)  # => 10 minutes
# But we want to abbreviate our minutes so we
# will pass the abbrev parameter to options
Secs(600, abbrev=True) # => 10m

# Lets pass 6 months to seconds and then pass 1 year to seconds
Secs("6mo") # => 110451600
Secs("1y")  # => 220903200

Documentation

You can see the Seconds documentation through the help() function of the REPL.


License

Seconds is distributed under MIT License.

Contributing

You can see how to contribute here

Code of Conduct

You can see the code of conduct here

Metadata

Release files for seconds 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seconds 0.1.0
File Size Uploaded
seconds-0.1.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for seconds 0.1.0
File Interpreter ABI Platform
seconds-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / seconds-0.1.0.tar.gz

Download URL seconds-0.1.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1c9a1fc8b7dd9961810feaaaf06bd06d016321b4cd2bfc2d86fb219eafb1eee9
BLAKE2b-256 checksum
How to use checksums
451ddf5117e2d67b93f432df06bb626e73f92a2081714657421c067c78ecf00d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release files / seconds-0.1.0-py3-none-any.whl

Download URL seconds-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a21bf9158e44878f6d187a3acea19912aea5b0316c9413aeada5bd46eb3dbf1
BLAKE2b-256 checksum
How to use checksums
33c70e00808550163200e06099a80dd73d15a5c04a176c9aa37094f1661b6e9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page