# Rolling Window
## A generic rolling window function for analytics
Install with:
```
pip install rolling_window
```
(To be expanded on)
Example of use (see test files for some more details):
```
from dataclasses import dataclass
import random
@dataclass
class PressureData:
time: int
pressure: float
window = RollingWindow(window_type = 'sliding', datastructure=PressureData, sort=False, persistance=False, window_options=window_options)
for ii in range(0,N):
data = PressureData(time=ii, pressure=round(random.uniform(2,20),2) )
await rolling_window.add_data(id = window_id, data=data)
data_to_process = rolling_window.send(id=window_id)
```
when data is available to the processed 'data_to_process' will return a numpy representation of the data in a structured array
## License
This project is licensed under the MIT License
## A generic rolling window function for analytics
Install with:
```
pip install rolling_window
```
(To be expanded on)
Example of use (see test files for some more details):
```
from dataclasses import dataclass
import random
@dataclass
class PressureData:
time: int
pressure: float
window = RollingWindow(window_type = 'sliding', datastructure=PressureData, sort=False, persistance=False, window_options=window_options)
for ii in range(0,N):
data = PressureData(time=ii, pressure=round(random.uniform(2,20),2) )
await rolling_window.add_data(id = window_id, data=data)
data_to_process = rolling_window.send(id=window_id)
```
when data is available to the processed 'data_to_process' will return a numpy representation of the data in a structured array
## License
This project is licensed under the MIT License
Metadata
Release files for rolling-window 0.1.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 | |
|---|---|---|---|
| rolling_window-0.1.2.tar.gz | 4.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rolling_window-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 kB
Release files / rolling_window-0.1.2.tar.gz
| Download URL | rolling_window-0.1.2.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ffdda5a6e696ac2c04005ebaab89abd8a3af097f659bb6a28d8db342da830e47
|
|
BLAKE2b-256 checksum How to use checksums |
fe01b064b154d2f88327193d9b87d226f16df54898e5e1cf1e744c9f44275b63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|
Release files / rolling_window-0.1.2-py3-none-any.whl
| Download URL | rolling_window-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa4b9e80b641aa470a90900413873541a87e5d697ef5b6ef8046f5c1d2fe9c19
|
|
BLAKE2b-256 checksum How to use checksums |
2d33efccdf8e01f17096d4281d92e27ae111a8b5cd4081c8b5279c17200c4836
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
|