collections. Abstractly, a feature collection is a map from feature name to
a feature. While any type of feature can be supported, the core focus of this
package is on *multisets* or "bags of words" (BOW). In this package, the
default multiset implementation is a `StringCounter`, which maps Unicode
strings to counts.
This package also includes utilities for serializing and deserializating
collections of feature collections to CBOR (Concise Binary Object
Representation).
### Installation
`dossier.fc` is on PyPI and can be installed with `pip`:
```bash
pip install dossier.fc
```
Currently, `dossier.fc` requires Python 2.7. It is not yet Python 3 compatible.
### Documentation
API documentation with examples is available as part of the Dossier Stack
documentation:
[http://dossier-stack.readthedocs.org](http://dossier-stack.readthedocs.org#module-dossier.fc)
### Examples and basic usage
By default, feature collections use `StringCounter` for feature representation:
```python
from dossier.fc import FeatureCollection
fc = FeatureCollection()
fc['NAME']['alice'] += 1
fc['NAME']['bob'] = 5
print type(fc['NAME'])
# output: StringCounter
```
As the name suggests, a `StringCounter` is a subclass of the `Counter` class
found in the Python standard library `collections` module. As such, it supports
binary operations like addition, subtraction, equality testing, etc.
The `FeatureCollection` class also provides these binary operations which are
performed on corresponding features. For example:
```python
from dossier.fc import FeatureCollection
fc1 = FeatureCollection({'NAME': {'alice': 1, 'bob': 1}})
fc2 = FeatureCollection({'NAME': {'alice': 1}})
fc3 = fc1 + fc2
assert fc3 == FeatureCollection({'NAME': {'alice': 2, 'bob': 1}})
```
Metadata
Release files for dossier.fc 0.3.5
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 | |
|---|---|---|---|---|
| dossier.fc-0.3.5.tar.gz | 24.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dossier.fc-0.3.5-py2.7.egg | Legacy Egg format | - | - | Details |
Total release size: 101.2 kB
Release files / dossier.fc-0.3.5.tar.gz
| Download URL | dossier.fc-0.3.5.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0bcb2a469ee5236fbe169b505316397532e96483554a9058b1675ee2a349245
|
|
BLAKE2b-256 checksum How to use checksums |
ac8a96b7677b823fba209edfefb9b14d12e08b5b7d9822b71069b264234e6887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / dossier.fc-0.3.5-py2.7.egg
| Download URL | dossier.fc-0.3.5-py2.7.egg |
|---|---|
| Size | 76.4 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
e1e00faeeda45a5a08c2b2729e6b8b378a582eba0d3681ef16f1a6f98ca9fdd5
|
|
BLAKE2b-256 checksum How to use checksums |
8261f87eb1329cf6bfd7436a6e2d286544ec6a7b1600d4a3e7d20883dcf614ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dossier.fc 0.3.5
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.