Skip to content

NTBBloodbath/Seconds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seconds

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

About

Transform seconds to minutes, hours, etc. and vice versa quickly, easily, understandable by humans and without external dependencies

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages