-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
247 additions
and
106 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
:github_url: https://github.com/BobDotCom/time_str | ||
|
||
.. currentmodule:: time_str | ||
|
||
API Reference | ||
=============== | ||
|
||
The following section outlines the API of time_str. | ||
|
||
|
||
.. _core_utilities: | ||
|
||
Core Utilities | ||
-------------- | ||
These provide the main functionality of time_str. | ||
|
||
|
||
Shortcut Functions | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
.. autofunction:: convert | ||
|
||
|
||
Converter Classes | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
.. autoclass:: Converter | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,97 @@ | ||
Welcome to time_str's documentation! | ||
======================================================= | ||
:github_url: https://github.com/BobDotCom/time_str | ||
|
||
.. automodule:: time_str | ||
:members: | ||
Time_str Documentation | ||
====================== | ||
|
||
|Mypy| |Pylint| |Black| | ||
|
||
|Codecov| |Checks| |Lint| |Tests| |Pre-commit| | ||
|
||
|PyPI| |Versions| |Docs badge| |Downloads badge| |GitHub| | ||
|
||
|
||
A package to convert user input into datetime.timedelta objects. | ||
|
||
.. |Mypy| image:: http://www.mypy-lang.org/static/mypy_badge.svg | ||
:target: http://mypy-lang.org/ | ||
:alt: Checked with mypy | ||
.. |Pylint| image:: https://img.shields.io/badge/linting-pylint-yellowgreen | ||
:target: https://github.com/PyCQA/pylint | ||
:alt: linting: pylint | ||
.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg | ||
:target: https://github.com/psf/black | ||
:alt: Code style: black | ||
|
||
.. |Codecov| image:: https://codecov.io/gh/BobDotCom/time_str/branch/main/graph/badge.svg?token=MQGTWTBI5E | ||
:target: https://codecov.io/gh/BobDotCom/time_str | ||
:alt: Codecov | ||
.. |Checks| image:: https://github.com/BobDotCom/time_str/actions/workflows/check.yml/badge.svg | ||
:target: https://github.com/BobDotCom/time_str/actions/workflows/check.yml | ||
:alt: Checks | ||
.. |Lint| image:: https://github.com/BobDotCom/time_str/actions/workflows/lint.yml/badge.svg | ||
:target: https://github.com/BobDotCom/time_str/actions/workflows/lint.yml | ||
:alt: Type Check and Lint | ||
.. |Tests| image:: https://github.com/BobDotCom/time_Str/actions/workflows/test.yml/badge.svg | ||
:target: https://github.com/BobDotCom/time_str/actions/workflows/test.yml | ||
:alt: Unit Tests | ||
.. |Pre-commit| image:: https://results.pre-commit.ci/badge/github/BobDotCom/time_str/main.svg | ||
:target: https://results.pre-commit.ci/latest/github/BobDotCom/time_str/main | ||
:alt: pre-commit.ci status | ||
|
||
.. |PyPI| image:: https://img.shields.io/pypi/v/time_str.svg?logo=pypi&color=yellowgreen&logoColor=white | ||
:target: https://pypi.python.org/pypi/time_str | ||
:alt: PyPI version info | ||
.. |Versions| image:: https://img.shields.io/pypi/pyversions/time_str.svg?logo=python&logoColor=white | ||
:target: https://pypi.python.org/pypi/time_str | ||
:alt: PyPI supported Python versions | ||
.. |Docs badge| image:: https://readthedocs.org/projects/time_str/badge/?version=latest | ||
:target: https://time_str.readthedocs.io/en/latest/?badge=latest | ||
:alt: Documentation Status | ||
.. |Downloads badge| image:: https://static.pepy.tech/personalized-badge/time_str?period=total&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads | ||
:target: https://pepy.tech/project/time_str | ||
:alt: Download Counter | ||
.. |GitHub| image:: https://img.shields.io/github/v/release/BobDotCom/time_str?include_prereleases&label=Latest%20Release&logo=github&sort=semver&logoColor=white | ||
:target: https://github.com/BobDotCom/time_str/releases | ||
:alt: Latest release | ||
|
||
|
||
PyPI: https://pypi.org/project/time_str/ | ||
|
||
Docs: https://time-str.rtfd.io/ | ||
|
||
Installation | ||
############ | ||
You can install released versions of time_str from the Python Package Index via pip or a similar tool: | ||
|
||
**Stable Release:** ``pip install time_str`` | ||
|
||
**Working Version:** ``pip install git+https://github.com/BobDotCom/time_str.git`` | ||
|
||
Usage | ||
##### | ||
|
||
.. code-block:: python | ||
>>> import time_str | ||
>>> time_str.convert('11 months 9days 1m 3 sec') | ||
datetime.timedelta(days=345, seconds=63) | ||
>>> time_str.convert('2 months 3w 1 d 5hour 3 min') | ||
datetime.timedelta(days=83, seconds=18180) | ||
Manuals | ||
------- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
:maxdepth: 1 | ||
|
||
api | ||
|
||
|
||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` | ||
* :ref:`search` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sphinx_rtd_theme==1.0.0 |
Empty file.
Empty file.
Oops, something went wrong.