Time Series
A simple python implementation of a sliding window.
Installation
pip install time-series
Examples
import timeseries
# max 10 data points
fixed_window = timeseries.Fixed(10)
# removes added data points after 10 seconds
timer_window = timeseries.Timer(10)
# deletes data points after 10 iterations
for i in range(100):
current_window = fixed_window.slide(i)
# deletes data points after 10 seconds have elapsed.
for i in range(100):
current_window = timer_window.slide(i)
# prints 89...99
for i in fixed_window:
print(i)
# will most likely print 0...99
for i in timer_window:
print(i)
if fixed_window.is_full:
print("fixed window is full")
# shrinks the number of elements to 2 (threadsafe)
fixed_window.maxsize = 2
# print current number of items
print(timer_window.size, len(timer_window))
Metadata
Release files for time-series 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| time-series-0.2.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| time_series-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.8 kB
Release files / time-series-0.2.tar.gz
| Download URL | time-series-0.2.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a39c0f880eaa0ae7db713a54f7b55c0b3d35863b104cb36aa12c5db4fc3e8bdc
|
|
BLAKE2b-256 checksum How to use checksums |
dcaa49896b1bf0e38825f3bfcd65f5110dab55222f3027e63225efee00ccbdf0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Release files / time_series-0.2-py3-none-any.whl
| Download URL | time_series-0.2-py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6872eb94d9ef80b5c7ed3c5d38511dec3f1fec6b2c6b8c587c475d8cf7b397b8
|
|
BLAKE2b-256 checksum How to use checksums |
8216a6f73386a6d44149d3b71de2d4da6525b7df70b2a795b2a63ad778914592
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|