No project description provided
Project description
# jvstats, a commandline tool for retrieving stats
[](https://travis-ci.com/jaimeviloria/jvstats)
[](https://badge.fury.io/py/jvstats)
## Development Requirements
* make
* python3
* virtualenv
## Package Requirements
* python3
## Installation
`pip install jvstats`
## Usage:
Example for the module
```
>>> from jvstats import Delays
>>> d = Delays()
>>> d.delays
[]
>>> d.addDelay(100)
[100]
>>> d.medians
[-1]
>>> d.sliding_window
[100]
>>> d.addDelay(102)
[100, 102]
>>> d.medians
[-1, 101]
>>> d.sliding_window
[100, 102]
>>> d.addDelay([101,110,120])
[100, 102, 101, 110, 120]
>>> d.sliding_window
[101, 110, 120]
>>> d.medians
[-1, 101, 101, 102, 110]
>>> d.delays=[100,102]
>>> d.medians
[-1, 101]
```
When using the tool on commandline
1. piping from stdin (in this case using a file)
```
$ cat test1.csv
100
102
101
110
120
115
$ cat test1.csv | jvstats delays medians
-1
101
101
102
110
115
```
2. from a file
```
$ cat test1.csv
100
102
101
110
120
115
$ jvstats delays medians --filename test1.csv
-1
101
101
102
110
115
```
## Development
### Build your own specific version of python to test against:
The created project also contains a set of Makefiles which will build and run tests against your code.
`make` will build you the latest version of python and then proceed for testing
Or choose a specific python version to test against.
`make PYTHON_VERSION=3.6`
Note that once built, you can easily swap between python versions just by executing the make command. If the python version you need was already built in the build directory, then we simply update the symlink of the virtualenv and ensure requirements.txt is installed.
## Testing
`make test`
creates the virtualenv and python binaries necessary for testing as well as running the unittests
[](https://travis-ci.com/jaimeviloria/jvstats)
[](https://badge.fury.io/py/jvstats)
## Development Requirements
* make
* python3
* virtualenv
## Package Requirements
* python3
## Installation
`pip install jvstats`
## Usage:
Example for the module
```
>>> from jvstats import Delays
>>> d = Delays()
>>> d.delays
[]
>>> d.addDelay(100)
[100]
>>> d.medians
[-1]
>>> d.sliding_window
[100]
>>> d.addDelay(102)
[100, 102]
>>> d.medians
[-1, 101]
>>> d.sliding_window
[100, 102]
>>> d.addDelay([101,110,120])
[100, 102, 101, 110, 120]
>>> d.sliding_window
[101, 110, 120]
>>> d.medians
[-1, 101, 101, 102, 110]
>>> d.delays=[100,102]
>>> d.medians
[-1, 101]
```
When using the tool on commandline
1. piping from stdin (in this case using a file)
```
$ cat test1.csv
100
102
101
110
120
115
$ cat test1.csv | jvstats delays medians
-1
101
101
102
110
115
```
2. from a file
```
$ cat test1.csv
100
102
101
110
120
115
$ jvstats delays medians --filename test1.csv
-1
101
101
102
110
115
```
## Development
### Build your own specific version of python to test against:
The created project also contains a set of Makefiles which will build and run tests against your code.
`make` will build you the latest version of python and then proceed for testing
Or choose a specific python version to test against.
`make PYTHON_VERSION=3.6`
Note that once built, you can easily swap between python versions just by executing the make command. If the python version you need was already built in the build directory, then we simply update the symlink of the virtualenv and ensure requirements.txt is installed.
## Testing
`make test`
creates the virtualenv and python binaries necessary for testing as well as running the unittests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jvstats-0.1.4.dev0.tar.gz
(3.9 kB
view details)
Built Distribution
File details
Details for the file jvstats-0.1.4.dev0.tar.gz
.
File metadata
- Download URL: jvstats-0.1.4.dev0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using 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.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9049b765c24af31181cccbed8da157af0f6efa50272c8adefc4dfa5d7744ac97 |
|
MD5 | 3231126410d48ffdde846184503d5caf |
|
BLAKE2b-256 | 234a73f7b20accfa28d5104bdb38af234ec9dd688b2f6f6c2996c3a56049a3e8 |
File details
Details for the file jvstats-0.1.4.dev0-py3-none-any.whl
.
File metadata
- Download URL: jvstats-0.1.4.dev0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using 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.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5431d3ace3b40263a4a41619470acd409cba2dfbeb73f2d1d60b2fd99e8f20cc |
|
MD5 | a05258c3dad5f3e141bd6998b9de386d |
|
BLAKE2b-256 | 6c8c8d048027bec9f1eb5c7ef6037fd42458402f1b1c78aa4a49066b126c1212 |