Collectors
Collectors was initially developed to monitor SimPy simulation models but it can also be used to monitor any Python objects and collect data from them.
Our main development goals were:
Ease of use (simple API, little typing)
Efficiency:
No impact on simulation speed if you don’t use it.
As little impact as possible if you use it.
Flexibility and easy extensibility
Separation of data collection and data analysis
Simple usage example
>>> class Spam(object):
... a = 1
... b = 2
...
>>> spam = Spam()
>>>
>>> # Create and configure the collector
>>> col = Collector(
... ('a', lambda: spam.a),
... ('b', lambda: self.b)
... )
>>>
>>> # Collect all monitored variables (spam.a and spam.b)
>>> col()
>>> spam.a, spam.b = 3, 4
>>> col()
>>>
>>> # Get the collector’s data
>>> col
([1, 3], [2, 4])
>>> # You can also access it's elements by their name ...
>>> col.a
[1, 3]
>>> # ... or by their index
>>> col[1]
[2, 4]
Requirements
Collectors has only been tested with Python 2.6 but older versions should also work. Python 3.0 might also work; if not, we’ll put it on our schedule.
Installation
The easiest way to install Collectors is via PIP or distribute:
pip install Collectors
or
easy_install Collectors
If you downloaded the archive, execute:
python setup.py install
And finally, if you checked out the repository and always want to use the newest version, type:
pip install -e path/to/Collectors
or
pip install -e https+hg://bitbucket.org/sscherfke/collectors/
Usage
The Documentation can be found in the docs/ directory or online.
Metadata
Release files for Collectors 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| Collectors-1.0.tar.gz | 533.1 kB | Without provenance | Details |
Release files / Collectors-1.0.tar.gz
| Download URL | Collectors-1.0.tar.gz |
|---|---|
| Size | 533.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91f1136710c3e5d082ecb3b80cffcd117fafea8631a20220880596c6b1436306
|
|
BLAKE2b-256 checksum How to use checksums |
12220aa159be8b69025561375149c89d85f7e45be1d56e5b18c3c5a09cf8f5c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Collectors 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.