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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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