https://github.com/Legorooj/sloth
The best python speedtesting library and command line speedtesting tool
https://github.com/Legorooj/sloth
api python python3 speedtest timing
Last synced: about 1 year ago
JSON representation
The best python speedtesting library and command line speedtesting tool
- Host: GitHub
- URL: https://github.com/Legorooj/sloth
- Owner: Legorooj
- License: mit
- Created: 2020-02-29T10:45:39.000Z (over 6 years ago)
- Default Branch: dev
- Last Pushed: 2020-06-16T07:43:57.000Z (about 6 years ago)
- Last Synced: 2025-06-16T16:18:42.958Z (about 1 year ago)
- Topics: api, python, python3, speedtest, timing
- Language: Python
- Homepage: https://sloth.fluffykoalas.org
- Size: 248 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
# `sloth`
#### *The* python speedtesting library and command line tool
[](https://codecov.io/gh/fluffykoalas/sloth)
[](https://dev.azure.com/FluffyKoalas/Sloth/_build/latest?definitionId=2&branchName=dev)
[](https://www.codacy.com/gh/fluffykoalas/sloth?utm_source=github.com&utm_medium=referral&utm_content=fluffykoalas/sloth&utm_campaign=Badge_Grade)
[](https://choosealicense.com/licenses/mit/)
[](https://github.com/fluffykoalas/sloth/pulse)
[](https://github.com/fluffykoalas/sloth/commits)
[](https://sloth.fluffykoalas.org/en/latest/?badge=latest)
`sloth` is a Python package for speedtesting python code and functions with as little code as necessary.
It's easy to use and, unlike many projects, has decent documentation.
The idea behind this API is:
```python
>>> from sloth import compare_sloth
>>> import timeit
>>> compare_sloth(timeit)
'sloth is loads better than timeit!'
```
See? described in 3 lines. *Everything* that `timeit` can do, `sloth` can do better - or will soon. And *alot* of things
`timeit` *can't* do `sloth` can do anyway.
## A Quick Example
```python
>>> from sloth.simple import time_callable
>>> import time
>>> def my_func(a, b, c):
... time.sleep(1)
... print(a, b, c)
>>> time_callable(my_func, 2, 'a', 'b', 'c')
a b c
1.000063419342041
```
## Installation
You can install sloth with pip:
```
pip install sloth-speedtest
```
Please see the docs for more info.
## Links
* [PyPI](https://pypi.org/project/sloth-speedtest)
* [Documentation](https://sloth.fluffykoalas.org)
* [GitHub](https://github.com/fluffykoalas/sloth)
Note that this library is unrelated and mutually exclusive to
the one that can be found at https://sloth.readthedocs.io