Skip to main content

Seconds is a utility package to transform seconds to minutes, hours, etc. and vice versa quickly, easily, understandable by humans and without external dependencies!

Project description

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

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

seconds-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

seconds-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file seconds-0.1.0.tar.gz.

File metadata

  • Download URL: seconds-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for seconds-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c9a1fc8b7dd9961810feaaaf06bd06d016321b4cd2bfc2d86fb219eafb1eee9
MD5 d322a1d27ce6a418647c5d82255553f7
BLAKE2b-256 451ddf5117e2d67b93f432df06bb626e73f92a2081714657421c067c78ecf00d

See more details on using hashes here.

File details

Details for the file seconds-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: seconds-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for seconds-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a21bf9158e44878f6d187a3acea19912aea5b0316c9413aeada5bd46eb3dbf1
MD5 cbebcae2c74553e4722933d6b421917a
BLAKE2b-256 33c70e00808550163200e06099a80dd73d15a5c04a176c9aa37094f1661b6e9e

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